OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_SAFE_MATH_H_ | 5 #ifndef BASE_NUMERICS_SAFE_MATH_H_ |
6 #define BASE_SAFE_MATH_H_ | 6 #define BASE_NUMERICS_SAFE_MATH_H_ |
7 | 7 |
8 #include "base/numerics/safe_math_impl.h" | 8 #include "base/numerics/safe_math_impl.h" |
9 | 9 |
10 namespace base { | 10 namespace base { |
11 | 11 |
12 namespace internal { | 12 namespace internal { |
13 | 13 |
14 // CheckedNumeric implements all the logic and operators for detecting integer | 14 // CheckedNumeric implements all the logic and operators for detecting integer |
15 // boundary conditions such as overflow, underflow, and invalid conversions. | 15 // boundary conditions such as overflow, underflow, and invalid conversions. |
16 // The CheckedNumeric type implicitly converts from floating point and integer | 16 // The CheckedNumeric type implicitly converts from floating point and integer |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 BASE_NUMERIC_ARITHMETIC_OPERATORS(Mod, %, %= ) | 262 BASE_NUMERIC_ARITHMETIC_OPERATORS(Mod, %, %= ) |
263 | 263 |
264 #undef BASE_NUMERIC_ARITHMETIC_OPERATORS | 264 #undef BASE_NUMERIC_ARITHMETIC_OPERATORS |
265 | 265 |
266 } // namespace internal | 266 } // namespace internal |
267 | 267 |
268 using internal::CheckedNumeric; | 268 using internal::CheckedNumeric; |
269 | 269 |
270 } // namespace base | 270 } // namespace base |
271 | 271 |
272 #endif // BASE_SAFE_MATH_H_ | 272 #endif // BASE_NUMERICS_SAFE_MATH_H_ |
OLD | NEW |