Skip to content

Commit 1fb7dc3

Browse files
committed
Resolve new Clang dev C++11 errors:
``` The CXX compiler identification is Clang 17.0.0 ``` ``` pytypes.h:1615:23: error: identifier '_s' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator] ``` ``` cast.h:1380:26: error: identifier '_a' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator] ```
1 parent 61f7529 commit 1fb7dc3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/pybind11/cast.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ inline namespace literals {
13771377
/** \rst
13781378
String literal version of `arg`
13791379
\endrst */
1380-
constexpr arg operator"" _a(const char *name, size_t) { return arg(name); }
1380+
constexpr arg operator""_a(const char *name, size_t) { return arg(name); }
13811381
} // namespace literals
13821382

13831383
PYBIND11_NAMESPACE_BEGIN(detail)

include/pybind11/pytypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1612,7 +1612,7 @@ inline namespace literals {
16121612
/** \rst
16131613
String literal version of `str`
16141614
\endrst */
1615-
inline str operator"" _s(const char *s, size_t size) { return {s, size}; }
1615+
inline str operator""_s(const char *s, size_t size) { return {s, size}; }
16161616
} // namespace literals
16171617

16181618
/// \addtogroup pytypes

0 commit comments

Comments
 (0)