Skip to content

Commit f82118b

Browse files
Remove whitespace in operator literal declarations (#448)
* Remove whitespace in operator literal declarations * NEWS bullet --------- Co-authored-by: Davis Vaughan <davis@posit.co>
1 parent 2938879 commit f82118b

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# cpp11 (development version)
22

3+
* Fixed an issue related to `-Wdeprecated-literal-operator` (#447, @andrjohns).
4+
35
# cpp11 0.5.1
46

57
* cpp11 now requires R >=4.0.0, in line with the

inst/include/cpp11/R.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
namespace cpp11 {
5050
namespace literals {
5151

52-
constexpr R_xlen_t operator"" _xl(unsigned long long int value) { return value; }
52+
constexpr R_xlen_t operator""_xl(unsigned long long int value) { return value; }
5353

5454
} // namespace literals
5555

inst/include/cpp11/named_arg.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class named_arg {
3939

4040
namespace literals {
4141

42-
inline named_arg operator"" _nm(const char* name, std::size_t) { return named_arg(name); }
42+
inline named_arg operator""_nm(const char* name, std::size_t) { return named_arg(name); }
4343

4444
} // namespace literals
4545

inst/include/fmt/format.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2749,7 +2749,7 @@ constexpr auto operator""_a()
27492749
return {};
27502750
}
27512751
#else
2752-
constexpr auto operator"" _a(const char* s, size_t) -> detail::udl_arg<char> {
2752+
constexpr auto operator""_a(const char* s, size_t) -> detail::udl_arg<char> {
27532753
return {s};
27542754
}
27552755
#endif
@@ -2764,7 +2764,7 @@ constexpr auto operator"" _a(const char* s, size_t) -> detail::udl_arg<char> {
27642764
std::string message = "The answer is {}"_format(42);
27652765
\endrst
27662766
*/
2767-
constexpr auto operator"" _format(const char* s, size_t n)
2767+
constexpr auto operator""_format(const char* s, size_t n)
27682768
-> detail::udl_formatter<char> {
27692769
return {{s, n}};
27702770
}

0 commit comments

Comments
 (0)