• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 // Copyright 2018 Daniel James.
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 #include <boost/blank.hpp>
7 #include <boost/static_assert.hpp>
8 #include <boost/core/lightweight_test.hpp>
9 #include <boost/type_traits/is_pod.hpp>
10 #include <boost/type_traits/is_empty.hpp>
11 #include <boost/type_traits/is_stateless.hpp>
12 #if !defined(BOOST_NO_IOSTREAM)
13 #include <sstream>
14 #endif
15 
main()16 int main()
17 {
18     BOOST_STATIC_ASSERT((boost::is_pod<boost::blank>::value));
19     BOOST_STATIC_ASSERT((boost::is_empty<boost::blank>::value));
20     BOOST_STATIC_ASSERT((boost::is_stateless<boost::blank>::value));
21 
22     boost::blank b1,b2;
23     BOOST_TEST(b1 == b2);
24     BOOST_TEST(b1 <= b2);
25     BOOST_TEST(b1 >= b2);
26     BOOST_TEST(!(b1 != b2));
27     BOOST_TEST(!(b1 < b2));
28     BOOST_TEST(!(b1 > b2));
29 
30 #if !defined(BOOST_NO_IOSTREAM)
31     std::stringstream s;
32     s << "(" << b1 << ")";
33     BOOST_TEST(s.str() == "()");
34 #endif
35 
36     return boost::report_errors();
37 }
38