X10-FallbackStringifier.cpp 396 B

1234567891011121314151617181920212223
  1. // X10-FallbackStringifier.cpp
  2. // Test that defining fallbackStringifier compiles
  3. #include <string>
  4. // A catch-all stringifier
  5. template <typename T>
  6. std::string fallbackStringifier(T const&) {
  7. return "{ !!! }";
  8. }
  9. #define CATCH_CONFIG_MAIN
  10. #include <catch2/catch.hpp>
  11. struct foo {
  12. explicit operator bool() const {
  13. return true;
  14. }
  15. };
  16. TEST_CASE("aa") {
  17. REQUIRE(foo{});
  18. }