/Src/Dependencies/Boost/boost/xpressive/detail/core/sub_match_impl.hpp

http://hadesmem.googlecode.com/ · C++ Header · 47 lines · 25 code · 9 blank · 13 comment · 1 complexity · 7c91e567b6e7e1a5e1661e5bdf4d83f8 MD5 · raw file

  1. ///////////////////////////////////////////////////////////////////////////////
  2. // sub_match_impl.hpp
  3. //
  4. // Copyright 2008 Eric Niebler. Distributed under the Boost
  5. // Software License, Version 1.0. (See accompanying file
  6. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. #ifndef BOOST_XPRESSIVE_DETAIL_CORE_SUB_MATCH_IMPL_HPP_EAN_10_04_2005
  8. #define BOOST_XPRESSIVE_DETAIL_CORE_SUB_MATCH_IMPL_HPP_EAN_10_04_2005
  9. // MS compatible compilers support #pragma once
  10. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  11. # pragma once
  12. #endif
  13. #include <boost/xpressive/sub_match.hpp>
  14. namespace boost { namespace xpressive { namespace detail
  15. {
  16. // TODO: sub_match_impl is a POD IFF BidiIter is POD. Pool allocation
  17. // of them can be made more efficient if they are. Or maybe all they
  18. // need is trivial constructor/destructor. (???)
  19. ///////////////////////////////////////////////////////////////////////////////
  20. // sub_match_impl
  21. //
  22. template<typename BidiIter>
  23. struct sub_match_impl
  24. : sub_match<BidiIter>
  25. {
  26. unsigned int repeat_count_;
  27. BidiIter begin_;
  28. bool zero_width_;
  29. sub_match_impl(BidiIter const &begin)
  30. : sub_match<BidiIter>(begin, begin)
  31. , repeat_count_(0)
  32. , begin_(begin)
  33. , zero_width_(false)
  34. {
  35. }
  36. };
  37. }}} // namespace boost::xpressive::detail
  38. #endif