Author
anonymous
about 8 years ago
Language
Compiler
Options
Author
anonymous
about 8 years ago
$ prog.cc: In function 'int main()':
prog.cc:14:19: warning: unused variable 'n' [-Wunused-variable]
constexpr int n = size(foo); // works with gcc and clang
^
prog.cc: In instantiation of 'void use_size(const Foo<N>&) [with int N = 5]':
prog.cc:16:22: required from here
prog.cc:8:50: warning: unused variable 'n' [-Wunused-variable]
void use_size(const Foo<N>& foo) { constexpr int n = size(Foo<N>{}); }
^
prog.cc:8:29: warning: unused parameter 'foo' [-Wunused-parameter]
void use_size(const Foo<N>& foo) { constexpr int n = size(Foo<N>{}); }
~~~~~~~~~~~~~~^~~
Exit Code:
0