comparison DEPENDENCIES/generic/include/boost/spirit/home/x3/char/any_char.hpp @ 102:f46d142149f5

Whoops, finish that update
author Chris Cannam
date Mon, 07 Sep 2015 11:13:41 +0100
parents
children
comparison
equal deleted inserted replaced
101:c530137014c0 102:f46d142149f5
1 /*=============================================================================
2 Copyright (c) 2001-2014 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_X3_ANY_CHAR_APRIL_16_2006_1051AM)
8 #define BOOST_SPIRIT_X3_ANY_CHAR_APRIL_16_2006_1051AM
9
10 #if defined(_MSC_VER)
11 #pragma once
12 #endif
13
14 #include <boost/spirit/home/x3/char/literal_char.hpp>
15
16 namespace boost { namespace spirit { namespace x3
17 {
18 template <typename Encoding>
19 struct any_char : char_parser<any_char<Encoding>>
20 {
21 typedef typename Encoding::char_type char_type;
22 typedef Encoding encoding;
23 typedef char_type attribute_type;
24 static bool const has_attribute = true;
25
26 template <typename Char, typename Context>
27 bool test(Char ch_, Context const&) const
28 {
29 return ((sizeof(Char) <= sizeof(char_type)) || encoding::ischar(ch_));
30 }
31
32 template <typename Char>
33 literal_char<Encoding>
34 operator()(Char ch) const
35 {
36 return literal_char<Encoding>(ch);
37 }
38 };
39 }}}
40
41 #endif