Fix Wreserved-identifier for UDLs in Catch2

See #578
This commit is contained in:
Martin Hořeňovský
2021-08-19 19:06:23 +02:00
parent edad4d0af7
commit 4113a12c69
3 changed files with 21 additions and 4 deletions

View File

@@ -114,8 +114,8 @@ namespace Catch {
};
namespace literals {
Approx operator "" _a(long double val);
Approx operator "" _a(unsigned long long val);
Approx operator ""_a(long double val);
Approx operator ""_a(unsigned long long val);
} // end namespace literals
template<>

View File

@@ -98,12 +98,12 @@ namespace Catch {
};
constexpr auto operator "" _sr( char const* rawChars, std::size_t size ) noexcept -> StringRef {
constexpr auto operator ""_sr( char const* rawChars, std::size_t size ) noexcept -> StringRef {
return StringRef( rawChars, size );
}
} // namespace Catch
constexpr auto operator "" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef {
constexpr auto operator ""_catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef {
return Catch::StringRef( rawChars, size );
}