OooooKay?

Code Snip
~~~~~~~~
    #include <memory> //share_ptr
     std::shared_ptr<abc::someClass> apx; //<--Does not work

Error
~~~~
g++    -c -g -I/c/abc -I/c/abc/gui/msg/ -MMD -MP -MF 
build/Debug/MinGW64-Windows/_ext/348948719/MyClass.o.d -o 
build/Debug/MinGW64-Windows/_ext/348948719/MyClass.o 
/C/abc/MyClass/MyClass.cpp
In file included from c:/abc/MyClass/MyClass.cpp:1:0:
c:/abc/MyClass/MyClass.hpp:92:5: error: 'shared_ptr' in namespace 'std' does 
not name a type
     std::shared_ptr<abc::someClass> apx; //! All purpose exception

What do I want?
~~~~~~~~~~~~~~~
I would like to know if MinGW is able to compile the line above or if C++11 
compliant. I know that VS2010+ has not problem compiling the code above.

I hope this information is enough.

TIA (Thanks in advance )

-----Original Message----- 
From: Óscar Fuentes
Sent: Friday, September 06, 2013 4:15 PM
To: [email protected]
Subject: Re: [Mingw-w64-public] The API supported by g++11_64bit

"Incongruous" <[email protected]>
writes:

> Thanks for your help.
> Perhaps it is the way I am using it
> GNU version is 4.8.1
>
> #include <tr1/memory>
>
> tr1::shared_ptr<uiexception> uex;
>
> Is this correct?

With C++11 shared_ptr is in the std namespace. Try

#include <memory>

std::shared_ptr<uiexception> uex;


Also, please provide complete information when you ask for help for
solving a problem. Simply saying that you are having "problems" with a
feature doesn't help us to help you.


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public 


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to