Issue |
140303
|
Summary |
Wrong result of "constructible" traits for unbound arrays
|
Labels |
new issue
|
Assignees |
|
Reporter |
bolshakov-a
|
These asserts fail in Clang (and GCC as well):
```cpp
static_assert(__is_constructible(int[], int, int));
static_assert(__is_nothrow_constructible(int[], int, int));
```
However, it seems to be wrong because [[meta.unary.prop] p. 9](http://eel.is/c++draft/meta#unary.prop-9) states:
> The predicate condition for a template specialization is_constructible<T, Args...> shall be satisfied if and only if the following variable definition would be well-formed for some invented variable t:
> `T t(declval<Args>()...);`
and the following compiles:
```cpp
#include <type_traits>
template< class T >
std::add_rvalue_reference_t<T> declval() noexcept;
using T = int[];
T t(declval<int>(), declval<int>());
```
Is it actually a bug, or am I missing something?
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs