what is the difference between function declaration and signature?

前端 未结 5 1641
故里飘歌
故里飘歌 2020-12-13 00:13

In C or C++ what is the difference between function declaration and function signature?

I know something of function declaration but function signature is totally ne

5条回答
  •  不知归路
    2020-12-13 00:37

    Also please note that top-level const and volatile on argument are not part of the signature, according to the standard. But some compilers get this wrong.

    e.g.

    void f(const int, const char* const);
    

    has the same signature as

    void f(int, const char*);
    

提交回复
热议问题