You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our implementation of type_safe we use __declspec(empty_bases) as an optimalisation. The result is that the size of the resulting struct is equal to the size of an int or double or anything we want to make type_safe. For example:
However, the structs floating_point_arithmetic and integer_arithmetic do not have __declspec(empty_bases). Therefore, if we would replace some structs with integer_arithmetic the implementation would be
In our implementation of
type_safe
we use__declspec(empty_bases)
as an optimalisation. The result is that the size of the resulting struct is equal to the size of an int or double or anything we want to make type_safe. For example:However, the structs
floating_point_arithmetic
andinteger_arithmetic
do not have__declspec(empty_bases)
. Therefore, if we would replace some structs withinteger_arithmetic
the implementation would bewhich uses more memory than the first version, while it has the same implementation.
Is it possible to add
__declspec(empty_bases)
to structs to enhance optimization?The text was updated successfully, but these errors were encountered: