Lines Matching refs:Wide
171 // Put Wide first so we can use function template argument deduction for Narrow,
172 // and callers can provide only Wide.
173 template <typename Wide, typename Narrow>
174 Wide MultiplyLong(Narrow a, Narrow b) {
176 std::is_integral<Narrow>::value && std::is_integral<Wide>::value,
178 static_assert(std::is_signed<Narrow>::value == std::is_signed<Wide>::value,
180 static_assert(sizeof(Narrow) * 2 == sizeof(Wide), "only twice as long");
182 return static_cast<Wide>(a) * static_cast<Wide>(b);
186 // Put Wide first so we can use function template argument deduction for Narrow,
187 // and callers can provide only Wide.
188 template <typename Wide, typename Narrow>
189 Wide AddLong(Narrow a, Narrow b) {
191 std::is_integral<Narrow>::value && std::is_integral<Wide>::value,
193 static_assert(std::is_signed<Narrow>::value == std::is_signed<Wide>::value,
195 static_assert(sizeof(Narrow) * 2 == sizeof(Wide), "only twice as long");
197 return static_cast<Wide>(a) + static_cast<Wide>(b);