is_maybe.hpp 651 B

1234567891011121314151617181920212223242526
  1. // Copyright Daniel Wallin, David Abrahams 2010. Use, modification and
  2. // distribution is subject to the Boost Software License, Version 1.0. (See
  3. // accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef BOOST_PARAMETER_IS_MAYBE_050329_HPP
  6. #define BOOST_PARAMETER_IS_MAYBE_050329_HPP
  7. #include <boost/type_traits/is_base_and_derived.hpp>
  8. namespace boost {
  9. namespace parameter {
  10. namespace aux {
  11. struct maybe_base {};
  12. template <class T>
  13. struct is_maybe
  14. : is_base_and_derived<maybe_base, T>
  15. {};
  16. } // namespace aux
  17. } // namespace parameter
  18. } // namespace boost
  19. #endif // BOOST_PARAMETER_IS_MAYBE_050329_HPP