PageRenderTime 70ms CodeModel.GetById 63ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/spirit/home/qi/what.hpp

http://hadesmem.googlecode.com/
C++ Header | 33 lines | 18 code | 5 blank | 10 comment | 0 complexity | 71f07deeaf84265ba8c7b478bc19688d MD5 | raw file
 1/*=============================================================================
 2    Copyright (c) 2001-2011 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_WHAT_APRIL_21_2007_0732AM)
 8#define BOOST_SPIRIT_WHAT_APRIL_21_2007_0732AM
 9
10#if defined(_MSC_VER)
11#pragma once
12#endif
13
14#include <boost/mpl/assert.hpp>
15#include <boost/spirit/home/support/info.hpp>
16#include <boost/spirit/home/qi/meta_compiler.hpp>
17
18namespace boost { namespace spirit { namespace qi
19{
20    template <typename Expr>
21    inline info what(Expr const& expr)
22    {
23        // Report invalid expression error as early as possible.
24        // If you got an error_expr_is_not_convertible_to_a_parser
25        // error message here, then the expression (expr) is not a
26        // valid spirit qi expression.
27        BOOST_SPIRIT_ASSERT_MATCH(qi::domain, Expr);
28        return compile<qi::domain>(expr).what(unused);
29    }
30}}}
31
32#endif
33