https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62222
Bug ID: 62222
Summary: 'tuple_element_t' was not declared in this scope
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tower120 at gmail dot com
In the following code (http://coliru.stacked-crooked.com/a/f78031af320b07f0)
#include <iostream>
#include <tuple>
#include <stdlib.h>
#include <array>
using namespace std;
int main(){
using T = tuple<int, float, char>;
using el = tuple_element_t<0, T>;
}
main.cpp: In function 'int main()':
main.cpp:12:16: error: 'tuple_element_t' does not name a type
using el = tuple_element_t<0, T>
^
Compiled with gcc 4.9 MinGW Windows.
g++ -std=c++1y -O3 -Winline -Wextra -pthread -pedantic-errors main.cpp -lm &&
./a.out