The term "scalar" comes from linear algebra, where it is used to differentiate a single number from a vector or matrix. The meaning in computing is similar. It distinguishes a single value like an integer or float from a data structure like an array. This distinction is very prominent in Perl, where the $ sigil (which resembles an 's') is used to denote a scalar variable and an @ sigil (which ...
terminology - What does it mean when data is scalar? - Software ...
The terms 'scalar type' or 'scalar field' are usually used to contrast them with compound types/fields. A compound type is easiest to define and it is a type that contains multiple distinct elements. These elements can have the same type, in which case the compound is an array or a list, or different types, in which case the compound is typically a struct or a class. A scalar type is a type ...
There are several questions related to presence field tracking of scalar fields in protobuf 3, but I didn't find any with generic default approach recommendation.
Most noticeable is if the destructor is called as part of a deletion on dynamic memory (delete). In the disassembly, one will see an actual function call to an address associated with some_type::scalar deleting destructor. Once a module (EXE or DLL) has been loaded into the process space, one can set a breakpoint at its disassembly address.
0 Well, every scalar type in C, pointer, boolean (since C99), number (floating-point or not) and enumeration (due to direct mapping to numbers) has a "natural" falsey value, so that's good enough for any conditional expression.