Issue 53133
Summary std::conjunction value has wrong type
Labels new issue
Assignees
Reporter aj-michael
    I believe std::conjunction is supposed to derive from one of the template parameters (if there are any), so its `::value` should have the type of one of the template parameters `::value`s. However, it looks like the libc++ implementation will always derive from either `true_type` or `false_type`.

Here's an example that compiles with libstdc++ but fails with libc++.

```
#include <type_traits>

struct V {
    operator bool() {
        return false;
    }
};

struct S {
    static constexpr V value;
};

static_assert(
    std::is_same_v<
        const V,     // <--- This is `const bool` in libc++
        decltype(std::conjunction<S>::value)
    >
);
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to