icase.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // icase.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_ICASE_HPP_EAN_10_04_2005
  8. #define BOOST_XPRESSIVE_DETAIL_CORE_ICASE_HPP_EAN_10_04_2005
  9. #include <boost/xpressive/detail/detail_fwd.hpp>
  10. #include <boost/xpressive/regex_constants.hpp>
  11. #include <boost/xpressive/detail/static/modifier.hpp>
  12. #include <boost/xpressive/detail/core/linker.hpp>
  13. #include <boost/xpressive/detail/utility/ignore_unused.hpp>
  14. namespace boost { namespace xpressive { namespace regex_constants
  15. {
  16. ///////////////////////////////////////////////////////////////////////////////
  17. /// \brief Makes a sub-expression case-insensitive.
  18. ///
  19. /// Use icase() to make a sub-expression case-insensitive. For instance,
  20. /// "foo" >> icase(set['b'] >> "ar") will match "foo" exactly followed by
  21. /// "bar" irrespective of case.
  22. detail::modifier_op<detail::icase_modifier> const icase = {{}, regex_constants::icase_};
  23. } // namespace regex_constants
  24. using regex_constants::icase;
  25. namespace detail
  26. {
  27. inline void ignore_unused_icase()
  28. {
  29. detail::ignore_unused(icase);
  30. }
  31. }
  32. }} // namespace boost::xpressive
  33. #endif