If I run the following code with MSVC ...
#include <iostream>
using namespace std;
struct S {};
template<typename ... Args>
void variadic( Args &&... args )
{
cout << __FUNCSIG__ << endl;
}
int main()
{
S s;
variadic( (S &)s, (S const &)s, (S &&)s, (S const &&)s );
}
... the code prints (re-formatted) ...
void variadic<struct S&,const struct S&,struct S,const struct S>(
struct S &,const struct S &,struct S &&,const struct S &&)
Why has the parameter-list the proper reference-types I specified while calling variadic and the specialization inside <>
doesn't have the proper types for r-value references ?
Aucun commentaire:
Enregistrer un commentaire