| Summary: | KDevelop fails to complete a template class constant | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Valentyn Pavliuchenko <valentyn.pavliuchenko> |
| Component: | Language Support: CPP (old) | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | normal | CC: | cponnapalli, olivier.jg |
| Priority: | NOR | ||
| Version First Reported In: | git master | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | kdevelop correctly calculates the factorial for integers greater than 2 | ||
Created attachment 98692 [details]
kdevelop correctly calculates the factorial for integers greater than 2
Hi,
I reproduced the code provided and there is no issue with the way kdevelop calculates the value of the factorial for integers greater than 2.
Attached a screen shot of the code along with the output produced.
Thanks
@Chaitanya: Note: the bug report is about the results of the code completion, not about the results of running above program. Further debugging: Under KDevelop 5, we no longer appear to show the value of constant variables. Marking this as invalid, as it no longer applies to the KDevelop 5 C++ support. |
Version: SVN (using KDE 4.4.4) OS: Linux In the following code I see "2" as a value of factorial for 2 and upper values. Actually for 2 it is the right answer, but for 3 and up it is wrong. Code: template <int V> class fact : public fact<V-1> { public: static const int res = V * fact<V-1>::res; }; template <> class fact<1> { public: static const int res = 1; }; int main() { fact<3> a; a.<invoke autocomplete here> return 0; } Reproducible: Always