File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1372,7 +1372,7 @@ template <typename D>
1372
1372
template <typename T>
1373
1373
str_attr_accessor object_api<D>::attr_with_type_hint(const char *key) const {
1374
1374
#if !defined(__cpp_inline_variables)
1375
- static_assert (!std::is_same<T, T>::value,
1375
+ static_assert (always_false< T>::value,
1376
1376
" C++17 feature __cpp_inline_variables not available: "
1377
1377
" https://en.cppreference.com/w/cpp/language/static#Static_data_members" );
1378
1378
#endif
Original file line number Diff line number Diff line change @@ -627,6 +627,9 @@ struct instance {
627
627
static_assert (std::is_standard_layout<instance>::value,
628
628
" Internal error: `pybind11::detail::instance` is not standard layout!" );
629
629
630
+ template <typename >
631
+ struct always_false : std::false_type {};
632
+
630
633
// / from __cpp_future__ import (convenient aliases from C++14/17)
631
634
#if defined(PYBIND11_CPP14)
632
635
using std::conditional_t ;
You can’t perform that action at this time.
0 commit comments