// Copyright 2021 The Chromium Authors // 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_ #include namespace base { namespace internal { template class ClampedNumeric; template class StrictNumeric; // Overload the ostream output operator to make logging work nicely. template std::ostream& operator<<(std::ostream& os, const StrictNumeric& value) { os << static_cast(value); return os; } // Overload the ostream output operator to make logging work nicely. template std::ostream& operator<<(std::ostream& os, const ClampedNumeric& value) { os << static_cast(value); return os; } } // namespace internal } // namespace base #endif // BASE_NUMERICS_OSTREAM_OPERATORS_H_