Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 1 | #ifndef NDNBOOST_SMART_PTR_DETAIL_SP_FORWARD_HPP_INCLUDED |
| 2 | #define NDNBOOST_SMART_PTR_DETAIL_SP_FORWARD_HPP_INCLUDED |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 3 | |
| 4 | // MS compatible compilers support #pragma once |
| 5 | |
| 6 | #if defined(_MSC_VER) && (_MSC_VER >= 1020) |
| 7 | # pragma once |
| 8 | #endif |
| 9 | |
| 10 | // detail/sp_forward.hpp |
| 11 | // |
| 12 | // Copyright 2008,2012 Peter Dimov |
| 13 | // |
| 14 | // Distributed under the Boost Software License, Version 1.0. |
| 15 | // See accompanying file LICENSE_1_0.txt or copy at |
| 16 | // http://www.boost.org/LICENSE_1_0.txt |
| 17 | |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame] | 18 | #include <ndnboost/config.hpp> |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 19 | |
| 20 | namespace ndnboost |
| 21 | { |
| 22 | |
| 23 | namespace detail |
| 24 | { |
| 25 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 26 | #if !defined( NDNBOOST_NO_CXX11_RVALUE_REFERENCES ) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 27 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 28 | template< class T > T&& sp_forward( T & t ) NDNBOOST_NOEXCEPT |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 29 | { |
| 30 | return static_cast< T&& >( t ); |
| 31 | } |
| 32 | |
| 33 | #endif |
| 34 | |
| 35 | } // namespace detail |
| 36 | |
| 37 | } // namespace ndnboost |
| 38 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 39 | #endif // #ifndef NDNBOOST_SMART_PTR_DETAIL_SP_FORWARD_HPP_INCLUDED |