You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to pass a non-const reference to my class on construction, but emplace takes arguments as const &. My guess is, the const doesn't need to be there.
Works for C++11, so I guess it should also be ok for C++03. Godbolt
The text was updated successfully, but these errors were encountered:
Yeah, I remembered the cases where const has to be there. So duplication seems unavoidable.
I'm not sure if it makes sense for every emplace, otherwise I could do the grunt work. My usecase atm would only involve etl::variant.
The C++03 compatible emplace functions in the ETL are not really the same as those in C++11.
C++11's take 'universal' references, while those for C++03 must be a specific type.
They are also limited in the number of parameters, as every variation must be defined.
I need to pass a non-const reference to my class on construction, but emplace takes arguments as
const &
. My guess is, theconst
doesn't need to be there.Works for C++11, so I guess it should also be ok for C++03.
Godbolt
The text was updated successfully, but these errors were encountered: