1 |
|
---|
2 | #include <boost/fusion/include/pair.hpp>
|
---|
3 | #include <boost/fusion/include/std_tuple.hpp>
|
---|
4 |
|
---|
5 | #include <tuple>
|
---|
6 | #include <iostream>
|
---|
7 |
|
---|
8 | int main(){
|
---|
9 |
|
---|
10 | struct NotDefaultConstructible {
|
---|
11 | NotDefaultConstructible(int){};
|
---|
12 | };
|
---|
13 |
|
---|
14 | // prints 0
|
---|
15 | std::cout << std::is_default_constructible< NotDefaultConstructible >::value << std::endl;
|
---|
16 |
|
---|
17 | using fusion_pair1 = boost::fusion::pair<int, NotDefaultConstructible>;
|
---|
18 |
|
---|
19 | // should print 0
|
---|
20 | // fails to compile on clang (xcode 7, 3.4, 3.6, 3.7), gcc 4.9
|
---|
21 | // prints 1 on gcc 5, clang 3.4
|
---|
22 | std::cout << std::is_default_constructible< fusion_pair1 >::value << std::endl;
|
---|
23 |
|
---|
24 | return 0;
|
---|
25 | }
|
---|