mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-31 23:30:30 +00:00
Replace C++17 syntax. Compiles with Debian clang 13 C++11 mode, but fails to link. Trying GitHub Actions anyway to see if there are any platforms that support https://en.cppreference.com/w/cpp/language/tu_local before C++20. Note that Debian clang 13 C++17 works locally.
This commit is contained in:
parent
ca5708ad96
commit
a598fe6931
@ -67,7 +67,9 @@ bool odr_guard_impl(const std::type_index &it_ti, const char *tc_id) {
|
||||
&& (tc_id_str[1] == '/' || tc_id_str[1] == '\\')) {
|
||||
tc_id_str = tc_id_str.substr(2);
|
||||
}
|
||||
auto [reg_iter, added] = odr_guard_registry().insert({it_ti, tc_id_str});
|
||||
auto ins = odr_guard_registry().insert({it_ti, tc_id_str});
|
||||
auto reg_iter = ins.first;
|
||||
auto added = ins.second;
|
||||
if (!added && reg_iter->second != tc_id_str) {
|
||||
std::system_error err(std::make_error_code(std::errc::state_not_recoverable),
|
||||
"ODR VIOLATION DETECTED: pybind11::detail::type_caster<"
|
||||
|
Loading…
Reference in New Issue
Block a user