From 8ea1b8cda79258d32ef4239ecd595cb503a230d7 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Wed, 26 Jul 2023 13:28:49 -0700 Subject: [PATCH] Specifically exclude `__clang__` --- include/pybind11/cast.h | 2 +- include/pybind11/pytypes.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index 8be4d12d6..b3c8ebe17 100644 --- a/include/pybind11/cast.h +++ b/include/pybind11/cast.h @@ -1378,7 +1378,7 @@ inline namespace literals { String literal version of `arg` \endrst */ constexpr arg -#if defined(__GNUC__) && __GNUC__ < 5 +#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. diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h index 394f57128..580a4658e 100644 --- a/include/pybind11/pytypes.h +++ b/include/pybind11/pytypes.h @@ -1613,7 +1613,7 @@ inline namespace literals { String literal version of `str` \endrst */ inline str -#if defined(__GNUC__) && __GNUC__ < 5 +#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.