copy.hpp 931 B

12345678910111213141516171819202122232425262728293031
  1. /*=============================================================================
  2. Copyright (c) 2001-2012 Joel de Guzman
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. ==============================================================================*/
  6. #if !defined(BOOST_SPIRIT_COPY_FEBRUARY_7_2012_0159PM)
  7. #define BOOST_SPIRIT_COPY_FEBRUARY_7_2012_0159PM
  8. #include <boost/config.hpp>
  9. #include <boost/proto/proto.hpp>
  10. #if defined(_MSC_VER)
  11. #pragma once
  12. #endif
  13. #if !defined(BOOST_NO_CXX11_AUTO_DECLARATIONS)
  14. namespace boost { namespace spirit { namespace qi
  15. {
  16. template <typename Expr>
  17. typename boost::proto::result_of::deep_copy<Expr>::type
  18. copy(Expr const& expr)
  19. {
  20. BOOST_SPIRIT_ASSERT_MATCH(boost::spirit::qi::domain, Expr);
  21. return boost::proto::deep_copy(expr);
  22. }
  23. }}}
  24. #endif
  25. #endif