A
arman_sch
Guest
So I get that error when I try to do this:
<var></var>
typedef double const (*t_p_training_function)(std::vector<double> const&); // training function pointer type
The MS C++ docs say this about that error:
<samp>anachronism used : qualifiers on reference are ignored
Using qualifiers like const or volatile with C++ references is an outdated practice.</samp>
Which I don't really understand. Why is using a const qualifier on a reference outdated? It's exactly what I want to do in this case (ie. I want a reference to it and I don't want to modify it).
Should I just pass it as const? Will this have the same effect? Even so, what's wrong with the "reference" just for added clarity?
Continue reading...
<var></var>
typedef double const (*t_p_training_function)(std::vector<double> const&); // training function pointer type
The MS C++ docs say this about that error:
<samp>anachronism used : qualifiers on reference are ignored
Using qualifiers like const or volatile with C++ references is an outdated practice.</samp>
Which I don't really understand. Why is using a const qualifier on a reference outdated? It's exactly what I want to do in this case (ie. I want a reference to it and I don't want to modify it).
Should I just pass it as const? Will this have the same effect? Even so, what's wrong with the "reference" just for added clarity?
Continue reading...