Created on 2011-03-08.00:00:00 last changed 17 months ago
Additional note (October, 2013):
This question also affects function return type deduction (the auto specifier) in member functions. For example, the following should presumably be prohibited, but the current wording is not clear:
struct S { static auto f() { return 42; } auto g() -> decltype(f()) { return f(); } };
The current wording of the Standard is not sufficiently clear regarding the interaction of class scope (which treats the bodies of member functions as effectively appearing after the class definition is complete) and the use of constexpr member functions within the class definition in contexts requiring constant expressions. For example, an array bound cannot use a constexpr member function that relies on the completeness of the class or on members that have not yet been declared, but the current wording does not appear to state that.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-06-15 19:36:24 | admin | set | messages: + msg7322 |
2023-06-15 19:36:24 | admin | set | status: open -> drafting |
2022-02-18 07:47:23 | admin | set | status: drafting -> open |
2013-10-14 00:00:00 | admin | set | messages: + msg4624 |
2011-03-08 00:00:00 | admin | create |