mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 21:25:13 +00:00
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] ```
This commit is contained in:
parent
61f7529305
commit
1fb7dc3c64
@ -1377,7 +1377,7 @@ inline namespace literals {
|
||||
/** \rst
|
||||
String literal version of `arg`
|
||||
\endrst */
|
||||
constexpr arg operator"" _a(const char *name, size_t) { return arg(name); }
|
||||
constexpr arg operator""_a(const char *name, size_t) { return arg(name); }
|
||||
} // namespace literals
|
||||
|
||||
PYBIND11_NAMESPACE_BEGIN(detail)
|
||||
|
@ -1612,7 +1612,7 @@ inline namespace literals {
|
||||
/** \rst
|
||||
String literal version of `str`
|
||||
\endrst */
|
||||
inline str operator"" _s(const char *s, size_t size) { return {s, size}; }
|
||||
inline str operator""_s(const char *s, size_t size) { return {s, size}; }
|
||||
} // namespace literals
|
||||
|
||||
/// \addtogroup pytypes
|
||||
|
Loading…
Reference in New Issue
Block a user