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

--- Comment #2 from simendsjo at simendsjo dot me ---
(In reply to Ville Voutilainen from comment #1)
> The constructors for Point are constexpr, but since p2 is not, passing
> it as an argument for scale() means that the invocation of scale() will not
> yield a constant expression. If you change the declaration of p2 to
> be
> constexpr Point p2 {10,10};
> the code will work. Clang agrees with gcc.

Then there are a couple of possibilities:
1. The spec is wrong
2. Bjarne Stroustrup misinterprets the spec
3. gcc and clang has the same bug

You're saying that 2. holds. In that case, send a mail to Stroustrup so he can
correct his book "Programming: Principles and Practice using C++".

Reply via email to