Menu

::name gives syntax error starting with 1.82

Fraser
2018-01-19
2018-01-23
  • Fraser

    Fraser - 2018-01-19

    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.

     
  • Daniel Marjamäki

    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
  • Fraser

    Fraser - 2018-01-23

    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
  • Daniel Marjamäki

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.