#include <utility> struct Forward_declared_type; struct Foo{ Forward_declared_type get(char *buffer, std::size_t size); //works template<std::size_t size> Forward_declared_type get(char (&buffer)[size]){ return get(buffer, size); //how do I get this to compile? }};
Standard input is empty
prog.cpp: In member function 'Forward_declared_type Foo::get(char (&)[size])': prog.cpp:8:49: error: return type 'struct Forward_declared_type' is incomplete Forward_declared_type get(char (&buffer)[size]){ ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!