This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/68133] constexpr basic_string_view(const _CharT* __str)
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 28 Oct 2015 20:52:28 +0000
- Subject: [Bug libstdc++/68133] constexpr basic_string_view(const _CharT* __str)
- Auto-submitted: auto-generated
- References: <bug-68133-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68133
Daniel KrÃgler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler@googlemail.
| |com
--- Comment #1 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> ---
The implementation matches the required semantics (see
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4529.html). Please
note that std::char_traits::length is not constexpr because it is specified
that way and this is a known library issue, see
http://cplusplus.github.io/LWG/lwg-active.html#2232
The reason why the discussed string view constructor is nonetheless declared as
constexpr is due to the fact that a user *could* instantiate it with a
user-defined char trait class (not necessarily a specialization of
std::char_traits) that *has* a constexpr length function.
Based on this argumentation this issue looks invalid to me.