1 /*============================================================================= 2 Copyright (c) 2001-2012 Joel de Guzman 3 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 9 10 #include <boost/config.hpp> 11 #include <boost/typeof/typeof.hpp> 12 13 #if defined(_MSC_VER) 14 #pragma once 15 #endif 16 17 #include <boost/config.hpp> 18 19 // Support for c++11 auto. See: 20 // http://boost-spirit.com/home/articles/qi-example/zero-to-60-mph-in-2-seconds/ 21 // for more info 22 23 #if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) 24 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)); \ 31 /****/ 32 33 #endif 34 35 #endif 36