/*============================================================================= 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_FUNCTIONAL_BIND_UDL_HPP #define SPROUT_FUNCTIONAL_BIND_UDL_HPP #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 placeholders { namespace udl { // // _ // _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 udl } // namespace placeholders namespace udl { namespace placeholders { using sprout::placeholders::udl::operator"" _; using sprout::placeholders::udl::operator"" _tail; } // namespace placeholders using sprout::placeholders::udl::operator"" _; using sprout::placeholders::udl::operator"" _tail; } // namespace udl } // namespace sprout #endif // #if SPROUT_USE_USER_DEFINED_LITERALS #endif // #ifndef SPROUT_FUNCTIONAL_BIND_UDL_HPP