Skip to content

Commit ce9fbd3

Browse files
authored
Merge pull request #387 from benedekkupper/fix-empty-pack-indexing
type_traits: fix empty pack indexing
2 parents 1c70f02 + 2652c04 commit ce9fbd3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎include/stdx/type_traits.hpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,10 @@ STDX_PRAGMA(diagnostic ignored "-Wc++26-extensions")
300300
#endif
301301
template <unsigned int N, typename... Ts>
302302
using nth_t =
303-
#if __cpp_pack_indexing >= 202311L
304-
Ts...[N];
305-
#elif __has_builtin(__type_pack_element)
303+
#if __has_builtin(__type_pack_element)
306304
__type_pack_element<N, Ts...>;
305+
#elif __cpp_pack_indexing >= 202311L
306+
Ts...[N];
307307
#else
308308
boost::mp11::mp_at_c<type_list<Ts...>, N>;
309309
#endif

0 commit comments

Comments
 (0)