Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:12

0001 // Boost.Assign library
0002 //
0003 //  Copyright Thorsten Ottosen 2003-2004. Use, modification and
0004 //  distribution is subject to the Boost Software License, Version
0005 //  1.0. (See accompanying file LICENSE_1_0.txt or copy at
0006 //  http://www.boost.org/LICENSE_1_0.txt)
0007 //
0008 // For more information, see http://www.boost.org/libs/assign/
0009 //
0010 
0011 
0012 #ifndef BOOST_ASSIGN_STD_QUEUE_HPP
0013 #define BOOST_ASSIGN_STD_QUEUE_HPP
0014 
0015 #if defined(_MSC_VER)
0016 # pragma once
0017 #endif
0018 
0019 #include <boost/assign/list_inserter.hpp>
0020 #include <boost/config.hpp>
0021 #include <boost/move/utility.hpp>
0022 #include <queue>
0023 
0024 namespace boost
0025 {
0026 namespace assign
0027 {
0028 #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
0029 
0030     template< class V, class C, class V2 >
0031     inline list_inserter< assign_detail::call_push< std::queue<V,C> >, V >
0032     operator+=( std::queue<V,C>& c, V2 v )
0033     {
0034         return push( c )( v );
0035     }
0036     
0037     template< class V, class C, class V2 >
0038     inline list_inserter< assign_detail::call_push< std::priority_queue<V,C> >, V >
0039     operator+=( std::priority_queue<V,C>& c, V2 v )
0040     {
0041         return push( c )( v );
0042     }
0043 
0044 #else
0045 
0046     template< class V, class C, class V2 >
0047     inline list_inserter< assign_detail::call_push< std::queue<V, C> >, V >
0048     operator+=(std::queue<V, C>& c, V2&& v)
0049     {
0050         return push(c)(boost::forward<V2>(v));
0051     }
0052 
0053     template< class V, class C, class V2 >
0054     inline list_inserter< assign_detail::call_push< std::priority_queue<V, C> >, V >
0055     operator+=(std::priority_queue<V, C>& c, V2&& v)
0056     {
0057         return push(c)(boost::forward<V2>(v));
0058     }
0059 
0060 #endif
0061 }
0062 }
0063 
0064 #endif