備忘録

プログラムやゲーム関連に関すること

【C++】 C++ の新しい typedef 方法

Before

typedef int type1;
typedef int type2[10];
typedef type1 (*type3)(type2);

After

using type1 = int;
using type2 = int[10];
using type3 = type1 (*)(type2);

引用:本の虫: C++の新しいtypedef方法、alias declaration