Fix MSVC deprecation warning for user-defined literals

Remove the space between "" and the suffix in user-defined literal
operators (e.g. operator ""_a instead of operator "" _a) to avoid
MSVC deprecation warning C5311.
This commit is contained in:
Zhe Feng
2026-07-27 20:08:43 +08:00
parent ee1450f268
commit c002f18535
5 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -73,10 +73,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