| Summary: | Declaration not found when using template-specialization | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Benjamin Schindler <beschindler> |
| Component: | Language Support: CPP (old) | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | olivier.jg, rshinde |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Gentoo Packages | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | 5.0.0 | |
| Sentry Crash Report: | |||
I don't get any semantic analysis errors with the given code. As far as Eigen::Vector2f, fgrep can't find that in eigen2 either, so that's correct to me. It's possible it was fixed recently. Let me know if you can provide a way to reproduce on current stable (4.4) or master. I'm not using kdevelop anymore, but eigen does have Vector2f. These typedefs are generated using macros so a grep won't find them.
The following code should (note, I just typed it here) compile and run. That is a good proof of the existence of Vector2f. Judging from your comment, kdevelop still does not find Vector2f, so I'm reopening this.
#include <Eigen/Core>
#include <iostream>
using namespace Eigen;
int main()
{
Vector2f myVector(1.0, 2.0);
std::cout << myVector.transpose() << std::endl;
return 0;
}
I have tried to reproduce this issue on Kdevelop 4.90.92 but it looks like this bug is already fixed. Please let me know if you need any additional information. Thanks. Thanks for the feedback. Closing. |
Version: (using KDE 4.3.3) OS: Linux Installed from: Gentoo Packages I have the following code: template <typename T> struct type_traits; template <> struct type_traits<unsigned long> { typedef unsigned long base_type; static unsigned long Zero(){return 0;} }; And then in a header: template<typename T> typename type_traits<T>::base_type norm_template(const T &v){ ... } The Error I'm getting is this: Declaration not found: type_traits<T>::base_type Semantic Analysis I understand that this case is kinda difficult to handle, but the current behaviour is not optimal (btw, it would be nice if I could copy the error message out of the problems window) The same happens when it really shouldn't: template <> struct type_traits<Eigen::Vector2f> { typedef float base_type; static const char* id() { return "Vector2f"; } static Eigen::Vector2f Zero(){return Eigen::Vector2f::Zero();} }; Declaration not found: Eigen::Vector2f::Zero (note, Eigen is included using Eigen/Core)