Did this mostly because:
- It may be useful for creating ThreadPools on demand
- I love using the pattern in Python: https://github.com/ska-sa/dask-ms/blob/master/daskms/table_proxy.py#L143-L164
- I wanted to see if the same could be achieved in C++.
Notes
- Needs C++17 (which ducc0 supports \o/)
- Assembled from stackoverflow
- Some copies of the Arg... pack which could be problematic in the case of non-copyable args.
- Currently a .cpp file but could easily be converted to a header