整理
This commit is contained in:
29
include/boost/bind/apply.hpp
Normal file
29
include/boost/bind/apply.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef BOOST_BIND_APPLY_HPP_INCLUDED
|
||||
#define BOOST_BIND_APPLY_HPP_INCLUDED
|
||||
|
||||
//
|
||||
// apply.hpp
|
||||
//
|
||||
// Copyright 2002, 2003, 2024 Peter Dimov
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
template<class R> struct apply
|
||||
{
|
||||
typedef R result_type;
|
||||
|
||||
template<class F, class... A> result_type operator()( F&& f, A&&... a ) const
|
||||
{
|
||||
return static_cast<F&&>( f )( static_cast<A&&>( a )... );
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // #ifndef BOOST_BIND_APPLY_HPP_INCLUDED
|
||||
Reference in New Issue
Block a user