From 511f12c91e8f5850813ad8ddfa7996bd9507e161 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 7 Feb 2018 23:59:00 +0200 Subject: [PATCH] Use mp_defer in mp_bind_front, mp_bind_back --- include/boost/mp11/bind.hpp | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/include/boost/mp11/bind.hpp b/include/boost/mp11/bind.hpp index 6fbc3e6..ac257d4 100644 --- a/include/boost/mp11/bind.hpp +++ b/include/boost/mp11/bind.hpp @@ -9,6 +9,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#include #include namespace boost @@ -65,19 +66,10 @@ template using mp_bind_q = mp_bind; // mp_bind_front template class F, class... T> struct mp_bind_front { -#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1920 && BOOST_MSVC >= 1900 ) -#else -private: -#endif - - template struct _fn { using type = F; }; - -public: - - // the indirection through _fn works around the language inability + // the indirection through mp_defer works around the language inability // to expand U... into a fixed parameter list of an alias template - template using fn = typename _fn::type; + template using fn = typename mp_defer::type; }; template using mp_bind_front_q = mp_bind_front; @@ -85,16 +77,7 @@ template using mp_bind_front_q = mp_bind_front class F, class... T> struct mp_bind_back { -#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1920 && BOOST_MSVC >= 1900 ) -#else -private: -#endif - - template struct _fn { using type = F; }; - -public: - - template using fn = typename _fn::type; + template using fn = typename mp_defer::type; }; template using mp_bind_back_q = mp_bind_back;