domain.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*=============================================================================
  2. Copyright (c) 2005-2010 Joel de Guzman
  3. Copyright (c) 2010 Eric Niebler
  4. Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. ==============================================================================*/
  7. #ifndef BOOST_PHOENIX_CORE_DOMAIN_HPP
  8. #define BOOST_PHOENIX_CORE_DOMAIN_HPP
  9. #include <boost/phoenix/core/limits.hpp>
  10. #include <boost/proto/matches.hpp>
  11. #include <boost/proto/transform/call.hpp>
  12. #include <boost/proto/transform/when.hpp>
  13. #include <boost/proto/domain.hpp>
  14. namespace boost { namespace phoenix
  15. {
  16. template <typename Expr>
  17. struct actor;
  18. struct meta_grammar;
  19. struct phoenix_generator
  20. : proto::switch_<phoenix_generator>
  21. {
  22. template<typename Tag>
  23. struct case_
  24. : proto::otherwise<proto::call<proto::pod_generator<actor>(proto::_)> >
  25. {};
  26. };
  27. struct phoenix_domain
  28. : proto::domain<
  29. phoenix_generator
  30. , meta_grammar
  31. , proto::basic_default_domain
  32. >
  33. {
  34. template <typename T>
  35. struct as_child
  36. : as_expr<T>
  37. {};
  38. };
  39. }}
  40. #endif