// - casts.hpp -- BLambda Library ------------- // // Copyright (C) 2000 Gary Powell (powellg@amazon.com) // Copyright (C) 1999, 2000 Jaakko Järvi (jaakko.jarvi@cs.utu.fi) // // 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) // // For more information, see http://www.boost.org // ----------------------------------------------- #if !defined(BOOST_LAMBDA_CASTS_HPP) #define BOOST_LAMBDA_CASTS_HPP #include namespace boost { namespace lambda { template class cast_action; template class static_cast_action; template class dynamic_cast_action; template class const_cast_action; template class reinterpret_cast_action; class typeid_action; class sizeof_action; // Cast actions template class cast_action > { public: template static RET apply(Arg1 &a1) { return static_cast(a1); } }; template class cast_action > { public: template static RET apply(Arg1 &a1) { return dynamic_cast(a1); } }; template class cast_action > { public: template static RET apply(Arg1 &a1) { return const_cast(a1); } }; template class cast_action > { public: template static RET apply(Arg1 &a1) { return reinterpret_cast(a1); } }; // typedid action class typeid_action { public: template static RET apply(Arg1 &a1) { return typeid(a1); } }; // sizeof action class sizeof_action { public: template static RET apply(Arg1 &a1) { return sizeof(a1); } }; // return types of casting lambda_functors (all "T" type.) template