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
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.