/* Copyright 2018 Glen Joseph Fernandes (glenjofe@gmail.com) Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #include #include struct T1 { }; struct S1 : boost::empty_value { }; struct T2 { int value; }; struct S2 : boost::empty_value , boost::empty_value { }; struct S3 : boost::empty_value , boost::empty_value { }; struct T3 { }; struct S4 : boost::empty_value , boost::empty_value { }; struct S5 : boost::empty_value , boost::empty_value { }; struct S6 : boost::empty_value , boost::empty_value , boost::empty_value { }; int main() { BOOST_TEST(sizeof(S1) == sizeof(T1)); BOOST_TEST(sizeof(S2) == sizeof(T2)); BOOST_TEST(sizeof(S3) > sizeof(T2)); BOOST_TEST(sizeof(S4) == sizeof(T1)); BOOST_TEST(sizeof(S5) > sizeof(T1)); BOOST_TEST(sizeof(S6) == sizeof(T2)); return boost::report_errors(); } #else int main() { return 0; } #endif