Alias std::launder when it is available
[folly.git] / folly / Range.h
index ce3e1fe8065346a54a2363045283c7faaaa8bde3..6a8161d251fd27eed2f9bb62079428fb920a4588 100644 (file)
@@ -481,15 +481,11 @@ class Range : private boost::totally_ordered<Range<Iter>> {
     return Tgt(b_, size());
   }
   // Works only for Range<const char*> and Range<char*>
-  template <typename Tgt = std::string>
-  auto str() const
-      -> decltype(Tgt(std::declval<Iter const&>(), std::declval<size_type>())) {
-    return to<Tgt>();
+  std::string str() const {
+    return to<std::string>();
   }
-  template <typename Tgt = std::string>
-  auto toString() const
-      -> decltype(Tgt(std::declval<Iter const&>(), std::declval<size_type>())) {
-    return to<Tgt>();
+  std::string toString() const {
+    return to<std::string>();
   }
 
   const_range_type castToConst() const {
@@ -1374,8 +1370,8 @@ constexpr Range<wchar_t const*> operator"" _sp(
     size_t len) noexcept {
   return Range<wchar_t const*>(str, len);
 }
-} // inline namespace string_piece_literals
-} // inline namespace literals
+} // namespace string_piece_literals
+} // namespace literals
 
 } // namespace folly