Fruit 3.1.0
This is the first minor release in the 3.x branch.
New functionality
- Visual Studio 2015 is now officially supported (in addition to Visual Studio 2017), thanks to a contribution by @MrElusive.
- Fruit now reports a compile time error when a class must have a virtual destructor but doesn't have one, instead of resulting in undefined behavior at runtime when that class is destroyed during the injector destruction. Specifically, the following cases now result in a compile-time error:
registerProvider()
called with a lambda that returns a pointer to an abstract class with no virtual destructorregisterMultibindingProvider()
called with a lambda that returns a pointer to an abstract class with no virtual destructorregisterFactory()
called with a lambda that returns astd::unique_ptr<T>
, withT
an abstract class with no virtual destructorbind<I, C>()
used to bind astd::function<std::unique_ptr<I>(Args...)>
to astd::function<std::unique_ptr<C>(Args...)>
andI
doesn't have a virtual destructor
Bug fixes
- Update the Fruit test suite to work with recent versions of Bazel (e.g. 0.7.0)
- Fix a bug in Fruit that might have caused undefined behavior when using a STL implementation that doesn't implement
std::allocator::deallocate
usingmalloc()
. This bug did not affect GCC's STL, nor Clang's libc++ nor MSVC's STL implementation, but it could have affected non-standard STL implementations. - No longer trigger compiler warnings with recent versions of Clang.
Installation
See the installation instructions here for how to compile from source and for links to pre-built binary packages for various Linux distributions.