1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #ifndef BOOST_CORE_FUNCTOR_HPP
- #define BOOST_CORE_FUNCTOR_HPP
- namespace boost::core {
- namespace functor_ns {
- template< auto Function >
- struct functor
- {
- template< typename... Args >
- auto operator() (Args&&... args) const noexcept(noexcept(Function(static_cast< Args&& >(args)...))) -> decltype(Function(static_cast< Args&& >(args)...))
- {
- return Function(static_cast< Args&& >(args)...);
- }
- };
- }
- using functor_ns::functor;
- }
- #endif
|