[Home]CPPTM Answers - Exercise 4-0

BOOST WIKI | RecentChanges | Preferences | Page List | Links List

 // (by Ariel Badichi)
 #include <boost/static_assert.hpp>
 #include <boost/type_traits/add_pointer.hpp>
 #include <boost/mpl/or.hpp>
 #include <boost/mpl/and.hpp>
 #include <boost/mpl/bool.hpp>

 namespace mpl = boost::mpl;

 class error {}; // no ::type

 int main()
 {
     BOOST_STATIC_ASSERT((mpl::or_<mpl::true_, error>::type::value));
     BOOST_STATIC_ASSERT((!mpl::and_<mpl::false_, error>::type::value));

     return 0;
 }

BOOST WIKI | RecentChanges | Preferences | Page List | Links List
Edit text of this page | View other revisions
Last edited March 26, 2005 8:51 pm (diff)
Search:
Disclaimer: This site not officially maintained by Boost Developers