tree: 34c398beaff48ccb01fc84680ca8b5d62fd6d2ff [path history] [tgz]
  1. bind.h
  2. bind_internal.h
  3. bind_nocompile.nc
  4. bind_unittest.cc
  5. callback.h
  6. callback_forward.h
  7. callback_helpers.cc
  8. callback_helpers.h
  9. callback_helpers_unittest.cc
  10. callback_internal.cc
  11. callback_internal.h
  12. callback_nocompile.nc
  13. callback_tags.h
  14. callback_unittest.cc
  15. concurrent_callbacks.h
  16. concurrent_callbacks_unittest.cc
  17. concurrent_closures.cc
  18. concurrent_closures.h
  19. concurrent_closures_unittest.cc
  20. DEPS
  21. disallow_unretained.h
  22. function_ref.h
  23. function_ref_nocompile.nc
  24. function_ref_unittest.cc
  25. overloaded.h
  26. overloaded_nocompile.nc
  27. overloaded_unittest.cc
  28. README.md
  29. unretained_traits.h
base/functional/README.md

base/functional library

What goes here

This directory contains function objects from future STL versions and closely related types.

Things should be moved here that are generally applicable across the code base. Don‘t add things here just because you need them in one place and think others may someday want something similar. You can put specialized function objects in your component’s directory and we can promote them here later if we feel there is broad applicability.

Design and naming

Fundamental //base principles apply, i.e.:

Function objects should either come directly from the STL or adhere as closely to STL as possible. Functions and behaviors not present in STL should only be added when they are related to the specific function objects.

For STL-like function objects our policy is that they should use STL-like naming even when it may conflict with the style guide. So functions and class names should be lower case with underscores. Non-STL-like classes and functions should use Google naming. Be sure to use the base namespace.