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 226052 - Unable to resolve identifier with some c++11 components
Summary: Unable to resolve identifier with some c++11 components
Status: RESOLVED WORKSFORME
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 7.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-13 11:16 UTC by flavio80
Modified: 2019-05-12 16:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
from my machine (171.32 KB, image/png)
2013-02-13 11:55 UTC, soldatov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description flavio80 2013-02-13 11:16:34 UTC
Hello,
i've found a lot of C++11 components not identified by netbeans parser/editor/code completion, so I fill an example with some of them. Using g++ 4.7.2 on linux ubuntu, it compiles and run perfectly, but it's annoying to see the "red underlines".

Compilation options: -O2 -Wall -I/usr/include -std=c++11
Here the example code:

----------------------BOC-------------------

#include <array>
#include <utility>
#include <functional>
#include <tuple>
#include <iostream>

typedef std::array<std::tuple<int, int, int>, 2 > arrayType; //<--- UNABLE TO RESOLVE IDENTIFIER array and tuple

enum class identifier : short
{
    pippoId = 0,plutoId = 1
};


arrayType theArray;

void foo(int a, int b, const identifier id)
{
    auto updateTuple = [a, b](std::tuple<int, int, int> & t1){ //<--- UNABLE TO RESOLVE IDENTIFIER tuple

        //UNABLE TO RESOLVE IDENTIFIER get
        std::get < 0 > (t1) += a;
        std::get < 1 > (t1) += b; 
        std::get < 2 > (t1) += (b > 0 ? 1 : 0);

    };

    updateTuple(theArray[static_cast<int> (id)]);
}

int main()
{
    theArray.fill(std::make_tuple(0, 0, 0)); //<--- UNABLE TO RESOLVE IDENTIFIER fill and make_tuple

    foo(5, 4, identifier::pippoId);
    foo(5, 1, identifier::pippoId);
    foo(1, 1, identifier::pippoId);
    foo(20, 12, identifier::plutoId);

    for (auto elemTuple : theArray)
    {
        //UNABLE TO RESOLVE IDENTIFIER get
        std::cout << "(" << std::get < 0 > (elemTuple)
                << "," << std::get < 1 > (elemTuple) 
                << "," << std::get < 2 > (elemTuple) << ") ";

    }
    std::cout << std::endl;


}

----------------------EOC------------------
Comment 1 soldatov 2013-02-13 11:40:40 UTC
works for me (Solaris 11 + gcc 4.7.2)

Do you set "Build|C++ Compiler|C++ Standard = C++11" in Project Properties window
Comment 2 flavio80 2013-02-13 11:49:33 UTC
(In reply to comment #1)
> works for me (Solaris 11 + gcc 4.7.2)
> 
> Do you set "Build|C++ Compiler|C++ Standard = C++11" in Project Properties
> window


Yes, it is setted. Otherwise the compiler options could not be -O2 -Wall -I/usr/include -std=c++11.

So in Solaris you have the autocompletion when you type  i.e. 
theArray.f[CTRL+SPACE]?
Comment 3 soldatov 2013-02-13 11:55:13 UTC
Created attachment 131341 [details]
from my machine
Comment 4 flavio80 2013-02-13 14:05:52 UTC
(In reply to comment #3)
> Created attachment 131341 [details]
> from my machine

Perfect. I'll try to update to netbeans 7.3 RC1 and see if the problem is solved on my platform.
Comment 5 flavio80 2013-02-13 15:48:32 UTC
Tried on 7.3 RC2: it worked.

If I'll find new keywords not recognized I'll write it in future. 

Thanks
Comment 6 Pokemon999 2019-05-12 16:15:59 UTC
You can follow the online site here https://scrabblewordfinder.me and getting the great fun with play unscrambler scrabble word finder have to look the best score.