[Bug c++/58102] rejects valid initialization of constexpr object with mutable member

paolo.carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Mon Sep 15 16:27:00 GMT 2014


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

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Richard I'm trying to fix this bug, and while working on a draft I noticed that
current clang accepts:

struct A
{
  int i;
  mutable int j;
};

constexpr A a = { 0, 1 };
constexpr A b = a;

ie, doesn't reject the last line, whereas we actively do and we think we are
doing the right thing. What's your opinion?



More information about the Gcc-bugs mailing list