http://llvm.org/bugs/show_bug.cgi?id=18876
Bug ID: 18876
Summary: is_default_constructible and DRs 1354, 1424
Product: clang
Version: 3.4
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
The implementation of is_default_constructible in libstdc++ is based on the
validity of a decltype-specifier whose expression is a function-style cast for
the type being queried with no arguments.
Using that implementation, Clang 3.4 (tags/RELEASE_34/final) does not produce
the expected result for struct A below. It seems that one or both of DR 1354
and 1424 is not yet implemented by Clang.
SOURCE:
struct A { ~A() = delete; };
template <typename T> struct TypeSink;
TypeSink<decltype(A())> *typeSink;
/*
#include <type_traits>
extern char x[std::is_default_constructible<A>::value ? 42 : -1];
extern char x[42];
*/
EXPECTED OUTPUT:
(errors)
ACTUAL OUTPUT:
(successful compile)
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs