我觉得应该是pair<int, const char*>
毕竟这是literal string
template<typename T1, typename T2, typename T3 = T2>
class C
{
public:
// constructor for 0, 1, 2, or 3 arguments:
C (T1 x = T1{}, T2 y = T2{}, T3 z = T3{});
…
};
C c1(22, 44.3, "hi"); // OK in C++17: T1 is int, T2 is double, T3 is char const*
C c2(22, 44.3); // OK in C++17: T1 is int, T2 and T3 are double
C c3("hi", "guy"); // OK in C++17: T1, T2, and T3 are char const*
C c4; // ERROR: T1 and T2 are undefined
C c5("hi"); // ERROR: T2 is undefined
【 在 lwp 的大作中提到: 】
: 我擦你别忽悠我,
: With C++17’s new deduction rules, you can forget about the helper function
: templates, and simply write the following:
: ...................
--
修改:mvtec FROM 67.163.48.*
FROM 67.163.48.*