Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/single_include
diff options
context:
space:
mode:
authorMartin Hořeňovský2026-07-28 11:53:18 +0200
committerGitHub2026-07-28 11:53:18 +0200
commit9712bc8fe569b10b033b4d753c21658397fa17de (patch)
tree5561c33d0f89e2cf249b475a625a2da6f4144d64 /single_include
parentee1450f268dfd5c13aa8670ba97e93cabaf2e15d (diff)
parentc002f18535880a18cdaa7304af02cdfd5990279e (diff)
downloadcatch3-v2.x.tar.gz
Merge pull request #3184 from ZheFeng7110/fix/v2.x-user_literal-warnv2.x
(v2.x) Remove space in user-defined literal operators to fix MSVC C4996 warning
Diffstat (limited to 'single_include')
-rw-r--r--single_include/catch2/catch.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/single_include/catch2/catch.hpp b/single_include/catch2/catch.hpp
index 9b309bdd..3d7121cd 100644
--- a/single_include/catch2/catch.hpp
+++ b/single_include/catch2/catch.hpp
@@ -677,12 +677,12 @@ namespace Catch {
auto operator += ( std::string& lhs, StringRef const& sr ) -> std::string&;
auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&;
- 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 );
}
@@ -3177,8 +3177,8 @@ namespace Detail {
} // end namespace Detail
namespace literals {
- Detail::Approx operator "" _a(long double val);
- Detail::Approx operator "" _a(unsigned long long val);
+ Detail::Approx operator ""_a(long double val);
+ Detail::Approx operator ""_a(unsigned long long val);
} // end namespace literals
template<>
@@ -7920,10 +7920,10 @@ namespace Detail {
} // end namespace Detail
namespace literals {
- Detail::Approx operator "" _a(long double val) {
+ Detail::Approx operator ""_a(long double val) {
return Detail::Approx(val);
}
- Detail::Approx operator "" _a(unsigned long long val) {
+ Detail::Approx operator ""_a(unsigned long long val) {
return Detail::Approx(val);
}
} // end namespace literals