+2013-11-19 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/experimental/string_view (_S_max_size): Remove.
+ (basic_string_view<>::max_size): Adjust.
+ * testsuite/experimental/string_view/capacity/1.cc: Clean-up.
+ * testsuite/experimental/string_view/inserters/pod/10081-out.cc:
+ Likewise.
+
2013-11-19 Jonathan Wakely <jwakely.gcc@gmail.com>
* doc/xml/manual/status_cxx2014.xml: Create new table for TS statuses.
constexpr basic_string_view(const basic_string_view&) noexcept = default;
template<typename _Allocator>
- basic_string_view(const basic_string<_CharT, _Traits, _Allocator>& __str) noexcept
+ basic_string_view(const basic_string<_CharT, _Traits,
+ _Allocator>& __str) noexcept
: _M_len{__str.length()}, _M_str{__str.data()}
{ }
constexpr size_type
max_size() const noexcept
- { return _S_max_size; }
+ { return ((npos - sizeof(size_type) - sizeof(void*))
+ / sizeof(value_type) / 4); }
constexpr bool
empty() const noexcept
}
private:
-
- // Compute max_size similarly to how string does it.
- static const size_type _S_max_size = (npos
- - sizeof(size_type) - sizeof(void*))
- / sizeof(value_type) / 4;
-
static constexpr const int
_S_compare(size_type __n1, size_type __n2) noexcept
{