diff --git a/include/pybind11/detail/descr.h b/include/pybind11/detail/descr.h index e5a5a77e2..fca4a60d6 100644 --- a/include/pybind11/detail/descr.h +++ b/include/pybind11/detail/descr.h @@ -122,7 +122,9 @@ struct int_to_str : int_to_str {}; template struct int_to_str<0, Digits...> { // WARNING: This only works with C++17 or higher. - static constexpr auto digits = descr(src_loc::here(), ('0' + Digits)...); + // src_loc not tracked (irrelevant in this situation, at least at the moment). + static constexpr auto digits + = descr(src_loc{nullptr, 0}, ('0' + Digits)...); }; // Ternary description (like std::conditional)