-
Notifications
You must be signed in to change notification settings - Fork 122
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
Use the std::vector<>
namespace when declaring a size_type var for STL containers
#1072
Comments
std::vector
namespace when declaring a size_type var for STL containersstd::vector<>
namespace when declaring a size_type var for STL containers
I think this is kind of a duplicate of #1050, right? if so, I'm working on this |
Yes, hadn't seen the issue. Thanks for noticing. Closing this. |
actually, now that I think about this, it's not really a duplicate of #1050, since there I was talking about nested name qualifiers, this issue is about nested type qualifiers, if that's the right way to say it, so I'm reopening this. I apologise for the initial confusion. but I think it's a more general problem than just also, for anyone who's gonna be solving this, this issue is version- and machine-dependent. on my machine and with my version of Clang, the generated type for the |
I suspect we can get away most of the time using auto. |
true, I've thought about this as well. but is it possible to generate code with |
I think |
It is possible to generate such types assuming that we know the right hand side of the assignment. In some cases auto is preferable, such as Kokkos, where the intent is to hide the implementation details and allow things to recompile for other platforms/architectures. On the other hand, using excessively |
Clad generates the derivative like so:
As the comment suggests,
size_type
is not a member ofstd
, but is included insidestd::vector
. So this line should be altered to:The text was updated successfully, but these errors were encountered: