bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: *** GMX Spamverdacht *** Re: C++17 skeleton with move semantics and


From: Frank Heckenbach
Subject: Re: *** GMX Spamverdacht *** Re: C++17 skeleton with move semantics and std::variant
Date: Mon, 09 Apr 2018 18:17:39 +0200

Hans Åberg wrote:

> > So for C++ we could either go back and disable the static type
> > checking completely, or do full dynamic checking (which std::variant
> > does by itself). I choose the latter. As you said, the performance
> > impact should be small, and the safety benefit substantial. (If
> > someone doesn't want it, they might be able to use an alternative
> > variant implementation without checks, or not use variant at all
> > ...)
> 
> That might be the difference: C++, unlike C, needs the types to
> select the right constructors. To get those and not only PODs was
> one motivation for introducing the variants.

Indeed, if one only wants to use PODs in C++, one can use the C
template (which I did until recently), so there's not much point
(IMHO) to a C++ template that supports only PODs.

Regards,
Frank



reply via email to

[Prev in Thread] Current Thread [Next in Thread]