c++ - Qt name collision, but no_keywords not an option -
i have dilemma. in program i'm writing using qt, use (non-qt) library uses qt keyword in headers name (the library being pf_ring precise, , name "slots") , compilation errors. if turn off qt keywords using no_keywords option, compiler complains library's headers (this 1 qt-based) use qt keywords "signals" , "slots."
so how can fix this? can think of 2 options neither of satisfactory:
i can change second library's header files comply no_keywords mode (changing "slots" "q_slots" , forth).
i can move pf_ring related code own sub-project in can turn off qt keywords or not use qt @ all.
can suggest another, more elegant , less troublesome, solution?
this depends on library, if it's small 1 can make "wrapper" header (only or not) doesn't expose slots or expose in wrapper_namespace (note can use #undef slots ).
Comments
Post a Comment