Make switchType more comfortable to use#931
Conversation
df71846 to
04ac76e
Compare
67d0d2b to
09a78e0
Compare
20246fb to
824b591
Compare
Clang 5 produces linking errors from this, so we can't actually apply it.
824b591 to
c22eeb6
Compare
ax3l
left a comment
There was a problem hiding this comment.
Looks great, minor wish about the macro-usage inline & some cleanup suggestions :)
| const Parameter< Operation::WRITE_DATASET > & parameters | ||
| ); | ||
|
|
||
| std::string errorMsg = "JSON: writeDataset"; |
There was a problem hiding this comment.
Cool, looks nice to use :)
You can const those members, I guess.
| std::string errorMsg = "JSON: writeDataset"; | |
| std::string const errorMsg = "JSON: writeDataset"; |
There was a problem hiding this comment.
Hm, to be fair I'm not a huge fan of making non-static members const since that automatically deletes any operator= members. Since there are places where I store instances of these structs inside other structs (the ADIOS2 backend for example), I would prefer not to have some inconspicuous member silently delete those operators..
Also, add a missing newline
ax3l
left a comment
There was a problem hiding this comment.
Thank you, looks great!
We should refactor some Python code where we are not yet using switchType, I think :)
|
Ups, we get an ICC error in WarpX: |
This PR:
DatasetHelpers.hpperrorMsgmemberTODO:
This is slightly API breaking since the template is no longer exposed to users. Users may still include the header explicitly if they need it.