old_concept_function_fail.cpp 546 B

1234567891011121314151617181920212223
  1. // (C) Copyright Jeremy Siek 2000.
  2. // Distributed under 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. #ifdef NDEBUG
  6. # undef NDEBUG
  7. #endif
  8. #include "old_concepts.hpp"
  9. // This file verifies that concepts written the old way still catch
  10. // errors in function context. This is not expected to work on
  11. // compilers without SFINAE support.
  12. struct foo { };
  13. int
  14. main()
  15. {
  16. boost::function_requires< old::EqualityComparableConcept<foo> >();
  17. return 0;
  18. }