aligned_union support
I have recently been (trying to) build vtk-m with several compilers. Support for aligned_union seems pretty bad to me. The file I used to test is attached -- au5.cpp. I ran, e.g., g++ -std=c++11 au5.cpp && ./a.out
, with results as indicated, for each compiler in this list:
- g++ 4.9.3 NO
- g++ 7.3.0 YES
- pgc++ 19.7 NO
- icpc 19.0.4 NO
- clang++ 9.0.0 NO
- xlc++ 2019-08-20 NO
- CC 2.6.2 YES (Cray C++ compiler)
These were all run on the RZ network at the LLNL computer center. au5.cpp As you can see, the only compilers I could find that support aligned_union are recent GNU compilers, and the Cray C++ compiler. Compilers from IBM, Intel, Portland Group, and clang++ all failed, with an error message to the effect that the std namespace doesn't include any member named aligned_union.
This matters because of line 20 in vtkm/internal/Variant.h:
#if (defined(VTKM_GCC) && (__GNUC__ == 4)) || defined(VTKM_ICC)
If my experiment and claims are accurate, that line seems a little inadequate.
Thank you, Lee Busby, LLNL