Is the const value parameter in definition but not declaration really C++?

前端 未结 7 1255
时光说笑
时光说笑 2021-01-06 13:31

This is similar to (but different from) this question.

Here is some simple test code to illustrate some weirdness I have discovered with Sun CC:

//--         


        
7条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-06 14:15

    I would always match the const on both declaration and definition. This would reduce any problems because the signatures would match then.

提交回复
热议问题