Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/spirit/home/x3/char/any_char.hpp @ 118:770eb830ec19 emscripten
Typo fix
author | Chris Cannam |
---|---|
date | Wed, 18 May 2016 16:14:08 +0100 |
parents | f46d142149f5 |
children |
rev | line source |
---|---|
Chris@102 | 1 /*============================================================================= |
Chris@102 | 2 Copyright (c) 2001-2014 Joel de Guzman |
Chris@102 | 3 |
Chris@102 | 4 Distributed under the Boost Software License, Version 1.0. (See accompanying |
Chris@102 | 5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
Chris@102 | 6 ==============================================================================*/ |
Chris@102 | 7 #if !defined(BOOST_SPIRIT_X3_ANY_CHAR_APRIL_16_2006_1051AM) |
Chris@102 | 8 #define BOOST_SPIRIT_X3_ANY_CHAR_APRIL_16_2006_1051AM |
Chris@102 | 9 |
Chris@102 | 10 #if defined(_MSC_VER) |
Chris@102 | 11 #pragma once |
Chris@102 | 12 #endif |
Chris@102 | 13 |
Chris@102 | 14 #include <boost/spirit/home/x3/char/literal_char.hpp> |
Chris@102 | 15 |
Chris@102 | 16 namespace boost { namespace spirit { namespace x3 |
Chris@102 | 17 { |
Chris@102 | 18 template <typename Encoding> |
Chris@102 | 19 struct any_char : char_parser<any_char<Encoding>> |
Chris@102 | 20 { |
Chris@102 | 21 typedef typename Encoding::char_type char_type; |
Chris@102 | 22 typedef Encoding encoding; |
Chris@102 | 23 typedef char_type attribute_type; |
Chris@102 | 24 static bool const has_attribute = true; |
Chris@102 | 25 |
Chris@102 | 26 template <typename Char, typename Context> |
Chris@102 | 27 bool test(Char ch_, Context const&) const |
Chris@102 | 28 { |
Chris@102 | 29 return ((sizeof(Char) <= sizeof(char_type)) || encoding::ischar(ch_)); |
Chris@102 | 30 } |
Chris@102 | 31 |
Chris@102 | 32 template <typename Char> |
Chris@102 | 33 literal_char<Encoding> |
Chris@102 | 34 operator()(Char ch) const |
Chris@102 | 35 { |
Chris@102 | 36 return literal_char<Encoding>(ch); |
Chris@102 | 37 } |
Chris@102 | 38 }; |
Chris@102 | 39 }}} |
Chris@102 | 40 |
Chris@102 | 41 #endif |