Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] code completion & templates

Hi cdt devs,

today I have again some issue with code completion. This time, however, it has something to do with templates. Please look at the attached test file, which should explain my problem.
Is this something that needs to be fixed?

bye Michi
/*
 * test.hpp
 *
 *  Created on: 6 Mar 2013
 *      Author: michi
 */

#ifndef TEST_HPP_
#define TEST_HPP_

template<int C>
class A {
	public:
		static const int size = C;
		int val[C];
};

template<int C>
class B {
	public:
		int test;
		A<C> val;
};

template<int C>
void test1(B<C> bc) {
	bc.val.val;	// no code completion
	A<C> a = bc.val;
	a.val; // code completion works
}

void test2(B<1> b1) {
	b1.val.size; // code completion works
}

#endif /* TEST_HPP_ */

Back to the top