-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't build mpark::visit under cuda compiler #63
Comments
FWIW, building same example using
|
Still fails with nvcc 10.2.89, but with a different error message:
As a workaround, you can replace the implementation of the template <typename Visitor, typename... Vs>
inline constexpr decltype(auto) visit(Visitor &&visitor, Vs &&... vs) {
return (detail::all({!vs.valueless_by_exception()...})
? (void)0
: throw_bad_variant_access()),
detail::visitation::variant::visit_value(
lib::forward<Visitor>(visitor), lib::forward<Vs>(vs)...);
} with this: template <typename Visitor, typename... Vs>
inline constexpr decltype(auto) visit(Visitor &&visitor, Vs &&... vs) {
return (detail::all(std::initializer_list<bool>({!vs.valueless_by_exception()...}))
? (void)0
: throw_bad_variant_access()),
detail::visitation::variant::visit_value(
lib::forward<Visitor>(visitor), lib::forward<Vs>(vs)...);
} Note that nvcc has problems with the variadic brace-initializer. I've already reported the problem for nvcc 9.2.88 but it seems that the same bug reappeared... |
Does #73 fix this? |
Yes, it seems to work with https://github.com/mpark/variant/blob/d1cdfdd3f2ed80710ba4d671fe6bffaa3e28201a/master/variant.hpp |
I actually am getting errors of the following form:
I am currently able to work around this by adding I imagine there are better solutions to this, anyone else run into this? |
@dholladay00 Which version of |
I am using the latest master of mpark variant with Cuda 10.1. Here is a more detailed version of the error(s):
along with some warnings along these lines:
|
I'm trying to build code using
mpark::visit
, which compiles fine under gcc/clang, but fails to compile with CUDA compiler:I installed CUDA compiler on Ubuntu 18.04:
Simple example:
Here's the gist with makefile:
https://git.zooxlabs.com/gist/rrishel/cbfb122a65cdb629f89233e1fa2bc96c
The text was updated successfully, but these errors were encountered: