/*============================================================================= Copyright (c) 2011-2019 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_FUNCTIONAL_BIND_LITERALS_HPP #define SPROUT_FUNCTIONAL_BIND_LITERALS_HPP #include #include #include #if SPROUT_USE_USER_DEFINED_LITERALS #include #include namespace sprout { // // placeholders_result // variadic_placeholders_result // template struct placeholders_result : public sprout::identity< sprout::placeholder::value> > {}; template struct variadic_placeholders_result : public sprout::identity< sprout::placeholder::value - sprout::detail::digits_to_int::value> > {}; namespace literals { namespace placeholders { // // _ // _tail // template SPROUT_CONSTEXPR typename sprout::placeholders_result::type operator"" _() { typedef typename sprout::placeholders_result::type type; return type(); } template SPROUT_CONSTEXPR typename sprout::variadic_placeholders_result::type operator"" _tail() { typedef typename sprout::variadic_placeholders_result::type type; return type(); } } // namespace placeholders using sprout::literals::placeholders::operator"" _; using sprout::literals::placeholders::operator"" _tail; } // namespace literals } // namespace sprout #endif // #if SPROUT_USE_USER_DEFINED_LITERALS #endif // #ifndef SPROUT_FUNCTIONAL_BIND_LITERALS_HPP