Author
anonymous
almost 7 years ago
Language
Compiler
Options
Author
anonymous
almost 7 years ago
$
prog.cc: In instantiation of 'U g(T&, long int) [with T = volatile il; U = int*; decltype (((* U()), 0)) <anonymous> = 0]':
prog.cc:15:16: required from here
prog.cc:8:31: error: binding reference of type 'const il&' to 'volatile il' discards qualifiers
U g(T& t, long) { return begin(t); } // #1
~~~~~^~~
prog.cc:1:19: note: initializing argument 1 of 'il::il(const il&)'
struct il { il(); il(const il&); };
^~
prog.cc:3:6: note: initializing argument 1 of 'int* begin(il)'
int* begin(il);
^~~~~
Exit Code:
1