Code: Select all
template <typename T>
struct Test
{
T member;
using U = typename std::conditional<std::is_floating_point<T>::value, T, typename std::conditional<sizeof(T) <= 4, float, double>::type>::type;
T getMember() const { return member; }
U getMember2() const { return static_cast<U>(member); }
};
Code: Select all
Test<int> abc;
abc. // this triggers code completion dialog
Likely CodeLite doesn't understand that construct and perhaps there would be other constructs that would throw havoc to CodeLite's parser. So my question is, would be there a way to detect CodeLite in code, for instance, by using something like #ifdef codelite, so that I can replace that tricky definition with something simpler that CodeLite could understand and parse the rest of template reasonably well?