• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Assign library
2 //
3 //  Copyright Thorsten Ottosen 2003-2004. Use, modification and
4 //  distribution is subject to the Boost Software License, Version
5 //  1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 //  http://www.boost.org/LICENSE_1_0.txt)
7 //
8 // For more information, see http://www.boost.org/libs/assign/
9 //
10 
11 #ifndef BOOST_ASSIGN_STD_SLIST_HPP
12 #define BOOST_ASSIGN_STD_SLIST_HPP
13 
14 #include <boost/config.hpp>
15 #ifdef BOOST_HAS_SLIST
16 
17 #if defined(_MSC_VER)
18 # pragma once
19 #endif
20 
21 #include <boost/assign/list_inserter.hpp>
22 #include <boost/move/utility.hpp>
23 #ifdef BOOST_SLIST_HEADER
24 # include BOOST_SLIST_HEADER
25 #else
26 # include <slist>
27 #endif
28 
29 namespace boost
30 {
31 namespace assign
32 {
33 #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
34     template< class V, class A, class V2 >
35     inline list_inserter< assign_detail::call_push_back< BOOST_STD_EXTENSION_NAMESPACE::slist<V,A> >, V >
operator +=(BOOST_STD_EXTENSION_NAMESPACE::slist<V,A> & c,V2 v)36     operator+=( BOOST_STD_EXTENSION_NAMESPACE::slist<V,A>& c, V2 v )
37     {
38         return push_back( c )( v );
39     }
40 #else
41     template< class V, class A, class V2 >
42     inline list_inserter< assign_detail::call_push_back< BOOST_STD_EXTENSION_NAMESPACE::slist<V,A> >, V >
43     operator+=( BOOST_STD_EXTENSION_NAMESPACE::slist<V,A>& c, V2&& v )
44     {
45         return push_back( c )( boost::forward<V2>(v) );
46     }
47 
48 #endif
49 }
50 }
51 
52 #endif // BOOST_HAS_SLIST
53 
54 #endif
55