c++ - How to identify missing typename in Visual Studio -
this question has reply here:
where , why have set “template” , “typename” keywords? 5 answersis there anyway identify missing typename in vs ? vs @ to the lowest degree produce kind of warning ?
template<class t> void dum() { std::vector<t> dum_vector; typename std::vector<t>::iterator = dum_vector.begin(); // vs compiles or without typename, know whether // forgot set typename, since without typename code may not compile // compiler (e.g. gcc) }
i'm not sure if has 100% standard conformance, msvc produces compiler warning (level 1) c4346 or cases in typename
explicitly needed. long compiling compiler flag /w1
or greater should okay.
c++ visual-studio
No comments:
Post a Comment