Open bogado opened 3 years ago
Thank you for reporting this.
Do you have any suggestions as to how to fix this, please? And how serious of a problem is this for you?
Sorry - closed in error - and re-opened.
To fix this I think that using std::iterator_traits
would suffice. For example :
https://godbolt.org/z/8cG6b1x3Y
This would be friendly to older version of C++ and also be more portable. Depending on how you introduce the fix it might even work with old style sized arrays int[10]
for instance.
Hi Victor (I assume!)
Thanks for reporting this, and for the Godbolt link.
It's probably going to be a little while until we get to this, so as a suggestion in the meantime, if you haven't done it already, we'd suggest a workaround of writing something:
void verifyAllInRange(...)
{
// convert range to a vector or similar
Approvals::verifyAll(vector...)
}
Putting it on hold until either we move our tests to C++20 - or we have a CI build that builds on 20...
We can keep an eye on compiler support: https://en.cppreference.com/w/cpp/compiler_support
The function
verifyAll
assumes that the Container has an associated type namevalue_type
. This is not true for all views. The issue show up on "approvalTests.hpp:1656" for version 10.8.0.