mirror of
https://github.com/boostorg/system.git
synced 2025-07-29 20:17:13 +02:00
Add (negative) tests for default constructability (refs #86)
This commit is contained in:
@ -12,6 +12,11 @@ struct X
|
||||
{
|
||||
};
|
||||
|
||||
struct Y
|
||||
{
|
||||
Y( int );
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
{
|
||||
@ -37,5 +42,17 @@ int main()
|
||||
BOOST_TEST( !r.has_error() );
|
||||
}
|
||||
|
||||
{
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_default_constructible<result<int>>));
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_default_constructible<result<int, int>>));
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_default_constructible<result<X>>));
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_default_constructible<result<X, int>>));
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_default_constructible<result<void>>));
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_default_constructible<result<void, int>>));
|
||||
|
||||
BOOST_TEST_TRAIT_FALSE((std::is_default_constructible<result<Y>>));
|
||||
BOOST_TEST_TRAIT_FALSE((std::is_default_constructible<result<Y, int>>));
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
Reference in New Issue
Block a user