/*============================================================================= Copyright (c) 2011-2013 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_EXPR_MAKE_TERMINAL_HPP #define SPROUT_WEED_EXPR_MAKE_TERMINAL_HPP #include #include #include #include #include #include namespace sprout { namespace weed { // // make_terminal // template inline SPROUT_CONSTEXPR typename std::enable_if< !sprout::weed::traits::is_c_str< typename std::remove_reference::type >::value, typename sprout::weed::traits::terminal_of::type >::type make_terminal(Arg&& arg) { return typename sprout::weed::traits::terminal_of::type( sprout::forward(arg) ); } template inline SPROUT_CONSTEXPR typename std::enable_if< sprout::weed::traits::is_c_str< typename std::remove_reference::type >::value, typename sprout::weed::traits::terminal_of::type >::type make_terminal(Arg&& arg) { return typename sprout::weed::traits::terminal_of::type( sprout::to_string(sprout::forward(arg)) ); } } // namespace weed } // namespace sprout #endif // #ifndef SPROUT_WEED_EXPR_MAKE_TERMINAL_HPP