ice icon indicating copy to clipboard operation
ice copied to clipboard

Review the use of ICE_CPP11_COMPILER in public headers

Open bentoi opened this issue 7 years ago • 0 comments

We use the ICE_CPP11_COMPILER macro in few places in public headers. This is problematic given that this macro can take different values based on the -std=<version> option.

It's desirable that the Ice ABI remains the same regardless of the C++ version used to build Ice otherwise this imply having different builds for different -std=<version> options.

Right now, this is mostly a problem when building Ice on Linux/ARM platforms where IceUtilInternal::Atomic has different and incompatible definitions if you compile with -std=c++98 or -std=c++11. See also #100. One potential solution here would be to use GCC builtins as well on ARM if it works.

We also use it for declaring a virtual no-throw destructor for exceptions. This doesn't cause binary compatibility issues however given that our exceptions derive std::exception which declares a virtual destructor. We should still see if this declaration is required and if it can avoid using the macro.

bentoi avatar Jun 14 '18 14:06 bentoi