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

View File

@@ -35,6 +35,11 @@ struct Q4
template<class T1, class... T> using fn = T1;
};
struct Q5
{
template<class T1, class T2> using fn = T2;
};
int main()
{
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_invoke<Q1>, void>));
@@ -52,5 +57,7 @@ int main()
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_invoke<Q4, int>, int>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_invoke<Q4, int[], char[]>, int[]>));
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_invoke<Q5, int, float>, float>));
return boost::report_errors();
}