1 // Copyright 2021 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef BASE_AS_CONST_H_
6 #define BASE_AS_CONST_H_
12 // C++14 implementation of C++17's std::as_const():
13 // https://en.cppreference.com/w/cpp/utility/as_const
15 constexpr std::add_const_t<T>& as_const(T& t) noexcept {
20 void as_const(const T&& t) = delete;
24 #endif // BASE_AS_CONST_H_