チラシの裏

あ,そうか・・・.外側を隠すっつーのなら対等に混ぜればいいわけじゃん.
#うぎゃー!!これバグじゃ・・・?標準規格的には完璧にOKなはずにゃ〜!!
#まぢかよ・・・.これ曖昧なのかよ・・・.オーバーロードにしてくれてもいいじゃ〜ん.ぶ〜ぶ〜ぶ〜.


10.2 Member name lookup
2 The following steps define the result of name lookup in a class scope, C. First, every declaration for the name in the class and in each of its base class sub-objects is considered. A member name f in one subobject B hides a member name f in a sub-object A if A is a base class sub-object of B. Any declarations that are so hidden are eliminated from consideration. Each of these declarations that was introduced by a using-declaration is considered to be from each sub-object of C that is of the type containing the declaration designated by the using-declaration. If the resulting set of declarations are not all from sub-objects of the same type, or the set has a nonstatic member and includes members from distinct sub-objects, there is an ambiguity and the program is ill-formed. Otherwise that set is the result of the lookup.
うむぅ〜.打つ手なし・・・.ちぇっ,つまんないの〜〜〜.

struct A
{
  void f(int);
};

struct B
{
  void f(char);
};

struct C
  : public A
  , public B
{ };

C().f(0); // エラー.曖昧.(オーバーロードとして扱ってくれない)

あ,ちなみに上のはusing-declaration使えばできるのは承知してます.私がやりたいのはとある理由があってusing-declarationを使わずに同じ名前を単一のクラススコープに混合したいというものです.