mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-12-23 21:25:49 +00:00
add pass_through utility function
This commit is contained in:
parent
3c4a048f25
commit
e593f87559
3 changed files with 25 additions and 1 deletions
|
@ -13,7 +13,6 @@
|
|||
#include <sprout/operation/append_back.hpp>
|
||||
#include <sprout/integer/static_pow.hpp>
|
||||
#include <sprout/type_traits/enabler_if.hpp>
|
||||
#include <sprout/workaround/std/cstddef.hpp>
|
||||
|
||||
//
|
||||
// hanoi
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <sprout/utility/as_lvalue.hpp>
|
||||
#include <sprout/utility/as_const.hpp>
|
||||
#include <sprout/utility/lvalue_forward.hpp>
|
||||
#include <sprout/utility/pass_through.hpp>
|
||||
#include <sprout/utility/limited.hpp>
|
||||
|
||||
#endif // #ifndef SPROUT_UTILITY_OPERATION_EXT_HPP
|
||||
|
|
24
sprout/utility/pass_through.hpp
Normal file
24
sprout/utility/pass_through.hpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*=============================================================================
|
||||
Copyright (c) 2011-2014 Bolero MURAKAMI
|
||||
https://github.com/bolero-MURAKAMI/Sprout
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
=============================================================================*/
|
||||
#ifndef SPROUT_UTILITY_PASS_THROUGH_HPP
|
||||
#define SPROUT_UTILITY_PASS_THROUGH_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// pass_through
|
||||
//
|
||||
template<typename T>
|
||||
constexpr T&&
|
||||
pass_through(T&& t) {
|
||||
return static_cast<T&&>(t);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_MATH_ACOS_HPP
|
Loading…
Reference in a new issue