diff --git a/sprout/functional/bind/bind.hpp b/sprout/functional/bind/bind.hpp index 2570ab84..08e14026 100644 --- a/sprout/functional/bind/bind.hpp +++ b/sprout/functional/bind/bind.hpp @@ -200,7 +200,7 @@ namespace sprout { : public std::integral_constant< bool, (sprout::is_placeholder::value - 1, Bounds>::type>::value - <= -256 + <= sprout::is_placeholder::value ) > {}; @@ -216,7 +216,7 @@ namespace sprout { > : public std::integral_constant< int, - (-256 + (sprout::is_placeholder::value - sprout::is_placeholder::value - 1, Bounds>::type>::value ) > @@ -627,7 +627,7 @@ namespace sprout { template struct complete_placeholder< Index, BoundArg, - typename std::enable_if::value == -1)>::type + typename std::enable_if::value == sprout::is_placeholder::value)>::type > { public: typedef BoundArg type; @@ -635,7 +635,7 @@ namespace sprout { template struct complete_placeholder< Index, BoundArg, - typename std::enable_if<(sprout::is_placeholder::value == -1)>::type + typename std::enable_if<(sprout::is_placeholder::value == sprout::is_placeholder::value)>::type > { public: typedef sprout::placeholder type; diff --git a/sprout/functional/bind/udl.hpp b/sprout/functional/bind/udl.hpp index 558461bf..9c0d082a 100644 --- a/sprout/functional/bind/udl.hpp +++ b/sprout/functional/bind/udl.hpp @@ -12,6 +12,7 @@ namespace sprout { // // placeholders_result + // variadic_placeholders_result // template struct placeholders_result @@ -19,11 +20,18 @@ namespace sprout { 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 @@ -31,15 +39,23 @@ namespace sprout { 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