17.07.2020 17:35, Alex Peshkoff via Firebird-devel wrote:
clearing an object of non-trivial type ‘struct Jrd::impure_value’;
I'm not sure why the compiler consider impure_value to be non-trivial. Is it because of
union in common or some particular members of it?
I think that using switches to turn off warnings is not best practice (warnings in general
are useful) and should be used only when there is no better solution. For this particular
case the following solution may be used instead:
memset((void*)&*impure, 0, sizeof(*impure));
i.e. explicit C-cast. It's absolutely safe cause it's anyway done when callin
mem* functions.
Do you agree it's better approach?
I would prefer to see method impure_value::clear() instead.
--
WBR, SD.
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel