[Bug?]Namespace and pointer to inner struct/class

Hi,
I'm having problem where CLion is unable to resolve pointer to an inner struct within a namespace. Here's my case:

VERSION 3.2)
project(HelloCLion)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp)
add_executable(HelloCLion ${SOURCE_FILES} MyClass.cpp MyClass.h)

namespace MyNameSpace {
    class MyClass {
        struct MyInnerStruct {
        };
    private
:
        void doSomething(MyInnerStruct in);
    
};
}
 "MyClass.h"
using namespace MyNameSpace;
void MyClass::doSomething(MyInnerStruct in) {

}


In this case, everything works fine. If I change parameter in to a pointer

    void doSomething(MyInnerStruct in);
to
void doSomething(MyInnerStruct *in);


It says "Can't resolve 'MyInnerStruct'" in doSomething() implementation in MyClass.cpp. But if I remove all the namespace things together and press "Reload CMake Project", there'll be no complains at all, either in being a pointer or not. Despite of that, the code compiles just fine.

Can someone please tell me what's wrong with it?

3 comments
Comment actions Permalink

Hi Huy.

It correctly works for me.
Could you please attach a sample project and also please specify which CLion version are you using.

0
Comment actions Permalink

Hi Anna,
The version is 1.0.5 on Mac OSX Yosemite, build #CL-141.875. I have tested on a Ubuntu 12.04.5 Virtual Machine, too. It gives the same error.



Attachment(s):
HelloCLion.zip
0
Comment actions Permalink

Apparently, it is fixed in the newest version 1.1. So nevermind.
Thank you, Anna.

0

Please sign in to leave a comment.