I am using eclipse with cdt (Neon.3 Release 4.6.3) as the IDE for C++.
Some code of mine is compiling and running fine, but I have issues with configuring eclipse.
In a header file, I have a template class, which looks like this
template <int dimen, int neighbours, typenameDATATYPE >
class Grid {
public:
get_solidify_cells(const int &pos)
private:
std::vector<MacroCell<dimen, neighbours, DATATYPE>> macrogrid;
};
int Grid<dimen, neighbours, DATATYPE>::get_solidify_cells(const int &pos) {
const MacroCell<dimen, neighbours, DATATYPE> cell = macrogrid[pos];
const auto cell1 = macrogrid[pos];
const auto cell2 = cell;
return cell.get_solidify_cells();
}
MacroCell
has a method get_solidify_cells
.
The resolution of the auto
, when hovering with the mouse over it fails for cell1
. It thus has no auto completion and F3
fails to jump to the definition of get_solidify_cells
Without auto
, as this is the case of cell
auto completion and F3
are working fine.
If I hover over the auto form cell1 I get const 1 127 108 14 MSCAFE::Grid 3 10 103 129 5 3 #0 0 10 103 129 5 3 #1 0 #2 MSCAFE::Grid::macrogrid 0 35 MSCAFE::Grid::get_solidify_cells 0 0 cell1
If I hover over the auto form cell2 I get const MacroCell<int3 #0 0,int3 #1 0,DATATYPE> cell2
C++11
integration works fine, emplace_back
can be resolved.
How can I configure eclipse, in order to fix this issue?