core.hpp 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // -- core.hpp -- Boost Lambda Library -------------------------------------
  2. //
  3. // Copyright (C) 2000 Gary Powell (powellg@amazon.com)
  4. // Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
  5. //
  6. // Distributed under the Boost Software License, Version 1.0. (See
  7. // accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. // For more information, see www.boost.org
  11. //
  12. // Includes the core of LL, without any real features for client:
  13. //
  14. // tuples, lambda functors, return type deduction templates,
  15. // argument substitution mechanism (select functions)
  16. //
  17. // Some functionality comes as well:
  18. // Assignment and subscript operators, as well as function
  19. // call operator for placeholder variables.
  20. // -------------------------------------------------------------------------
  21. #ifndef BOOST_LAMBDA_CORE_HPP
  22. #define BOOST_LAMBDA_CORE_HPP
  23. #include "boost/type_traits/transform_traits.hpp"
  24. #include "boost/type_traits/cv_traits.hpp"
  25. #include "boost/tuple/tuple.hpp"
  26. // inject some of the tuple names into lambda
  27. namespace boost {
  28. namespace lambda {
  29. using ::boost::tuples::tuple;
  30. using ::boost::tuples::null_type;
  31. } // lambda
  32. } // boost
  33. #include "boost/lambda/detail/lambda_config.hpp"
  34. #include "boost/lambda/detail/lambda_fwd.hpp"
  35. #include "boost/lambda/detail/arity_code.hpp"
  36. #include "boost/lambda/detail/actions.hpp"
  37. #include "boost/lambda/detail/lambda_traits.hpp"
  38. #include "boost/lambda/detail/function_adaptors.hpp"
  39. #include "boost/lambda/detail/return_type_traits.hpp"
  40. #include "boost/lambda/detail/select_functions.hpp"
  41. #include "boost/lambda/detail/lambda_functor_base.hpp"
  42. #include "boost/lambda/detail/lambda_functors.hpp"
  43. #include "boost/lambda/detail/ret.hpp"
  44. namespace boost {
  45. namespace lambda {
  46. namespace {
  47. // These are constants types and need to be initialised
  48. boost::lambda::placeholder1_type free1 = boost::lambda::placeholder1_type();
  49. boost::lambda::placeholder2_type free2 = boost::lambda::placeholder2_type();
  50. boost::lambda::placeholder3_type free3 = boost::lambda::placeholder3_type();
  51. boost::lambda::placeholder1_type& _1 = free1;
  52. boost::lambda::placeholder2_type& _2 = free2;
  53. boost::lambda::placeholder3_type& _3 = free3;
  54. // _1, _2, ... naming scheme by Peter Dimov
  55. } // unnamed
  56. } // lambda
  57. } // boost
  58. #endif //BOOST_LAMBDA_CORE_HPP