- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use etl::size on all platforms #981
Comments
There are a few ETL functions that have this issue, and it's down to 'Argument Dependent Lookup' (ADL) rules. What happens is that the compiler would see both the STL's and the ETL's variant of the function and complain about an ambiguous function call. The functions that can suffer from this are Putting these into the |
It would be nice to only include a specific subdirectory containing |
The full list of STL/ETL items that need
|
Because I prefer using |
I wanted to replace my
sizeof(array)/sizeof(array[0])
with a standardstd::size(array)
.ETL provides
etl::size(array)
for my AVR because I don't have an STL, however, the same code should also compile on my PC which uses STL, then I don't getetl::size(array)
.Current workaround is using ETL_ARRAY_SIZE.
I think the cleanest solution would be to only provide
std::size(array)
for non-stl targets. I know this is a sensitive subject but if something is implemented exactly the same:(I think
etl::move
,etl::forward
,... would also benefit from this).The text was updated successfully, but these errors were encountered: