Created on 2017-03-01.00:00:00 last changed 78 months ago
Proposed resolution:
This wording is relative to N4640.
Add to the end of the [string.view.template] section:
-1- In every specialization basic_string_view<charT, traits>, the type traits shall satisfy the character traits requirements (21.2), and the type traits::char_type shall name the same type as charT.
-?- All operations on iterator and const_iterator that are required to satisfy the random access iterator requirements are usable in constant expressions.
[ 2018-06 Rapperswil Wednesday issues processing ]
This was resolved by P0858, which was adopted in Jacksonville.
[ 2017-11 Albuquerque Saturday issues processing ]
P0858R0 (adopted on Sat; to be moved in Jacksonville) will resolve this.
[ 2017-03-04, Kona ]
Set priority to 2. Lisa and Alisdair to work with Antony to come up with better wording. The same wording can be used for 2897.
[ 2017-03-02, Tim Song comments ]
I don't believe the blanket "all operations" wording is quite correct.
First, T t; (required by DefaultConstructible) isn't usable in a constant expression if the iterator is a pointer, since it would leave it uninitialized. Second, an explicit destructor call u.~T() (required by Destructible) isn't usable if the iterator is a class type because it explicitly invokes a non-constexpr function (the destructor); see [expr.const]/2.2.[ 2017-03-02, Kona ]
Wording tweaks suggested by LWG applied.
Force the literal type requirement for the const_iterator in the std::basic_string_view so that iterators of std::basic_string_view could be used in constexpr functions.
History | |||
---|---|---|---|
Date | User | Action | Args |
2018-06-12 02:06:47 | admin | set | messages: + msg9903 |
2018-06-12 02:06:47 | admin | set | status: new -> resolved |
2017-11-13 19:00:40 | admin | set | messages: + msg9554 |
2017-03-14 03:14:09 | admin | set | messages: + msg9118 |
2017-03-02 18:49:03 | admin | set | messages: + msg9041 |
2017-03-02 17:41:20 | admin | set | messages: + msg9039 |
2017-03-01 17:33:58 | admin | set | messages: + msg9023 |
2017-03-01 00:00:00 | admin | create |