[fusion] Compilation errors on Intel compiler (C++14)
Hi, I'm seeing compilation errors coming from Boost.Fusion headers on Sandia-intel-17.0-c++14: http://www.boost.org/development/tests/develop/developer/output/Sandia-intel... Notably, the same tests compile fine in C++11 mode on the same compiler, which makes me think that is related to C++14 mode specifically. Looking at the code, it seems the compiler makes constexpr functions implicitly const-qualified even though it shouldn't in C++14 mode, so it's likely a compiler bug. Still, is it possible to add a workaround?
On Tue, 6 Dec 2016 19:46:03 +0300
Andrey Semashev
Hi,
I'm seeing compilation errors coming from Boost.Fusion headers on Sandia-intel-17.0-c++14:
http://www.boost.org/development/tests/develop/developer/output/Sandia-intel...
Notably, the same tests compile fine in C++11 mode on the same compiler, which makes me think that is related to C++14 mode specifically. Looking at the code, it seems the compiler makes constexpr functions implicitly const-qualified even though it shouldn't in C++14 mode, so it's likely a compiler bug. Still, is it possible to add a workaround?
I recently added a config macro BOOST_FUSION_DISABLE_VARIADIC_VECTOR which reverts completely to the C++03 fusion::vector code. This will affect fusion::tuple also. Unfortunately I do not think it will solve this particular issue - one of the files is used by both fusion::vector versions. Is it possible to override BOOST_CXX14_CONSTEXPR somehow? Lee
On 12/06/16 20:39, Lee Clagett wrote:
On Tue, 6 Dec 2016 19:46:03 +0300 Andrey Semashev
wrote: Hi,
I'm seeing compilation errors coming from Boost.Fusion headers on Sandia-intel-17.0-c++14:
http://www.boost.org/development/tests/develop/developer/output/Sandia-intel...
Notably, the same tests compile fine in C++11 mode on the same compiler, which makes me think that is related to C++14 mode specifically. Looking at the code, it seems the compiler makes constexpr functions implicitly const-qualified even though it shouldn't in C++14 mode, so it's likely a compiler bug. Still, is it possible to add a workaround?
I recently added a config macro BOOST_FUSION_DISABLE_VARIADIC_VECTOR which reverts completely to the C++03 fusion::vector code. This will affect fusion::tuple also. Unfortunately I do not think it will solve this particular issue - one of the files is used by both fusion::vector versions.
I think reverting Boost.Fusion to C++03 is an overkill, given that in C++11 mode all tests are green. So at least C++11 is supported well enough.
Is it possible to override BOOST_CXX14_CONSTEXPR somehow?
Only if you define and use your own similar macro in Boost.Fusion. Or if we decide that C++14 constexpr is broken enough in the compiler to warrant the change in Boost.Config. The compiler passes all Boost.Config tests[1] in C++14 mode, so I guess it supports C++14 mostly ok. [1]: http://www.boost.org/development/tests/develop/developer/config.html
Hi Andrey,
I'm seeing compilation errors coming from Boost.Fusion headers on Sandia-intel-17.0-c++14:
http://www.boost.org/development/tests/develop/developer/output/Sandia-intel...
Notably, the same tests compile fine in C++11 mode on the same compiler, which makes me think that is related to C++14 mode specifically. Looking at the code, it seems the compiler makes constexpr functions implicitly const-qualified even though it shouldn't in C++14 mode, so it's likely a compiler bug. Still, is it possible to add a workaround? I think the bug affects not only fusion, i.e. updating config is better.
Is it possible to override BOOST_CXX14_CONSTEXPR somehow?
Only if you define and use your own similar macro in Boost.Fusion. Or if we decide that C++14 constexpr is broken enough in the compiler to warrant the change in Boost.Config. The compiler passes all Boost.Config tests[1] in C++14 mode, so I guess it supports C++14 mostly ok.
[1]: http://www.boost.org/development/tests/develop/developer/config.html It seems the test is not enough about such case. I opened a pull-request that updates config_test: https://github.com/boostorg/config/pull/104 .
Thanks, Kohei Takahashi
participants (3)
-
Andrey Semashev
-
Kohei Takahashi
-
Lee Clagett