|
Boost : |
Subject: Re: [boost] [review] outcome broken on clang/libstdc++ (Linux) and Apple clang/libc++ and gcc 7.2
From: Glen Fernandes (glen.fernandes_at_[hidden])
Date: 2018-01-27 22:06:53
On Sat, Jan 27, 2018 at 4:55 PM, Glen Fernandes wrote:
> I just tried boost-outcome unit tests with clang 4.0, 5.0 on Linux
> with libstdc++ with -std=c++14 and -std=c++1z which fails with many
> errors:
>
> e.g.
[snip]
> In file included from
> libs/outcome/test/tests/../../include/boost/outcome/detail/result_storage.hpp:34:
> libs/outcome/test/tests/../../include/boost/outcome/detail/../success_failure.hpp:54:42:
> error: no template named 'conditional_t' in namespace 'std'; did you
> mean 'conditional'?
> template <class T> using devoid =
> std::conditional_t<std::is_void<T>::value, void_type, T>;
> ~~~~~^~~~~~~~~~~~~
> conditional
> /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/type_traits:1780:12:
> note: 'conditional' declared here
> struct conditional
> ^
>
>
> Then I also tried the boost-outcome unit tests with Apple clang 8.1.0
> with libc++ with -std=c++14 and -std=c++1z which fails with errors
> like:
>
I pasted the wrong error output here; the right error output is:
clang-darwin.compile.c++
bin.v2/libs/outcome/test/core-outcome.test/clang-darwin-4.2.1/debug/cxxstd-14-iso/tests/core-outcome.o
In file included from libs/outcome/test/tests/core-outcome.cpp:30:
In file included from
libs/outcome/test/tests/../../include/boost/outcome/outcome.hpp:34:
In file included from
libs/outcome/test/tests/../../include/boost/outcome/detail/outcome_exception_observers.hpp:34:
In file included from
libs/outcome/test/tests/../../include/boost/outcome/detail/result_storage.hpp:35:
libs/outcome/test/tests/../../include/boost/outcome/detail/value_storage.hpp:181:22:
error: no matching constructor for initialization of 'value_type' (aka
'boost::outcome_v2::outcome<int, std::__1::error_code,
std::exception_ptr,
boost::outcome_v2::policy::error_code_throw_as_system_error<int,
std::__1::error_code, std::exception_ptr> >')
new(&_value) value_type; // NOLINT
^
libs/outcome/test/tests/../../include/boost/outcome/detail/result_storage.hpp:270:11:
note: in instantiation of member function
'boost::outcome_v2::detail::value_storage_nontrivial<boost::outcome_v2::outcome<int,
std::__1::error_code, std::exception_ptr,
boost::outcome_v2::policy::error_code_throw_as_system_error<int,
std::__1::error_code, std::exception_ptr> >
>::value_storage_nontrivial' requested here
: _state(std::move(o._state))
^
> Is this also a known issue? Only gcc 6 and gcc 7 with lisbtdc++ on
> Linux seem to pass. The other combinations I tried (clang + lisbtdc++
> on Linux, Apple clang + libc++) do not.
>
I spoke too soon, here gcc 7 does not pass. It ICEs:
libs/outcome/test/tests/../../include/boost/outcome/detail/result_value_observers.hpp:45:17:
in constexpr expansion of
â((boost::outcome_v2::detail::result_value_observers<boost::outcome_v2::detail::result_storage<int,
std::errc, boost::outcome_v2::policy::error_code_throw_as_system_error<int,
std::errc, void> >, int,
boost::outcome_v2::policy::error_code_throw_as_system_error<int,
std::errc, void>
>*)this)->boost::outcome_v2::detail::result_value_observers<boost::outcome_v2::detail::result_storage<int,
std::errc, boost::outcome_v2::policy::error_code_throw_as_system_error<int,
std::errc, void> >, int,
boost::outcome_v2::policy::error_code_throw_as_system_error<int,
std::errc, void>
>::<anonymous>.boost::outcome_v2::detail::result_storage<int,
std::errc, boost::outcome_v2::policy::error_code_throw_as_system_error<int,
std::errc, void>
>::result_storage<int>(boost::outcome_v2::in_place_type_t<int>(),
<anonymous>)â
libs/outcome/test/tests/core-result.cpp:330:41: internal compiler
error: in adjust_temp_type, at cp/constexpr.c:1206
constexpr result<int, std::errc> a(5), b(std::errc::invalid_argument);
[...]
0x6db788 cxx_eval_constant_expression
../../src/gcc/cp/constexpr.c:4034
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
Let me know if you need more context, but it appears boost-outcome is
also broken on gcc 7.2.
Glen
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk