Skip to content

Commit

Permalink
Resolve new Clang dev C++11 errors:
Browse files Browse the repository at this point in the history
```
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]
```
  • Loading branch information
Ralf W. Grosse-Kunstleve committed Jul 26, 2023
1 parent 61f7529 commit 1fb7dc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/pybind11/cast.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion include/pybind11/pytypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1fb7dc3

Please sign in to comment.