1
0
forked from boostorg/mp11

Fix clang < 3.9 failures

This commit is contained in:
Peter Dimov
2017-06-08 18:21:55 +03:00
parent 08777edbc1
commit 19865f6145
3 changed files with 13 additions and 0 deletions

View File

@@ -62,6 +62,10 @@ int main()
static_assert( r.z == 3, "r.z == 3" ); static_assert( r.z == 3, "r.z == 3" );
} }
#if defined( __clang_major__ ) && __clang_major__ == 3 && __clang_minor__ < 9
// "error: default initialization of an object of const type 'const std::tuple<>' without a user-provided default constructor"
#else
{ {
constexpr std::tuple<> tp; constexpr std::tuple<> tp;
@@ -71,6 +75,8 @@ int main()
static_assert( r.y == 0, "r.y == 0" ); static_assert( r.y == 0, "r.y == 0" );
static_assert( r.z == 0, "r.z == 0" ); static_assert( r.z == 0, "r.z == 0" );
} }
#endif
} }
#endif #endif

View File

@@ -56,11 +56,17 @@ int main()
static_assert( r == 123, "r == 123" ); static_assert( r == 123, "r == 123" );
} }
#if defined( __clang_major__ ) && __clang_major__ == 3 && __clang_minor__ < 9
// "error: default initialization of an object of const type 'const std::tuple<>' without a user-provided default constructor"
#else
{ {
constexpr std::tuple<> tp; constexpr std::tuple<> tp;
constexpr auto r = boost::mp11::tuple_apply( h, tp ); constexpr auto r = boost::mp11::tuple_apply( h, tp );
static_assert( r == 11, "r == 11" ); static_assert( r == 11, "r == 11" );
} }
#endif
} }
#endif #endif

View File

@@ -38,6 +38,7 @@ int main()
} }
#if defined( __clang_major__ ) && __clang_major__ == 3 && __clang_minor__ < 9 #if defined( __clang_major__ ) && __clang_major__ == 3 && __clang_minor__ < 9
// "error: default initialization of an object of const type 'const std::tuple<>' without a user-provided default constructor"
#else #else
{ {