https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70822
Bug ID: 70822
Summary: bogus "error: lvalue required as unary ‘&’ operand"
with C++14 parenthesized SCOPE_REF
Product: gcc
Version: 6.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ppalka at gcc dot gnu.org
Target Milestone: ---
$ cat scope.cc
struct a
{
static int b;
};
template <typename>
void
foo ()
{
&(a::b);
}
$ g++ -std=c++14 scope.cc
scope.cc: In function ‘void foo()’:
scope.cc:10:9: error: lvalue required as unary ‘&’ operand
&(a::b);