[cfe-dev] ABC as value-parameter to memberfunctions: Bug?

Wilhelm wilhelm.meier at fh-kl.de
Thu Mar 26 03:41:07 PDT 2015


Hi all,

why does clang++ 3.6 compile the follwing code (g++ doesn't)?
---
class Abc
{
public:
    virtual void foo() const = 0;
    virtual ~Abc() {}
};

// is correctly rejected
// void bar(Abc o)
// {
// }

class B
{
    void bar(Abc o) // should also be rejected
    {
    }

};

int main()
{
}
---



clang++ --version
clang version 3.6.0 (tags/RELEASE_360/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix

-- 
Wilhelm



More information about the cfe-dev mailing list