Using ::name to specify name in the global namespace or one reachable from it with a previous using declaration is valid but generates a "syntax error" with 1.82. I used it as a functions return type. I'm not sure if there is a false positive in other cases.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Using ::name to specify name in the global namespace or one reachable from it with a previous using declaration is valid but generates a "syntax error" with 1.82. I used it as a functions return type. I'm not sure if there is a false positive in other cases.
could you show a small code example that trigger this syntax error? Then I will create a ticket.
Last edit: Daniel Marjamäki 2018-01-22
The error appears to require a function template.
typedef std::pair< unsigned char , unsigned char > CRCWord;
template < typename T >
::CRCWord const Compute(T const t) {
return CRCWord();
}
Last edit: Fraser 2018-01-23
Thanks! I created https://trac.cppcheck.net/ticket/8361