This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]