variant
variant copied to clipboard
C++17 `std::variant` for C++11/14/17
CUDA supports neither exceptions nor `std::terminate` in device code, but NVCC silently ignores them. Unfortunately, Clang, which can be used as a drop-in replacement for NVCC [to compile CUDA code](https://www.llvm.org/docs/CompileCudaWithLLVM.html),...
Thank you for this stand-alone implementation. My problem with it is - I don't know whether to use it, or any of the other ones: Boost, eggs-cpp, Martin Moene's or...
Using `clang` from trunk with `-std=c++17 -Oz`, the following code uses `overloaded` with an exhaustive set of lambdas to visit all cases of the `variant`: https://godbolt.org/z/k-r72L ``` #include #include #include...
I'm trying to build code using `mpark::visit`, which compiles fine under gcc/clang, but fails to compile with CUDA compiler: ``` visit-test.cpp(11): error: no instance of function template "mpark::visit" matches the...
``` #include #include "variant.hpp" struct sv { sv(const char*) {} }; int main() { mpark::variant v{"abc"}; std::cout
Is there a specific reason that CMake 3.6.3 is the minimum required version or is this just the smallest version against which was tested? I'm using this library with CMake...
We are seeing this warning while #including (V1.4.0) when using Clang 7.1.0: ``` /hpx/source/libs/datastructures/include/hpx/datastructures/detail/variant.hpp:2243:22: error: constructor accepting a forwarding reference can hide the copy and move constructors [bugprone-forwarding-reference-overload,-warnings-as-errors] inline constexpr...
This would be equivalent to the optimization in libstdc++ https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=267614 . There are doubts that this specific optimization is conformant. Because even the trivial move has observable side-effect (the address)....
I have added [PlatformIO](http://platformio.org/) manifest [library.json](https://docs.platformio.org/en/latest/manifests/library-json/index.html). Currently I published it in registry under my account (hacker-cb): https://registry.platformio.org/libraries/hacker-cb/MPark-Variant but you can make your own account to publish official releases.
code is here. ```c++ class Val : public mpark::variant { public: using mpark::variant::variant; }; int main() { Val val; val = true; return 0; } ``` Thank you so much...