1 /*=============================================================================
2 Copyright (c) 1998-2003 Joel de Guzman
3 http://spirit.sourceforge.net/
5 Use, modification and distribution is subject to the Boost Software
6 License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 http://www.boost.org/LICENSE_1_0.txt)
8 =============================================================================*/
9 #if !defined(BOOST_SPIRIT_MATCH_IPP)
10 #define BOOST_SPIRIT_MATCH_IPP
13 namespace boost { namespace spirit {
15 BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
18 inline match<T>::match()
22 inline match<T>::match(std::size_t length_)
23 : len(length_), val() {}
26 inline match<T>::match(std::size_t length_, ctor_param_t val_)
27 : len(length_), val(val_) {}
31 match<T>::operator!() const
38 match<T>::length() const
45 match<T>::has_valid_attribute() const
47 return val.is_initialized();
51 inline typename match<T>::return_t
52 match<T>::value() const
54 BOOST_SPIRIT_ASSERT(val.is_initialized());
60 match<T>::swap(match& other)
62 std::swap(len, other.len);
63 std::swap(val, other.val);
66 inline match<nil_t>::match()
69 inline match<nil_t>::match(std::size_t length_)
72 inline match<nil_t>::match(std::size_t length_, nil_t)
76 match<nil_t>::operator!() const
82 match<nil_t>::has_valid_attribute() const
88 match<nil_t>::length() const
94 match<nil_t>::value() const
100 match<nil_t>::value(nil_t) {}
103 match<nil_t>::swap(match<nil_t>& other)
105 std::swap(len, other.len);
108 BOOST_SPIRIT_CLASSIC_NAMESPACE_END
110 }} // namespace boost::spirit