https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80841

--- Comment #4 from Jason Bell <cipherjason at hotmail dot com> ---
(In reply to Daniel Krügler from comment #3)
> (In reply to Jason Bell from comment #2)
> > Thanks that's a good reduced example.  I've changed it slightly so it works
> > with constexpr input.
> 
> But that is just adding additional complexity: The constexpr declaration is
> unnecessary when you provide an argument of reference type to a non-type
> template of reference type.

I agree that should be the case but with my GCC compiler (6.3.1) on C++14 mode
I get an error from that... "error: the value of ‘input’ is not usable in a
constant expression" even though it's used as a reference.  If I static cast it
this problem goes away, but then I get different behaviour on Clang with
C++14...  So the constexpr version seems a bit more portable for testing this
particular issue.

Reply via email to