https://bugs.documentfoundation.org/show_bug.cgi?id=131117
--- Comment #2 from Stephan Bergmann <[email protected]> ---
(In reply to Mike Kaganski from comment #0)
> I suppose this is not a correct semantically, since static_cast is to cast
> some existing value of a different type into wanted other type; while when
> literals are involved, what happens is *creation* of a new value of
> specified type. In my opinion, it's better to use function-style
> (ctor-style) cast syntax here, like `wanted_type(literal)`.
Semantically, both static_cast and functional cast are fine there, and have the
exact same meaning. Syntactically, functional cast can only be used if
wanted_type is a simple-type-specifier (e.g., it cannot be used if wanted_type
is "unsigned long"). Apart from that, I at least have no clear preference for
either (functional cast is less verbose, though), and am not sure whether such
a cosmetic clean-up is worth it and wanted.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs