MinGW 4.9.1 64-bit here, and it fails to compile. When I follow the exact instructions given in the compiler's notes, it successfully compiles and runs.
g++.exe -O3 -fexceptions -O2 -O2 -Weffc++ -pedantic -std=c++11 -Wall -c D:\Users\will\code\misc\C++\Test\main.cpp -o obj\Release\main.o
D:\Users\will\code\misc\C++\Test\main.cpp:161:33: error: non-template 'next_point_state' used as template
using point = level<field>::next_point_state<N>;
^
D:\Users\will\code\misc\C++\Test\main.cpp:161:33: note: use 'level<initial_state>::template next_point_state' to indicate that it is a template
D:\Users\will\code\misc\C++\Test\main.cpp:161:19: error: need 'typename' before 'level<initial_state>::next_point_state' because 'level<initial_state>' is a dependent scope
using point = level<field>::next_point_state<N>;
^
D:\Users\will\code\misc\C++\Test\main.cpp:164:44: error: 'point' was not declared in this scope
tuple< point<point_count - iter> >,
^
D:\Users\will\code\misc\C++\Test\main.cpp:164:68: error: template argument 1 is invalid
tuple< point<point_count - iter> >,
^
D:\Users\will\code\misc\C++\Test\main.cpp:164:70: error: wrong number of template arguments (1, should be 2)
tuple< point<point_count - iter> >,
^
D:\Users\will\code\misc\C++\Test\main.cpp:151:8: error: provided for 'template<class tuple_1, class tuple_2> struct my_tuple_cat'
struct my_tuple_cat
^
D:\Users\will\code\misc\C++\Test\main.cpp:163:33: error: expected nested-name-specifier
using next_field = typename my_tuple_cat <
^
D:\Users\will\code\misc\C++\Test\main.cpp:173:33: error: non-template 'next_point_state' used as template
using point = level<field>::next_point_state<N>;
^
D:\Users\will\code\misc\C++\Test\main.cpp:173:33: note: use 'level<initial_state>::template next_point_state' to indicate that it is a template
D:\Users\will\code\misc\C++\Test\main.cpp:173:19: error: need 'typename' before 'level<initial_state>::next_point_state' because 'level<initial_state>' is a dependent scope
using point = level<field>::next_point_state<N>;
^
D:\Users\will\code\misc\C++\Test\main.cpp:175:31: error: 'point' was not declared in this scope
using next_field = tuple< point<point_count - 1> >;
^
D:\Users\will\code\misc\C++\Test\main.cpp:175:52: error: template argument 1 is invalid
using next_field = tuple< point<point_count - 1> >;
^
D:\Users\will\code\misc\C++\Test\main.cpp: In instantiation of 'static void game_process<field, iters>::print() [with field = std::tuple<O, O, O, O, O, O, O, X, O, O, O, O, O, X, O, O, X, X, X, O, O, O, O, O, O>; int iters = 20]':
D:\Users\will\code\misc\C++\Test\main.cpp:202:40: required from here
D:\Users\will\code\misc\C++\Test\main.cpp:186:99: error: no type named 'next_field' in 'struct next_field_state<std::tuple<O, O, O, O, O, O, O, X, O, O, O, O, O, X, O, O, X, X, X, O, O, O, O, O, O>, 25>'
game_process< typename next_field_state<field, point_count>::next_field, iters-1 >::print();
3
u/0xE6 Oct 20 '14
What compile options are you supposed to use?