c ++标准两种不同的声明

Sko*_*ler 2 c++ standards function

为什么在c ++标准(我看cpp参考站点)中允许两个具有相同签名的变体?

例如:

reference front();
const_reference front() const; 
Run Code Online (Sandbox Code Playgroud)

BoB*_*ish 6

尾随const是签名的一部分.假装隐含this是明确的:

reference       front(      This *this);
const_reference front(const This *this);
Run Code Online (Sandbox Code Playgroud)

显然,参数列表是不同的.