LoginSignup
6
4

More than 5 years have passed since last update.

c++11 > typedefの代わりにusingが使えます

Last updated at Posted at 2015-08-02

引用: ゲームプログラマのためのコーディング技術 by 大圖衛玄(Moriharu Ohzu)さん

typedef std::shared_ptr<Particle> ParticlePtr;

C++11ではtypedefの代わりにusingが使えます。

using ParticlePtr = std::shared_ptr<Particle>;



また,using のほうはテンプレート化することができます.

template<class Value>
using dict = std::map<std::string, Value>;

これは typedef に対して非常に大きな利点です.

6
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
4