diff --git a/include/boost/type_index/detail/compile_time_type_info.hpp b/include/boost/type_index/detail/compile_time_type_info.hpp index 2c1ae38..95469bd 100644 --- a/include/boost/type_index/detail/compile_time_type_info.hpp +++ b/include/boost/type_index/detail/compile_time_type_info.hpp @@ -196,11 +196,12 @@ constexpr ctti_skip skip() noexcept { return detail::make_ctti_skip(0, 0, ""); } template BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin) noexcept { + constexpr auto skip_value = detail::skip(); // to have the same `.until_runtime` value in code below const char* const it = detail::constexpr_search( begin, begin + ArrayLength, - skip().until_runtime, skip().until_runtime + skip().until_runtime_length + skip_value.until_runtime, skip_value.until_runtime + skip_value.until_runtime_length ); - return (it == begin + ArrayLength ? begin : it + skip().until_runtime_length); + return (it == begin + ArrayLength ? begin : it + skip_value.until_runtime_length); } template