私のVisual Studio 2017 won'tは、このコードとwon'tコンパイルで型推論ガイドを認識ガイド:、 template<typename T>
class Example{
public:
Example(T& pVal)
:val(pVal){}
T& val;
};
//type deduction guide for Example
main関数では、const intポインタの変数を作成し、auto&で宣言された変数に割り当てます。次に、decltype(x)を使用してタイプを確認します。私はそのタイプがconst int*であると予想しました。しかしis_sameはfalseを返します。 int main()
{
int a = 10;
const int * cp_val= &a;
aut