12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #ifndef BOOST_HOF_GUARD_FUNCTION_STATIC_H
- #define BOOST_HOF_GUARD_FUNCTION_STATIC_H
- #include <boost/hof/detail/result_of.hpp>
- #include <boost/hof/reveal.hpp>
- namespace boost { namespace hof {
- template<class F>
- struct static_
- {
- struct failure
- : failure_for<F>
- {};
- const F& base_function() const
- BOOST_HOF_NOEXCEPT_CONSTRUCTIBLE(F)
- {
- static F f;
- return f;
- }
- BOOST_HOF_RETURNS_CLASS(static_);
- template<class... Ts>
- BOOST_HOF_SFINAE_RESULT(F, id_<Ts>...)
- operator()(Ts && ... xs) const
- BOOST_HOF_SFINAE_RETURNS(BOOST_HOF_CONST_THIS->base_function()(BOOST_HOF_FORWARD(Ts)(xs)...));
- };
- }}
- #endif
|