mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 08:03:55 +00:00
clang 17 compatibility fixes (#4767)
* Copy clang 17 compatibility fixes from PR #4762 to a separate PR. * Add gcc:13 C++20 * Add silkeh/clang:16-bullseye C++20
This commit is contained in:
parent
f3e0602802
commit
17b614303f
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -302,6 +302,9 @@ jobs:
|
|||||||
- clang: 15
|
- clang: 15
|
||||||
std: 20
|
std: 20
|
||||||
container_suffix: "-bullseye"
|
container_suffix: "-bullseye"
|
||||||
|
- clang: 16
|
||||||
|
std: 20
|
||||||
|
container_suffix: "-bullseye"
|
||||||
|
|
||||||
name: "🐍 3 • Clang ${{ matrix.clang }} • C++${{ matrix.std }} • x64"
|
name: "🐍 3 • Clang ${{ matrix.clang }} • C++${{ matrix.std }} • x64"
|
||||||
container: "silkeh/clang:${{ matrix.clang }}${{ matrix.container_suffix }}"
|
container: "silkeh/clang:${{ matrix.clang }}${{ matrix.container_suffix }}"
|
||||||
@ -465,6 +468,7 @@ jobs:
|
|||||||
- { gcc: 10, std: 17 }
|
- { gcc: 10, std: 17 }
|
||||||
- { gcc: 11, std: 20 }
|
- { gcc: 11, std: 20 }
|
||||||
- { gcc: 12, std: 20 }
|
- { gcc: 12, std: 20 }
|
||||||
|
- { gcc: 13, std: 20 }
|
||||||
|
|
||||||
name: "🐍 3 • GCC ${{ matrix.gcc }} • C++${{ matrix.std }}• x64"
|
name: "🐍 3 • GCC ${{ matrix.gcc }} • C++${{ matrix.std }}• x64"
|
||||||
container: "gcc:${{ matrix.gcc }}"
|
container: "gcc:${{ matrix.gcc }}"
|
||||||
|
@ -1377,7 +1377,15 @@ inline namespace literals {
|
|||||||
/** \rst
|
/** \rst
|
||||||
String literal version of `arg`
|
String literal version of `arg`
|
||||||
\endrst */
|
\endrst */
|
||||||
constexpr arg operator"" _a(const char *name, size_t) { return arg(name); }
|
constexpr arg
|
||||||
|
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ < 5
|
||||||
|
operator"" _a // gcc 4.8.5 insists on having a space (hard error).
|
||||||
|
#else
|
||||||
|
operator""_a // clang 17 generates a deprecation warning if there is a space.
|
||||||
|
#endif
|
||||||
|
(const char *name, size_t) {
|
||||||
|
return arg(name);
|
||||||
|
}
|
||||||
} // namespace literals
|
} // namespace literals
|
||||||
|
|
||||||
PYBIND11_NAMESPACE_BEGIN(detail)
|
PYBIND11_NAMESPACE_BEGIN(detail)
|
||||||
|
@ -1612,7 +1612,15 @@ inline namespace literals {
|
|||||||
/** \rst
|
/** \rst
|
||||||
String literal version of `str`
|
String literal version of `str`
|
||||||
\endrst */
|
\endrst */
|
||||||
inline str operator"" _s(const char *s, size_t size) { return {s, size}; }
|
inline str
|
||||||
|
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ < 5
|
||||||
|
operator"" _s // gcc 4.8.5 insists on having a space (hard error).
|
||||||
|
#else
|
||||||
|
operator""_s // clang 17 generates a deprecation warning if there is a space.
|
||||||
|
#endif
|
||||||
|
(const char *s, size_t size) {
|
||||||
|
return {s, size};
|
||||||
|
}
|
||||||
} // namespace literals
|
} // namespace literals
|
||||||
|
|
||||||
/// \addtogroup pytypes
|
/// \addtogroup pytypes
|
||||||
|
Loading…
Reference in New Issue
Block a user