On 12/22/2012 8:03 AM, Andrei Alexandrescu wrote:
I think this is a fallacious argument because it concludes that apples should be
peeled because oranges should.

Given, in C++:

struct S
{
  public:
     void foo(int);
  private:
     void foo(float);
}

void bar()
{
    S s;
    s.foo(1.0f);
}

This is an error in C++:

foo.cpp:6: error: âvoid S::foo(float)â is private

(I used g++ so nobody would complain this is a defect in dmc++.)

Why does this never come up on peoples' complaints about C++? I spent some time googling it, and came up with nothing.

I don't think it can be dismissed as fallacious unless the why's have a 
rationale.


Reply via email to