From 83fc247d4bb9ab23616a697f272d69f29f44447f Mon Sep 17 00:00:00 2001 From: Antonio Maiorano Date: Fri, 13 May 2022 20:14:57 +0000 Subject: [PATCH] tint: correctly define user-defined literals Remove the space between operator"" and the name of the function, as per the C++ spec. cppreference says as much, but its example code inserts a space, confusingly. Fixed: tint:1535 Change-Id: I46ac8fab74290db1a3c0085b56bc66a4c1d318f4 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90280 Reviewed-by: James Price Kokoro: Kokoro Commit-Queue: Antonio Maiorano --- src/tint/number.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/tint/number.h b/src/tint/number.h index 95a07e6b76..c3be236fe0 100644 --- a/src/tint/number.h +++ b/src/tint/number.h @@ -135,42 +135,42 @@ using f16 = Number; namespace tint::number_suffixes { /// Literal suffix for abstract integer literals -inline AInt operator"" _a(unsigned long long int value) { // NOLINT +inline AInt operator""_a(unsigned long long int value) { // NOLINT return AInt(static_cast(value)); } /// Literal suffix for abstract float literals -inline AFloat operator"" _a(long double value) { // NOLINT +inline AFloat operator""_a(long double value) { // NOLINT return AFloat(static_cast(value)); } /// Literal suffix for i32 literals -inline i32 operator"" _i(unsigned long long int value) { // NOLINT +inline i32 operator""_i(unsigned long long int value) { // NOLINT return i32(static_cast(value)); } /// Literal suffix for u32 literals -inline u32 operator"" _u(unsigned long long int value) { // NOLINT +inline u32 operator""_u(unsigned long long int value) { // NOLINT return u32(static_cast(value)); } /// Literal suffix for f32 literals -inline f32 operator"" _f(long double value) { // NOLINT +inline f32 operator""_f(long double value) { // NOLINT return f32(static_cast(value)); } /// Literal suffix for f32 literals -inline f32 operator"" _f(unsigned long long int value) { // NOLINT +inline f32 operator""_f(unsigned long long int value) { // NOLINT return f32(static_cast(value)); } /// Literal suffix for f16 literals -inline f16 operator"" _h(long double value) { // NOLINT +inline f16 operator""_h(long double value) { // NOLINT return f16(static_cast(value)); } /// Literal suffix for f16 literals -inline f16 operator"" _h(unsigned long long int value) { // NOLINT +inline f16 operator""_h(unsigned long long int value) { // NOLINT return f16(static_cast(value)); }