mpark / variant

C++17 `std::variant` for C++11/14/17
https://mpark.github.io/variant
Boost Software License 1.0
659 stars 88 forks source link

NVCC: Fix Compile with C++14 Constexpr #71

Closed ax3l closed 4 years ago

ax3l commented 4 years ago

Out of the many C++14 constexpr constructs, one does not compile with NVCC - even when using -std=c++14 --expt-relaxed-constexpr.

Seen with all versions of NVCC so far (latest tests with 10.1 and 10.2), occurs even if simply included for host-side code.

Fix #70

Update: uh, it helps to replace the brackets with an explicit constructor of an initializer list :) does not work

ax3l commented 4 years ago

@mpark CI seams to fail in master for unrelated reasons

gridley commented 4 years ago

So, I think that #73 may fix this. You should take a look. Simplifying all-not to not-any seems to do the trick.

mpark commented 4 years ago

@ax3l sorry for the delay, been busy for a while. do you know if #73 solves the problem?

ax3l commented 4 years ago

Thanks for the hint, I'll try to test this these days again. Is #73 already ready to be tested? CI does not pass on it.

gridley commented 4 years ago

I was unable to figure out why CI would fail on #73 myself. I didn’t try to fix it since it had been mentioned CI was failing in master anyways.

mpark commented 4 years ago

The configs for which the CI is failing is due to libc++ tests failures, from not having implemented https://wg21.link/P0608 yet. I'm working on fixing it.

ax3l commented 4 years ago

Fixed by #73 as well, closing in favour of it :) Thanks a lot!