| // Copyright 2021 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #ifndef BASE_NUMERICS_OSTREAM_OPERATORS_H_ |
| #define BASE_NUMERICS_OSTREAM_OPERATORS_H_ |
| // Overload the ostream output operator to make logging work nicely. |
| std::ostream& operator<<(std::ostream& os, const StrictNumeric<T>& value) { |
| os << static_cast<T>(value); |
| // Overload the ostream output operator to make logging work nicely. |
| std::ostream& operator<<(std::ostream& os, const ClampedNumeric<T>& value) { |
| os << static_cast<T>(value); |
| #endif // BASE_NUMERICS_OSTREAM_OPERATORS_H_ |