C++11-14 第11講 decltype

decltype從表達式的類型推斷出要定義的變量類型c++ map<string, float> cell; decltype(cell)::value_type elem;//推斷容器得到類型 //1.用來聲明返回參數編程 //template<typename T1,typename T2> //decltype(x + y) add(T1 x, T2 y);//錯誤由於x和y在後面 //要這
相關文章
相關標籤/搜索