libantioch / antioch

C++ Chemical Kinetics, Thermodynaimics, and Transport Library
https://libantioch.github.io/
Other
22 stars 17 forks source link

remove_reference to make C++11 asserts more robust #213

Closed roystgnr closed 8 years ago

roystgnr commented 8 years ago

This fixes a compile-time issue when I try e.g. antioch_assert_greater(expression-returning-reference, 0.0) and the temporary on the right can't be static-cast to the reference type on the left.

pbauman commented 8 years ago

Hey, nice! I bet this is what was going on in libqueso/queso#430 re: compiler errors on assert with C++11. I'll try and port this to QUESO and see if it gets rid of the issues there and then, hopefully, it will be easy to close that out.

roystgnr commented 8 years ago

This should fix the "int vs int&" errors; I'm afraid the "string vs char*" errors are a different ballgame though.

pbauman commented 8 years ago

Cool, that works because the former were much more numerous than the latter.