Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] CDT survey

Hi,

In spite of your question was to Nathan, I'll try to help. What version of CDT do you use? It looks like a bug 403418 [1] that was fixed in the latest CDT.


[1] - Bug 403418 - Type Hierarchy view does not show class templates - https://bugs.eclipse.org/bugs/show_bug.cgi?id=403418


Anton.

-------- Original message --------

Hi Nathan,

 

I've created a test file (it might be a bit cluttered, sorry). In the main method I put in some comments. Can you verify and suggest in which category these problems fall?

What should be done about the b20.test() linker problem? I know codan is extensible, but I have no clue how I personally can fix that quickly.

 

thx Michi

 

/*

* test1.hpp

*

* Created on: 19 Jul 2013

* Author: michi

*/

 

#ifndef TEST1_HPP_

#define TEST1_HPP_

 

#include <iostream>

#include <string>

 

struct AA {

 

void aa() {

 

}

 

void print() {

std::cout << "AA";

}

 

};

 

struct BB {

 

void bb() {

 

}

 

void print() {

std::cout << "BB";

}

 

};

 

struct CC {

 

void cc() {

std::cout << "CC";

}

 

};

 

template<int _Switch_>

struct B: public std::conditional<_Switch_ >= 10, AA, BB>::type {

 

void test();

 

};

 

template<>

struct B<5> : public AA, public CC {

 

};

 

int main() {

B<0> b0; // Type Hierarchy not resolved

B<5> b5; // open declaration does not point to specialization; Type Hierarchy not resolved (again no specialization)

B<20> b20; // Type Hierarchy not resolved

b0.bb() // code completion works - uses proper conditional

b5.cc(); // code completion works - uses specialization

b20.test(); // this is off topic, but I think it should generate a warning (linker problem) - unnoticed when building a library

b20.aa(); // code completion works - uses proper conditional

}

 

#endif /* TEST1_HPP_ */

On Thursday 18 Jul 2013 19:29:12 Nathan Ridge wrote:

> >> How about "support for C++11/C++14 language features"?

> > +1000

> > evaluating enable_if<..> et al. would be such a boon

> If by evaluating you mean performing overload resolutioncorrectly in the presence of enable_if, that should alreadywork. If it doesn't, please file bugs and I will fix them.

> Thanks,Nate

>

>



_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top