https://bugs.llvm.org/show_bug.cgi?id=43990
Richard Smith <richard-l...@metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #1 from Richard Smith <richard-l...@metafoo.co.uk> ---
This is a GCC bug (though one we see filed quite a lot; the language rules seem
to not match people's intuition here).
The evaluation semantics of the expression 'x' (because it's of reference type)
involve locating the object that the reference binds to, which can't be done in
this case because we don't know the value of the function parameter 'x'. So the
evaluation of the static_assert condition is non-constant, which is invalid.
In case you're interested, this is the language rule that's violated here:
http://eel.is/c++draft/expr.const#4.12
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs