get_stricttag.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. // Copyright (c) 2001-2011 Hartmut Kaiser
  2. //
  3. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #if !defined(BOOST_SPIRIT_KARMA_GET_STRICTTAG_APR_22_2010_1007AM)
  6. #define BOOST_SPIRIT_KARMA_GET_STRICTTAG_APR_22_2010_1007AM
  7. #if defined(_MSC_VER)
  8. #pragma once
  9. #endif
  10. #include <boost/mpl/or.hpp>
  11. #include <boost/mpl/bool.hpp>
  12. #include <boost/spirit/home/support/common_terminals.hpp>
  13. namespace boost { namespace spirit { namespace karma { namespace detail
  14. {
  15. // the default mode for Karma is 'relaxed'
  16. template <
  17. typename Modifiers
  18. , typename StrictModifier = typename mpl::or_<
  19. has_modifier<Modifiers, tag::strict>
  20. , has_modifier<Modifiers, tag::relaxed> >::type>
  21. struct get_stricttag : mpl::false_ {};
  22. // strict mode is enforced only when tag::strict is on the modifiers list
  23. template <typename Modifiers>
  24. struct get_stricttag<Modifiers, mpl::true_>
  25. : has_modifier<Modifiers, tag::strict> {};
  26. }}}}
  27. #endif