Bug 41944 - Representation for template classes is incorrect in class view browser
Summary: Representation for template classes is incorrect in class view browser
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: 2.1-beta
Platform: Mandrake RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop-Devel List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-30 08:33 UTC by Unknown
Modified: 2013-03-31 00:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description S Shalnov 2002-04-30 08:28:07 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kdevelop
Version:           2.1beta (using KDE 2.2.2 )
Severity:          normal
Installed from:    Mandrake RPMs
Compiler:          gcc-2.96
OS:                Linux
OS/Compiler notes: Not Specified

Try to view in classview broser the following class structire:

class Foo : public BalancedFoo<long const MyName *>
{
};

Where balancedFoo is:
template <class Key class Value> class BalancedFoo;

Two argument for template class is very important for repracentation the bug.
So you can see incorrect representation these class structure in graphical class view breoser.


(Submitted via bugs.kde.org)
(Called from KBugReport dialog. Fields Application KDE Version OS Compiler manually changed)
Comment 1 Eray Ozkural 2003-02-27 13:21:37 UTC
Tested with following valid C++ code: 
 template <class Key, class Value> class FooBase 
 { 
  public: 
    FooBase() {} 
 }; 
 
  class Foo : public FooBase<long, int *> 
 { 
  public: 
     Foo() {} 
 }; 
 
 
Class parser successful in extracting declarations, however in the class view there is 
lacking information: there is not the slightest indication of these being template  classes. 
 
Suggestion: Output parsed template parameters (it shouldn't be cut'n paste of text from 
the declaration). Roberto, we parse the template <....> as in the standard right? If it gets 
all typenames correctly, we can easily construct the correct template specification 
string. 
Comment 2 Eray Ozkural 2003-02-27 13:30:15 UTC
What I mean here is those template specs should be right ;) 
 
For such code as 
template < std::map < int, pair< QString, QString > >, Tree < double > > 
StrangeStructure; 
 
As seen  this is not so easy as it seems. Which Tree that is it should know... It should 
also be possible navigate directly to say "Tree", or "std::map" templates..... Figure this :) 
 
I think a good code to test out whether the template stuff works is blitz++ library. It uses 
a lot of template expressions. 
 
 
Comment 3 Tarjei Knapstad 2003-09-18 14:38:57 UTC
The best acid test for template parsing would probably be a selection from the
Boost libraries, for instance Boost.Python and Boost.MPL. Blitz++ is outdated
(allthough some people are currently breathing new life into it), and certainly
does not contain the latest and greates in horrorshow template syntax.
Comment 4 Stephan Kulow 2004-05-25 09:19:03 UTC
Replaced s_shalnov@hotmail.com with null@kde.org due to bounces by reporter
Comment 5 Andreas Pakulat 2007-01-14 01:53:12 UTC
KDevelop3.4 shows the full class declaration as tooltip information, so this is available in the class view.
Comment 6 Aleix Pol 2013-03-31 00:51:59 UTC
Moving all the bugs from the CPP Parser. It was not well defined the difference between it and C++ Language Support and people kept reporting in both places indistinctively