You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the actual data members of std::source_location are not precisely specified, leaving these special member functions (copy/move constructor and copy/move assignment operator) implicitly declared might be insufficient to make them usable in constant evaluation.
I think it might be better to specify them as constexpr, either in the synopsis or in [source_location.syn]/3.
The text was updated successfully, but these errors were encountered:
frederick-vs-ja
changed the title
[support.srcloc] It's underspecified whether copy/move functions of source_location are constexpr
[support.srcloc] It's underspecified whether copy/move functions of source_location are constexpr or not
Aug 12, 2019
Or can we just specify that std::source_location is a trivially copyable type?
An implementation of std::experimental::source_location by gcc libstdc++ (which is the only implementation I can find) is already trivially copyable.
According to www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1208r6.pdf, it is intentionally unspecified (by absence) whether these functions are trivially copyable. We could assume the same applies to "constexpr". Let's add a note highlighting the "unspecified" fact.
Since the actual data members of
std::source_location
are not precisely specified, leaving these special member functions (copy/move constructor and copy/move assignment operator) implicitly declared might be insufficient to make them usable in constant evaluation.I think it might be better to specify them as
constexpr
, either in the synopsis or in [source_location.syn]/3.The text was updated successfully, but these errors were encountered: