tree: 36350e3176b2337bbe66d35593ae8a543461ed2a [path history] [tgz]
  1. bind.h
  2. bind_internal.h
  3. bind_unittest.cc
  4. bind_unittest.nc
  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_tags.h
  13. callback_unittest.cc
  14. callback_unittest.nc
  15. DEPS
  16. disallow_unretained.h
  17. function_ref.h
  18. function_ref_unittest.cc
  19. function_ref_unittest.nc
  20. identity.h
  21. identity_unittest.cc
  22. invoke.h
  23. invoke_unittest.cc
  24. not_fn.h
  25. not_fn_unittest.cc
  26. overloaded.h
  27. overloaded_unittest.cc
  28. overloaded_unittest.nc
  29. README.md
  30. 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.