Revert change disallowing construction of string_view/string_ref from rvalue string

This commit is contained in:
Marshall Clow committed 2017-03-28 15:17:09 +02:00
1 parent 00f02167e3
commit 6c4ab93573
3 files changed
+14 -14

No files matched your search

+6 -6
View File
@@ -94,12 +94,12 @@ namespace boost {
basic_string_view(const std::basic_string<charT, traits, Allocator>& str) BOOST_NOEXCEPT
: ptr_(str.data()), len_(str.length()) {}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
// Constructing a string_view from a temporary string is a bad idea
template<typename Allocator>
basic_string_view( std::basic_string<charT, traits, Allocator>&&)
= delete;
#endif
// #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
// // Constructing a string_view from a temporary string is a bad idea
// template<typename Allocator>
// basic_string_view( std::basic_string<charT, traits, Allocator>&&)
// = delete;
// #endif
BOOST_CONSTEXPR basic_string_view(const charT* str)
: ptr_(str), len_(traits::length(str)) {}