| Summary: | boost library not usable with CDT 8.0 and codan (indexer problem ?) | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Bernhard Merkle <bernhard.merkle> |
| Component: | cdt-codan | Assignee: | CDT Codan Inbox <cdt-codan-inbox> |
| Status: | RESOLVED WORKSFORME | QA Contact: | Elena Laskavaia <elaskavaia.cdt> |
| Severity: | major | ||
| Priority: | P3 | CC: | cdtdoug, malaperle, yevshif, zeratul976 |
| Version: | 8.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
btw boost::add_const does not show up in the codecompletion. The program compiles and runs fine, but the indexer seems to have a major problem. If you go to global indexer settings and remove all pre-indexer headers, then re-build index for this project - does it help? (In reply to comment #2) > If you go to global indexer settings and remove all pre-indexer headers, then > re-build index for this project - does it help? no. unfortunately it does not help. are you able to reproduce the error ? I tested this example with Boost 1.46.1 and I see the errors with CDT 8.0.1 but not with a recent build of 8.1 (8.1.0.201111031005). I assume this was fixed with bug 197989. You can get a nightly build of 8.1 here: https://hudson.eclipse.org/hudson/job/cdt-nightly/ Also, using 8.1, boost::add_const shows up in the completion. Works fine for me with CDT 8.2 and Boost 1.54. |
Build Identifier: I20110613-1736 There is a major problem with using the boost library with CDT 8.0 and codan. Please note that the same example works under CDT 7.0. Using the example below I get the following error message from codan in CDT 8.0. Type 'boost::add_const<T>::type' could not be resolved Workaround: If I deactivate the "Syntax and Semantic Errors" in codan, the error goes away. This category was not present in CDT 7.0 so the problem did not show up there. I think underlying maybe a problem with the CDT indexer (which does not resolve the symbol). However as you can see the example is very small and it shows that there is a general problem with using boost and CDT 8.0. #include <boost/static_assert.hpp> #include <boost/type_traits/is_same.hpp> #include <boost/type_traits/add_reference.hpp> #include <boost/type_traits/add_const.hpp> template<typename T> struct add_const_ref { typedef typename boost::add_const<T>::type ct; typedef typename boost::add_reference<ct>::type type; }; template<typename T1, typename T2> void same() { const bool v = boost::is_same<T1, T2>::value; BOOST_STATIC_ASSERT(v); } int main() { same<const char &, add_const_ref<char>::type>(); same<int * const &, add_const_ref<int *>::type>(); same<int &, add_const_ref<int &>::type>(); same<const long &, add_const_ref<const long &>::type>(); same<const long &, add_const_ref<long>::type>(); return 0; } Reproducible: Always Steps to Reproduce: 1. use example attached 2. build or run codeanalysis 3. fails with CDT 8.0, works with CDT 7.0 maybe a problem with the indexer which shows up in codan. workaround is to deaktivate category "Syntax and Semantic Errors"