1 // Copyright (c) 2001-2011 Hartmut Kaiser
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)
6 #if !defined(BOOST_SPIRIT_QI_CREATE_NOV_21_2009_0444PM)
7 #define BOOST_SPIRIT_QI_CREATE_NOV_21_2009_0444PM
13 #include <boost/spirit/home/qi/auto/meta_create.hpp>
15 ///////////////////////////////////////////////////////////////////////////////
16 namespace boost { namespace spirit { namespace result_of
20 : spirit::traits::meta_create<qi::domain, T> {};
23 ///////////////////////////////////////////////////////////////////////////////
24 namespace boost { namespace spirit { namespace qi
26 // Main API function for parser creation from data type
28 typename result_of::create_parser<T>::type
31 return spirit::traits::meta_create<qi::domain, T>::call();
35 ///////////////////////////////////////////////////////////////////////////////
36 namespace boost { namespace spirit { namespace traits
38 // Meta function returning true if create_parser does return a valid
39 // parser for the given type T.
41 struct create_parser_exists
42 : meta_create_exists<qi::domain, T> {};