/usr/include/boost/spirit/home/classic/core/impl
Edit: /usr/include/boost/spirit/home/classic/core/impl/match.ipp (2407B)
/*=============================================================================
Copyright (c) 1998-2003 Joel de Guzman
http://spirit.sourceforge.net/
Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
#if !defined(BOOST_SPIRIT_MATCH_IPP)
#define BOOST_SPIRIT_MATCH_IPP
#include
namespace boost { namespace spirit {
BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
template
inline match::match()
: len(-1), val() {}
template
inline match::match(std::size_t length_)
: len(length_), val() {}
template
inline match::match(std::size_t length_, ctor_param_t val_)
: len(length_), val(val_) {}
template
inline bool
match::operator!() const
{
return len < 0;
}
template
inline std::ptrdiff_t
match::length() const
{
return len;
}
template
inline bool
match::has_valid_attribute() const
{
return val.is_initialized();
}
template
inline typename match::return_t
match::value() const
{
BOOST_SPIRIT_ASSERT(val.is_initialized());
return *val;
}
template
inline void
match::swap(match& other)
{
std::swap(len, other.len);
std::swap(val, other.val);
}
inline match::match()
: len(-1) {}
inline match::match(std::size_t length_)
: len(length_) {}
inline match::match(std::size_t length_, nil_t)
: len(length_) {}
inline bool
match::operator!() const
{
return len < 0;
}
inline bool
match::has_valid_attribute() const
{
return false;
}
inline std::ptrdiff_t
match::length() const
{
return len;
}
inline nil_t
match::value() const
{
return nil_t();
}
inline void
match::value(nil_t) {}
inline void
match::swap(match& other)
{
std::swap(len, other.len);
}
BOOST_SPIRIT_CLASSIC_NAMESPACE_END
}} // namespace boost::spirit
#endif