मैं इस महान लेख भर में आया था: http://pdimov.com/cpp2/simple_cxx11_metaprogramming.htmlvariadic टेम्पलेट्स प्रकार कटौती
निम्न कोड में:
template<class A, template<class...> class B> struct mp_rename_impl;
template<template<class...> class C, class... T, template<class...> class B>
struct mp_rename_impl<C<T...>, B>
{
using type = B<T...>;
};
template<class A, template<class...> class B>
using mp_rename = typename mp_rename_impl<A, B>::type;
//...
mp_rename<mp_list<int, float, void*>, std::tuple>; // -> std::tuple<int, float, void*>
// T... will be deduced as int, float, void*
क्यों सीmp_list (बजाय mp_list < पूर्णांक के रूप में निष्कर्ष निकाला है, नाव , शून्य *>) और टी ...int, float, शून्य *? , B> struct mp_rename_impl < सी < टी ...>, लेकिन मैं समझने के लिए क्यों
कौन सा 'ए'? 'कक्षा ए' या 'टेम्पलेट कक्षा ए'? –
Jarod42
मैंने इसे बदल दिया क्योंकि आपने इसे स्पष्ट करने के लिए –