Author
anonymous
7 months ago
Language
C++
Compiler
gcc 13.2.0
Options
Warnings
Boost 1.83.0
C++2a
no pedantic
Author
anonymous
7 months ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.83.0-gcc-13.2.0/include -std=c++2a
In file included from prog.cc:1:
/opt/wandbox/gcc-13.2.0/include/c++/13.2.0/tuple: In instantiation of 'struct std::tuple_element<2, std::tuple<int, float> >':
/opt/wandbox/gcc-13.2.0/include/c++/13.2.0/bits/utility.h:135:11: required by substitution of 'template<long unsigned int __i, class _Tp> using std::tuple_element_t = typename std::tuple_element::type [with long unsigned int __i = 2; _Tp = std::tuple<int, float>]'
prog.cc:19:1: required by substitution of 'template<long unsigned int N> std::tuple_element_t<N, std::tuple<int, float> > foo(std::integral_constant<long unsigned int, N>, A) [with long unsigned int N = 2]'
prog.cc:21:26: required from here
/opt/wandbox/gcc-13.2.0/include/c++/13.2.0/tuple:1766:25: error: static assertion failed: tuple index must be in range
1766 | static_assert(__i < sizeof...(_Types), "tuple index must be in range");
| ~~~~^~~~~~~~~~~~~~~~~~~
/opt/wandbox/gcc-13.2.0/include/c++/13.2.0/tuple:1766:25: note: the comparison reduces to '(2 < 2)'
/opt/wandbox/gcc-13.2.0/include/c++/13.2.0/tuple:1768:13: error: no type named 'type' in 'struct std::_Nth_type<2, int, float>'
1768 | using type = typename _Nth_type<__i, _Types...>::type;
| ^~~~
Exit Code:
1