Added optional cleanup parameter to conversion function
This commit is contained in:
parent
b773bb61c3
commit
f44eb1760e
1 changed files with 3 additions and 2 deletions
|
@ -63,11 +63,12 @@ struct criterion_test_params {
|
|||
{}
|
||||
|
||||
template <typename T>
|
||||
constexpr criterion_test_params(std::vector<T, criterion::allocator<T>>& vec)
|
||||
constexpr criterion_test_params(std::vector<T, criterion::allocator<T>>& vec,
|
||||
void (*cleanup)(criterion_test_params *) = nullptr)
|
||||
: size(sizeof (T))
|
||||
, params(&vec[0])
|
||||
, length(vec.size())
|
||||
, cleanup(nullptr)
|
||||
, cleanup(cleanup)
|
||||
{}
|
||||
# endif
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue