get_casetag.hpp 957 B

1234567891011121314151617181920212223242526272829
  1. // Copyright (c) 2001-2011 Hartmut Kaiser
  2. // Copyright (c) 2001-2011 Joel de Guzman
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. #if !defined(BOOST_SPIRIT_KARMA_GET_CASETAG_JANUARY_19_2009_1107AM)
  7. #define BOOST_SPIRIT_KARMA_GET_CASETAG_JANUARY_19_2009_1107AM
  8. #if defined(_MSC_VER)
  9. #pragma once
  10. #endif
  11. #include <boost/mpl/identity.hpp>
  12. #include <boost/spirit/home/support/unused.hpp>
  13. #include <boost/spirit/home/support/common_terminals.hpp>
  14. namespace boost { namespace spirit { namespace karma { namespace detail
  15. {
  16. template <typename Modifiers, bool case_modifier = false>
  17. struct get_casetag : mpl::identity<unused_type> {};
  18. template <typename Modifiers>
  19. struct get_casetag<Modifiers, true>
  20. : mpl::if_<has_modifier<Modifiers, tag::char_code_base<tag::lower> >
  21. , tag::lower, tag::upper> {};
  22. }}}}
  23. #endif