-
Notifications
You must be signed in to change notification settings - Fork 19
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
Try&Catch construct for mrcpp::get_func
#87
Comments
This should be already available if you access an element of the vector with |
That was also my point. How much should we be concerned with performance at this level? We are talking about a vector of tree structures containing a handful of elements (essentially |
Regarding the example in the link, would it be working if I remove the assignment |
The website is coliru. You need to do something with the result of |
if I place the |
Is this specific to |
Even better, if you can templatize over these conditions you'd like to check. Then it's the compiler checking everything makes sense. |
I think you can safely ignore performance at this level |
Yes. It's pretty Concerning templetizing... thanks but my C++ level is well below what you would like me to do here, I'm afraid... :-( |
What I was also trying to say is that in a month or two, you'll have forgotten why you're checking that vector has length 15. |
Agree. The current "hack" (awaiting for Stig's counseling) is to pass the index where I want the fcn to be placed. The vector size has to be exactly that index, otherwise I abort. Not pretty, but safe :-) |
I would like to implement this feature: [www.cplusplus.com/reference/stdexcept/out_of_range/] for the
mrcpp::get_func
ofFunctionTreeVector
.It would be nice to have such a feature for the
XCFunctional
stuff, now that I am heavily making use ofFunctionTreeVector
-s for densities and their gradients.Would that be OK?
The text was updated successfully, but these errors were encountered: