Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81439 - trunk/boost/algorithm
From: marshall_at_[hidden]
Date: 2012-11-20 13:15:43


Author: marshall
Date: 2012-11-20 13:15:42 EST (Tue, 20 Nov 2012)
New Revision: 81439
URL: http://svn.boost.org/trac/boost/changeset/81439

Log:
Remove lambdas
Text files modified:
   trunk/boost/algorithm/string_ref.hpp | 17 +----------------
   1 files changed, 1 insertions(+), 16 deletions(-)

Modified: trunk/boost/algorithm/string_ref.hpp
==============================================================================
--- trunk/boost/algorithm/string_ref.hpp (original)
+++ trunk/boost/algorithm/string_ref.hpp 2012-11-20 13:15:42 EST (Tue, 20 Nov 2012)
@@ -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 <typename charT, typename traits>
         class string_ref_traits_eq {
         public:
@@ -89,11 +89,6 @@
         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<charT> il); // TODO
-#endif
-
 #ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
         template<typename Allocator>
         explicit operator std::basic_string<charT, traits, Allocator>() const {
@@ -180,13 +175,8 @@
             }
         
         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<charT, traits> ( 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 @@
             }
 
         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<charT, traits> ( 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 );
             }
         


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk