Revert change disallowing construction of string_view/string_ref from rvalue string

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

View File

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