wrong.cpp 669 B

123456789101112131415161718192021222324
  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/detail/wrong.hpp>
  5. namespace hana = boost::hana;
  6. template <typename T, typename U>
  7. struct base_template {
  8. // Can't write this because the assertion would always fire up:
  9. // static_assert(false, "...");
  10. // So instead we write this:
  11. static_assert(hana::detail::wrong<base_template<T, U>>::value,
  12. "base_template does not have a valid default definition");
  13. };
  14. template <>
  15. struct base_template<int, int> {
  16. // something useful
  17. };
  18. int main() { }