vendredi 29 juin 2018

How can I check that function really get a variable that defined as const?

Given the following code:

template <class Func>
void f(Func f , int* param){
   f(/* how can I send "param" as const "int*" */);
}

How can I do it so that if f don't get the variable as const - so we will get error ?

Aucun commentaire:

Enregistrer un commentaire