From b376ba2fcf90b4d544ec15df2ee7bf8b27f7470c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20J=C3=A4rvi?= Date: Thu, 15 Nov 2001 20:47:16 +0000 Subject: [PATCH] lambda_development branch creation [SVN r11711] --- include/boost/lambda/bind.hpp | 27 + include/boost/lambda/casts.hpp | 217 +++ include/boost/lambda/construct.hpp | 216 +++ include/boost/lambda/control_structures.hpp | 27 + include/boost/lambda/core.hpp | 70 + include/boost/lambda/exceptions.hpp | 1723 +++++++++++++++++++ include/boost/lambda/lambda.hpp | 32 + include/boost/lambda/memory.hpp | 158 ++ 8 files changed, 2470 insertions(+) create mode 100644 include/boost/lambda/bind.hpp create mode 100644 include/boost/lambda/casts.hpp create mode 100644 include/boost/lambda/construct.hpp create mode 100644 include/boost/lambda/control_structures.hpp create mode 100644 include/boost/lambda/core.hpp create mode 100644 include/boost/lambda/exceptions.hpp create mode 100644 include/boost/lambda/lambda.hpp create mode 100644 include/boost/lambda/memory.hpp diff --git a/include/boost/lambda/bind.hpp b/include/boost/lambda/bind.hpp new file mode 100644 index 0000000..e8a92d4 --- /dev/null +++ b/include/boost/lambda/bind.hpp @@ -0,0 +1,27 @@ +// -- bind.hpp -- Boost Lambda Library -------------------------------------- + +// Copyright (C) 1999-2001 Jaakko Järvi (jaakko.jarvi@cs.utu.fi) +// Gary Powell (gwpowell@hotmail.com) +// +// Permission to copy, use, sell and distribute this software is granted +// provided this copyright notice appears in all copies. +// Permission to modify the code and to distribute modified code is granted +// provided this copyright notice appears in all copies, and a notice +// that the code was modified is included with the copyright notice. +// +// This software is provided "as is" without express or implied warranty, +// and with no claim as to its suitability for any purpose. +// +// For more information, see http://www.boost.org + +#ifndef BOOST_LAMBDA_BIND_HPP +#define BOOST_LAMBDA_BIND_HPP + +#include "boost/lambda/core.hpp" + +#include "boost/lambda/detail/bind_functions.hpp" + +//#include "bind/make_void.hpp" +//#include "bind/ret.hpp" + +#endif diff --git a/include/boost/lambda/casts.hpp b/include/boost/lambda/casts.hpp new file mode 100644 index 0000000..de9d77e --- /dev/null +++ b/include/boost/lambda/casts.hpp @@ -0,0 +1,217 @@ +// - casts.hpp -- BLambda Library ------------- +// +// Copyright (C) 2000 Gary Powell (gary.powell@sierra.com) +// Copyright (C) 1999, 2000 Jaakko Järvi (jaakko.jarvi@cs.utu.fi) +// +// Permission to copy, use, sell and distribute this software is granted +// provided this copyright notice appears in all copies. +// Permission to modify the code and to distribute modified code is granted +// provided this copyright notice appears in all copies, and a notice +// that the code was modified is included with the copyright notice. +// +// This software is provided "as is" without express or implied warranty, +// and with no claim as to its suitability for any purpose. +// +// 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; + +// 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); + } +}; + +class typeid_action { +public: + template + static RET apply(Arg1 &a1) { + return typeid(a1); + } +}; + + +// return types of casting lambda_functors (all "T" type.) + +template