default.cpp 490 B

123456789101112131415161718
  1. // Copyright Louis Dionne 2013-2017
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
  4. #include <boost/hana/core/default.hpp>
  5. namespace hana = boost::hana;
  6. template <typename T>
  7. struct method_impl : hana::default_ { };
  8. template <>
  9. struct method_impl<int> { };
  10. static_assert(hana::is_default<method_impl<void>>{}, "");
  11. static_assert(!hana::is_default<method_impl<int>>{}, "");
  12. int main() { }