xref: /aosp_15_r20/external/cronet/base/functional/README.md (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1# base/functional library
2
3[TOC]
4
5## What goes here
6
7This directory contains function objects from future STL versions and closely
8related types.
9
10Things should be moved here that are generally applicable across the code base.
11Don't add things here just because you need them in one place and think others
12may someday want something similar. You can put specialized function objects in
13your component's directory and we can promote them here later if we feel there
14is broad applicability.
15
16### Design and naming
17
18Fundamental [//base principles](../README.md#design-and-naming) apply, i.e.:
19
20Function objects should either come directly from the STL or adhere as closely
21to STL as possible. Functions and behaviors not present in STL should only be
22added when they are related to the specific function objects.
23
24For STL-like function objects our policy is that they should use STL-like naming
25even when it may conflict with the style guide. So functions and class names
26should be lower case with underscores. Non-STL-like classes and functions should
27use Google naming. Be sure to use the base namespace.
28