Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/pr102305.C

raw
1 // PR c++/102305
2 // { dg-do compile { target c++11 } }
3
4 namespace std
5 {
6 template<typename _Tp, _Tp __v>
7 struct integral_constant
8 {
9 static constexpr _Tp value = __v;
10 typedef integral_constant<_Tp, __v> type;
11 };
12
13 template<typename _Tp, _Tp __v>
14 constexpr _Tp integral_constant<_Tp, __v>::value;
15
16 typedef integral_constant<bool, true> true_type;
17 typedef integral_constant<bool, false> false_type;
18
19 template<bool __v>
20 using bool_constant = integral_constant<bool, __v>;
21
22 template<typename _Tp, typename... _Args>
23 struct is_constructible
24 : public bool_constant<__is_constructible(_Tp, _Args...)>
25 {
26 };
27 }
28
29 template<typename>
30 struct A {
31 virtual ~A() = 0;
32 };
33
34 struct B {
35 virtual ~B() = 0;
36 };
37
38 static_assert(!std::is_constructible<A<int> >::value, "");
39 static_assert(!std::is_constructible<B>::value, "");