Namespace our type traits in catch_meta

Previously they could conflict with user-defined type traits that
were in the global namespace.

Fixes #1548
This commit is contained in:
Martin Hořeňovský
2019-02-23 21:06:16 +01:00
parent ef5fd8d42f
commit 29b3b7ae6b
10 changed files with 87 additions and 46 deletions

View File

@@ -17,6 +17,11 @@ namespace foo {
};
}
namespace bar {
template <typename... Ts>
struct TypeList {};
}
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wmissing-declarations"
#endif
@@ -184,6 +189,11 @@ namespace { namespace CompilationTests {
STATIC_REQUIRE_FALSE( std::is_void<int>::value );
}
TEST_CASE("#1548", "[compilation]") {
using namespace bar;
REQUIRE(std::is_same<TypeList<int>, TypeList<int>>::value);
}
}} // namespace CompilationTests