#include <iostream> struct Matrix { static const int ColsAtCompileTime = 1; enum {RowsAtCompileTime = 42};}; void foo(const int& x) { std::cout << x << std::endl;} int main() { foo(Matrix::RowsAtCompileTime); // works foo(Matrix::ColsAtCompileTime); // error! return 0;}
Standard input is empty
/home/VWI5SC/ccjwkTOE.o: In function `main': prog.cpp:(.text.startup+0x20): undefined reference to `Matrix::ColsAtCompileTime' collect2: error: ld returned 1 exit status
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!