python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How to return const& from std::visit?
I have encountered what i consider to be a strange situation with std::visit and overloaded which is giving me a compiler error. To illustrate what i am trying to do I have an example using std::visit...
kanoisa
Votes: 0
Answers: 1
Is it possible for VariantClear to crash software if VariantInit is not called beforehand?
I have an exception that I cannot easily replicate, but I have a very strong suspicion that it happens during VariantClear().
I have a function that defines a variant and then passes it off to another...
Farhät
Votes: 0
Answers: 1
c++ - valid use of CRTP std::variant with two elements, but no more
I'm trying to use CRTP with std::variant to achieve a classic Expression class, for example in some algebraic data type
data Expr = Num Int
| Add Expr Expr
| Sub Expr Expr
...
I use CR...
farmerzhang1
Votes: 0
Answers: 1
A macro registering marked structures into an enum
I am searching for a macro, or a procedural macro, which could register some marked structures (or enums) as variants of an enum.
Moreover, I would like, that if the marked structures are implementing...
FreD
Votes: 0
Answers: 1