[libcxx] r285300 - Move 'quoted' for string_view from <string_view> to <iomanip> (where the other versions of 'quoted' live. No functional change.

Marshall Clow via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 27 08:10:08 PDT 2016


Author: marshall
Date: Thu Oct 27 10:10:07 2016
New Revision: 285300

URL: http://llvm.org/viewvc/llvm-project?rev=285300&view=rev
Log:
Move 'quoted' for string_view from <string_view> to <iomanip> (where the other versions of 'quoted' live. No functional change.

Modified:
    libcxx/trunk/include/iomanip
    libcxx/trunk/include/string_view

Modified: libcxx/trunk/include/iomanip
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/iomanip?rev=285300&r1=285299&r2=285300&view=diff
==============================================================================
--- libcxx/trunk/include/iomanip (original)
+++ libcxx/trunk/include/iomanip Thu Oct 27 10:10:07 2016
@@ -654,6 +654,15 @@ quoted ( basic_string <_CharT, _Traits,
 {
     return __quoted(__s, __delim, __escape);
 }
+
+template <class _CharT, class _Traits>
+__quoted_output_proxy<_CharT, const _CharT *, _Traits>
+quoted (basic_string_view <_CharT, _Traits> __sv,
+             _CharT __delim = _CharT('"'), _CharT __escape=_CharT('\\'))
+{
+    return __quoted_output_proxy<_CharT, const _CharT *, _Traits> 
+         ( __sv.data(), __sv.data() + __sv.size(), __delim, __escape );
+}
 #endif
 
 _LIBCPP_END_NAMESPACE_STD

Modified: libcxx/trunk/include/string_view
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string_view?rev=285300&r1=285299&r2=285300&view=diff
==============================================================================
--- libcxx/trunk/include/string_view (original)
+++ libcxx/trunk/include/string_view Thu Oct 27 10:10:07 2016
@@ -747,18 +747,6 @@ hash<basic_string_view<_CharT, _Traits>
     return __do_string_hash(__val.data(), __val.data() + __val.size());
 }
 
-#if _LIBCPP_STD_VER > 11
-
-template <class _CharT, class _Traits>
-__quoted_output_proxy<_CharT, const _CharT *, _Traits>
-quoted (basic_string_view <_CharT, _Traits> __sv,
-             _CharT __delim = _CharT('"'), _CharT __escape=_CharT('\\'))
-{
-    return __quoted_output_proxy<_CharT, const _CharT *, _Traits> 
-         ( __sv.data(), __sv.data() + __sv.size(), __delim, __escape );
-}
-#endif // _LIBCPP_STD_VER > 11
-
 _LIBCPP_END_NAMESPACE_STD
 
 #endif // _LIBCPP_STRING_VIEW




More information about the cfe-commits mailing list