1 /*=============================================================================
2 Copyright (c) 2001-2012 Joel de Guzman
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 #if !defined(BOOST_SPIRIT_AUTO_FEBRUARY_7_2012_0159PM)
8 #define BOOST_SPIRIT_AUTO_FEBRUARY_7_2012_0159PM
10 #include <boost/config.hpp>
11 #include <boost/typeof/typeof.hpp>
17 #include <boost/config.hpp>
19 // Support for c++11 auto. See:
20 // http://boost-spirit.com/home/articles/qi-example/zero-to-60-mph-in-2-seconds/
23 #if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS)
25 #define BOOST_SPIRIT_AUTO(domain_, name, expr) \
26 typedef boost::proto::result_of:: \
27 deep_copy<BOOST_TYPEOF(expr)>::type name##_expr_type; \
28 BOOST_SPIRIT_ASSERT_MATCH( \
29 boost::spirit::domain_::domain, name##_expr_type); \
30 BOOST_AUTO(name, boost::proto::deep_copy(expr)); \