This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 244036 - C++ 0x and 11 standard allows template closure nesting
Summary: C++ 0x and 11 standard allows template closure nesting
Status: RESOLVED INCOMPLETE
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 8.0
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-23 18:05 UTC by stormbyte
Modified: 2014-07-24 14:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stormbyte 2014-04-23 18:05:48 UTC
I have a project, and I compile it enabling -std=c++11 with g++

C++ 11 standard, now allows to close nested template definitions without causing any error, for example:

std::list<std::pair<std::string, std::string>> myList;

The problem:

Netbeans becomes crazy after this, and marks several lines below as if it had errors.

It can be workarounded by changed affected template declarations to what is needed if you don't enable 11 draft:

std::list<std::pair<std::string, std::string> > myList;

But the best solution is to somehow detect that and allow it (something like in PHP, you can select a version, the same with C++), or even allow it regardless.

Thanks
Comment 1 petrk 2014-07-23 15:35:49 UTC
What is the version of your IDE? And, please, make sure that you have set the standard to C++11 in IDE. This seems similar to bug 238889, and your line is parsed without errors in development version as well. So, maybe, you have a concrete test case where an error occurs.
Comment 2 petrk 2014-07-24 14:14:37 UTC
Changed status to incomplete because of lack of information about the bug.