[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-bugs
Subject:    [Bug 285100] New: KDevelop does know the "template < typename = >"
From:       Cyrille Berger <cberger () cberger ! net>
Date:       2011-10-27 15:03:28
Message-ID: bug-285100-40295 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=285100

           Summary: KDevelop does know the "template < typename = >"
                    construct
           Product: kdevelop
           Version: 4.2.2
          Platform: Debian testing
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: cpp-parser
        AssignedTo: kdevelop-bugs@kdevelop.org
        ReportedBy: cberger@cberger.net


Version:           4.2.2 (using KDE 4.6.5) 
OS:                Linux

Apparently, in template definition, typename does not have to be followed by an
identifier.

The following construct is legal c++:

template < typename = int >

In reality it is mostly useful to do the following

template < typename = std::enable_if< SomeTest >::type >
void foo()
{
}

And depending on the result of SomeTest the function is generated or not. Well
anyway, if you input the above function (or similar) in kdevelop, kdevelop
underlight in red the "=" (and the template keyword too). While it should not.




Reproducible: Always

Steps to Reproduce:
To reproduce, in a cpp file, paste the following:


#include <utility>

template < typename = std::enable_if< false >::type >
void foo()
{
}

int main(int argc, char** argv)
{

  foo();
}


Actual Results:  
the equal in "typename =", the template keyword and the last ">" are wrongly
underlight in red.

Expected Results:  
Nothing is underlighted.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

_______________________________________________
KDevelop-bugs mailing list
KDevelop-bugs@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic