Releases: Cooolrik/ctle
v1.5.0
tuples of tuples added
Added tuples of tuples "nm_tup", which is a lightweight matrix class for n x m tuple sizes, where n and m are 1->4
new template: multithread_pool, and reformatting
The multithread_pool template is used to create a multithread pool, a pool of objects which can be shared by multiple threads. The objects are assumed to be expensive to allocate or have allocated, so it makes more sense to share them among multiple threads/jobs, instead of having one pool per thread. On init, a vector of preallocated objects are inserted to the pool and on deinit, the list of objects are returned, so that the caller can deallocate the objects.
total rewrite of property templates
The property templates are now renamed prop_[....] and is made much easier to implement. Values are removed from the properties, and the user is required to always implement the value separately, but this removes the need of defining the owner as a friend of the property.
- Standard value properties now have very low (no) overhead vs using a get method in the class directly.
- Specific specializations for unique_ptr and atomic are also added, so the user need not do anything to access these types
- Custom properties with lambda methods are still supported, but since most props will only use get/set methods, these are implemented separately to lower the general overhead
improvements to property templates
- property templates with values now always initialize all types, including trivially constructable values
- added a status_error exception type
- get/set methods in templates, as well as operators will now throw status_error exceptions, if there are errors in the property get/set function
- to avoid exceptions, there are additional get/set methods added which returns a status value