| Index: base/functional.h
|
| diff --git a/base/functional.h b/base/functional.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8e334c820ac1e8311e15b6be899d4f90a376a3de
|
| --- /dev/null
|
| +++ b/base/functional.h
|
| @@ -0,0 +1,30 @@
|
| +// Copyright 2017 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_FUNCTIONAL_H_
|
| +#define BASE_FUNCTIONAL_H_
|
| +
|
| +#include <functional>
|
| +#include <utility>
|
| +
|
| +#include "base/type_traits.h"
|
| +
|
| +namespace base {
|
| +
|
| +// std::less<> from C++14.
|
| +// Needed for improved flat containers API.
|
| +
|
| +struct less {
|
| + template <typename T, typename U>
|
| + constexpr auto operator()(T&& lhs, U&& rhs) const
|
| + -> decltype(std::forward<T>(lhs) < std::forward<U>(rhs)) {
|
| + return std::forward<T>(lhs) < std::forward<U>(rhs);
|
| + }
|
| +
|
| + using is_transparent = int;
|
| +};
|
| +
|
| +} // base
|
| +
|
| +#endif // BASE_FUNCTIONAL_H_
|
|
|