summaryrefslogtreecommitdiff
path: root/projects/ExtraTests/X10-FallbackStringifier.cpp
blob: 0522d1af8735412258c09a72ec1586cd6f9b0c1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// X10-FallbackStringifier.cpp
// Test that defining fallbackStringifier compiles

#include <string>

// A catch-all stringifier
template <typename T>
std::string fallbackStringifier(T const&) {
    return "{ !!! }";
}

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>

struct foo {
    explicit operator bool() const {
        return true;
    }
};

TEST_CASE("aa") {
    REQUIRE(foo{});
}