template<class Int_T,class Integral,typename Best_Fit<Int_T>::type Min_Range,
typename Best_Fit<Int_T>::type Max_Range>
auto operator+(Integral left,const Int<Int_T,Min_Range,Max_Range>& right)
->Int<decltype(left + right.get_data())>
{
static_assert(std::is_integral<Integral>::value,"Non integral type is not allowed.");
static_assert(std::is_integral<Int_T>::value,"Non integral type is not allowed.");
auto data = left + right.get_data();
Int<decltype(left + right.get_data())> result(data);
return result;
}
关键是我认为这两个 static_assert* s * 永远不会被触发——即使有人也尝试过。
那么这个Q的答案是什么?