Open edfvogel opened 2 years ago
I debugged an issue similar to this, and I think it may be related to libc++ using a proxy type (std::__val_expr<...>
) for the return type of some of std::valarray's overloaded binary operators (e.g. operator/
). This proxy type is allowed by the standard but Boost might not be handling it correctly.
In at least in one other case, I think the proxy type is subverting Boost's typeof system, which has to explicitly register types/templates for them to work. See boosts' libs/typeof/inclue/boost/typeof/std/valarray.hpp, which registers types such as std::valarray and std::slice, but not any proxy types. This can lead to uses of Boost's incomplete primary template encode_type_impl, which may trickle down into SFINAE errors elsewhere.
I am using the latest LLVM on Cygwin. I have also downloaded Boost 1.79.0.
When I try to compile the Boost test
accumulators/test/valarray.cpp
it will compile if I use the g++ headers, but not if I add-stdlib=libc++
.Here is a reduced example called
t.cpp
:Assuming that boost_1_79_0 is put in the area boost_1_79_0. A cut paste will look like:
Not an important issue, but I thought I would report it.
Thank you in advance for your time.
Ed Vogel