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_KARMA_CREATE_NOV_21_2009_0340PM)
7 #define BOOST_SPIRIT_KARMA_CREATE_NOV_21_2009_0340PM
13 #include <boost/spirit/home/karma/auto/meta_create.hpp>
15 ///////////////////////////////////////////////////////////////////////////////
16 namespace boost { namespace spirit { namespace result_of
18 ///////////////////////////////////////////////////////////////////////////
20 struct create_generator
21 : spirit::traits::meta_create<karma::domain, T> {};
24 ///////////////////////////////////////////////////////////////////////////////
25 namespace boost { namespace spirit { namespace karma
27 // Main API function for generator creation from data type
29 typename result_of::create_generator<T>::type
32 return spirit::traits::meta_create<karma::domain, T>::call();
36 ///////////////////////////////////////////////////////////////////////////////
37 namespace boost { namespace spirit { namespace traits
39 // Meta function returning true if create_generator does return a valid
40 // generator for the given type T.
42 struct create_generator_exists
43 : meta_create_exists<karma::domain, T> {};