diff --git a/include/boost/algorithm/string_ref.hpp b/include/boost/algorithm/string_ref.hpp index d4ca4b2..08375f0 100644 --- a/include/boost/algorithm/string_ref.hpp +++ b/include/boost/algorithm/string_ref.hpp @@ -28,7 +28,7 @@ namespace boost { namespace detail { - // A helper functor for when we don't have lambdas + // A helper functor because sometimes we don't have lambdas template class string_ref_traits_eq { public: @@ -89,11 +89,6 @@ namespace boost { BOOST_CONSTEXPR basic_string_ref(const charT* str, size_type len) : ptr_(str), len_(len) {} -#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST -// !! How do I do this? Look how initializer_lists work! - basic_string_ref(std::initializer_list il); // TODO -#endif - #ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS template explicit operator std::basic_string() const { @@ -180,13 +175,8 @@ namespace boost { } size_type find(charT c) const { -#ifdef BOOST_NO_CXX11_LAMBDAS const_iterator iter = std::find_if ( this->cbegin (), this->cend (), detail::string_ref_traits_eq ( c )); -#else - const_iterator iter = std::find_if ( this->cbegin (), this->cend (), - [c] ( charT val ) { return traits::eq ( c, val ); } ); -#endif return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter ); } @@ -197,13 +187,8 @@ namespace boost { } size_type rfind(charT c) const { -#ifdef BOOST_NO_CXX11_LAMBDAS const_reverse_iterator iter = std::find_if ( this->crbegin (), this->crend (), detail::string_ref_traits_eq ( c )); -#else - const_reverse_iterator iter = std::find_if ( this->crbegin (), this->crend (), - [c] ( charT val ) { return traits::eq ( c, val ); } ); -#endif return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter ); }