Closed hedayat closed 2 years ago
I'll look into it this weekend. I'll try as well to make the static check compatible for C++11 (or maybe at least C++14) but I'm afraid that, as you said, it will be a bit too complicated.
I'll look into it this weekend. I'll try as well to make the static check compatible for C++11 (or maybe at least C++14) but I'm afraid that, as you said, it will be a bit too complicated.
That'd be great. I'm sorry that I'm a bit lazy to work on C++11 compatibility (I consider it too old these days :P ).
I'll admit that I'm a bit lazy as well, I've looked a bit and I have no idea how to make the compile-time check compatible with C++11 (without rewriting a std::get
). I'll ship it like that because it fix a bug so the faster it's in a release the better, and support for older versions of C++ can still be improved in a future update, so it's OK I guess.
Fixes #265
It present a sub-optimal solution for C++ < 17, since it catches type incompatibility problems at runtime rather than during compile time. But at least, it works.
It is probably possible to make it work at compile time, specially for C++14; but I'm not sure I'll go for it.