github google/fruit v2.0.0
Fruit 2.0.0

This is the second major release of Fruit.

Major changes compared to 1.0.2

  • Compile-time errors are now reported in a much more concise way, hiding template instantiations of Fruit internals.
  • More detailed errors in some cases (e.g. when attempting to do a bind<T, T>).
  • Annotated injection is now supported, using fruit::Annotated<> or the ANNOTATED() macro.
  • Fruit can now be built statically (change contributed by @mjkoo).
  • Added support for GCC 5.
  • Added support for libc++ (only when using clang).
  • Added support for the Bazel build system (in parallel with CMake, which remains supported).
  • Added support for OS X (clang-only).
Backwards-incompatible changes
  • fruit::createComponent() now returns a PartialComponent, and Component no longer inherits from PartialComponent. In some cases, this now requires a conversion of the PartialComponent returned by createComponent() to the desired Component type. This conversion also compiles with Fruit 1.x; so existing code can be gradually migrated to be compatible with Fruit 2.x while it remains compatible with Fruit 1.x, in preparation for the switch.
Notable internal changes
  • Now using Travis CI for post-submit testing
  • The compile-time graph traversal to find dependency loops now uses a DFS instead of expanding dependencies, improving compile times.
  • All metaprogramming code has been rewritten to use a more readable and lazy-evaluated functional style.
  • Improved testing coverage
  • Run tests under Asan where possible.
  • Some checks now run at configure time to detect compiler features/bugs and configure Fruit appropriately. This allows to get rid of per-compiler checks.
latest releases: v3.6.0, v3.5.0, v3.4.0...
4 years ago