Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] false codan error

Hi guys,

 

I've come across some error in the codan checker, but I don't know how to describe the problem properly in a bug report.

 

I have the following code excerpt that compiles/runs fine when I use it from my code (I know this example can't work, I simply tried to focus on the problem).

 

template<typename _Handler_>

struct TestWrapper:

public _Handler_ {

 

using H = _Handler_;

 

typename _Handler_::Buffer _buf; // no error

 

static void testHandler() {

 

typename H::Buffer buf1(); // no error

 

typename H::Buffer buf2; // error: No such constructor for type '#0::Buffer'

}

 

};

 

The error is shown even if there's nothing refering to this declaration, so even when there are no specializations/uses anywhere in the code. I think the parser should not be able to tell me anything about Buffer in the first place. And then I don't know where that error itself comes from; in the real code there is an appropriate ctor.

 

Does anybody have an idea what is happening here?

 

bye Michi


Back to the top