blob: 66eb07b233ff26b72fa7321829bbe0bf2edbe2ab [file] [log] [blame]
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <ostream>
#include <type_traits>
#include <utility>
namespace gurl_base::internal {
// Detects whether using operator<< would work.
// Note that the above #include of <ostream> is necessary to guarantee
// consistent results here for basic types.
template <typename T>
concept SupportsOstreamOperator =
requires(const T& t, std::ostream& os) { os << t; };
} // namespace gurl_base::internal