Add indirection in mp_quote to enable expansions of T... into a fixed parameter list

This commit is contained in:
Peter Dimov
2017-03-20 16:55:00 +02:00
parent 71ba80d18a
commit 321a54728f
3 changed files with 23 additions and 6 deletions
+6 -5
View File
@@ -24,7 +24,7 @@ struct D1: B {};
struct D2: B {};
struct ND {};
template<class... T> using is_base_of_t = typename std::is_base_of<T...>::type;
template<class T, class U> using is_base_of_t = typename std::is_base_of<T, U>::type;
int main()
{
@@ -54,10 +54,11 @@ int main()
{
using Q = mp_quote<mp_identity_t>;
// using R1 = Y<Q::fn, void, char, int>;
// BOOST_TEST_TRAIT_TRUE((std::is_same<R1, X<void, char, int>>));
//
// error: pack expansion used as argument for non-pack parameter of alias template
#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1800 )
#else
using R1 = Y<Q::fn, void, char, int>;
BOOST_TEST_TRAIT_TRUE((std::is_same<R1, X<void, char, int>>));
#endif
#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1910 && BOOST_MSVC >= 1900 )
#else