Index: include/tuple =================================================================== --- include/tuple +++ include/tuple @@ -1012,10 +1012,15 @@ template struct __find_exactly_one_checked { - static constexpr bool __matches[] = {is_same<_T1, _Args>::value...}; - static constexpr size_t value = __find_detail::__find_idx(0, __matches); - static_assert (value != __not_found, "type not found in type list" ); - static_assert(value != __ambiguous,"type occurs more than once in type list"); + inline _LIBCPP_INLINE_VISIBILITY + static constexpr size_t __index() + { + constexpr bool __matches[] = {is_same<_T1, _Args>::value...}; + return __find_detail::__find_idx(0, __matches); + } + static constexpr size_t value = __index(); + static_assert(value != __not_found, "type not found in type list" ); + static_assert(value != __ambiguous, "type occurs more than once in type list"); }; template