/*============================================================================= Copyright (c) 2011-2017 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout Distributed under 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) =============================================================================*/ #ifndef SPROUT_WEED_TRAITS_PARSER_IS_PARSER_HPP #define SPROUT_WEED_TRAITS_PARSER_IS_PARSER_HPP #include #include #include #include #include #include #include #include namespace sprout { namespace weed { namespace traits { // // is_parser // template struct is_parser; template struct is_parser< T, typename std::enable_if< std::is_base_of::value && !std::is_const::value >::type > : public sprout::true_type {}; template struct is_parser< T, typename std::enable_if< sprout::weed::traits::is_expr::value && !std::is_const::value >::type > : public sprout::true_type {}; template struct is_parser< T, typename std::enable_if< sprout::weed::traits::is_char_type::value && !std::is_const::value >::type > : public sprout::true_type {}; template struct is_parser< T, typename std::enable_if< sprout::weed::traits::is_c_str::value && !std::is_const::value >::type > : public sprout::true_type {}; template struct is_parser< T, typename std::enable_if< std::is_const::value >::type > : public sprout::weed::traits::is_parser< typename std::remove_const::type > {}; } // namespace traits } // namespace weed } // namespace sprout #endif // #ifndef SPROUT_WEED_TRAITS_PARSER_IS_PARSER_HPP