HI @kaz. yes, "using" is a alternative new typedef ( c++11).
min On Thu, Aug 18, 2016 at 3:37 PM, Kaz Kylheku <[email protected]> wrote: > On 18.08.2016 12:05, Min Wang wrote: > >> HI >> @kaz. thanks. I will check the %union later >> >> I'like to use the smart pointers ( std::unique_ptr) , but somehow I got >> some compiler errors. >> >> here are some details: >> e.g: >> >> using PROG_PTR = std::unique_ptr<PROG>; >> > > "using" is now a full-blown alternative for typedef? > > I don't keep up closely with the C++ standard. > > The old-fashioned way is: > > typedef std::unique_ptr<PROG> PROG_PTR; > > The "using" that I remember was purely for bringing long, qualified names > into the current scope as short names, not for creating alias names for > types. > > using foo::bar::baz; // the unqualified name baz can now be used in this > scope > -- http://www.comrite.com
