Boost logo

Boost :

From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2021-03-10 15:16:08


On 10/03/2021 14:13, Ruben Perez via Boost wrote:

> Values are stored as variants. Having more integer types means having more
> options in the variant. This does two nasty effects:

I am not warm on the use of variants in this situation.

One should bind types to specifics before talking to a DB, and if those
types do not match, then the operation should fail.

Even for querying unknown DBs, I still find use of variants here
inappropriate. You should be able to visit a template templated with the
right type, sure, but that isn't your library going off and making
parsing decisions on the behalf on the end user without them telling you
what parsing is, for this situation.

> I don't think the performance gain you may get from using 1, 2 or 4 byte
> integers (if any) is worth it, especially in 64 bit systems.

It's not about performance. It's about correctness.

Niall


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk