Registered Member
|
Hello again,
for the first question assuming the following situation: file: header_a.hpp #if defined VERSION_A #include "version_a.hpp" #elif defined VERSION_B #include "version_b.hpp" #else #error "No version defined!" #endif file: source_a.cpp #include "header_a.hpp" Problem: kdevelop doesn't parse any of the files "version_a.hpp" and "version_b.hpp", at least not with custom Makefiles (like i use). The reason is obviously that kdevelop (the parser) can't know which file to include. Any suggestions how i could solve the problem without breaking the conditional #include concept? Second question: namespace foo { enum my_enum { TYPE_ONE, TYPE_TWO } } template< my_enum name > void do_something(); You would call it like do_something< foo::TYPE_ONE >(); Code completion from kdevelop seems to have a problem with that template parameter as it doesn't suggest any completion but shows something like "do_something< class type >() ..." Any ideas for that too? Both things tested on the latest stable 4.3.1 on Debian wheezy. kdevelop is really great anyway |
Registered Member
|
try this
#ifdef IN_IDE_PARSER #define VERSION_A // or VERSION_B #endif at the top of the file depending on which codepath you want to test. this creates a define that kdevelop sees but will not interfere with your code at compile or runtime |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell