struct CCompare
{
    const bool operator()(const int& lhs, const int& rhs) const {
        return lhs < rhs;
    }
};
警告 1 警告 C4180: 関数型に適用された修飾子には意味がありません。
const boolプログラミングの本のように戻り値を使った使い方を見ました。上記のコードを vs2010 でコンパイルすると、警告 C4180 が報告されます。
代わりに、次のコードでは同じ警告は発生しません。
struct CCompare
{
    bool operator()(const int& lhs, const int& rhs) const {
        return lhs < rhs;
    }
};
質問1 > をconst Fundamental_Data_Types関数の戻り値として使用する意味がないというのは本当ですか?
質問2 >const Type関数の戻り値としての使用は、Type がクラス/構造体である場合にのみ意味があるというのは本当ですか?
ありがとうございました
// アップデート //
struct CClass
{
    int val;
    CClass(int _val) : val(_val) {}
    void SetValue(int _val) {
        val = _val;
    }
};
struct CCompare
{
    const CClass getMe() const {
        return CClass(10);
    }
    CClass getMeB() const {
        return CClass(10);
    }
};
int main(/*int argc, char *argv[]*/) 
{
    CCompare c;
    c.getMe().SetValue(20);   // error
    c.getMeB().SetValue(20);  // ok
}