Whilst reading through the DirectWrite source code I came across the following struct:
/// <summary>
/// Line breakpoint characteristics of a character.
/// </summary>
struct DWRITE_LINE_BREAKPOINT
{
/// <summary>
/// Breaking condition before the character.
/// </summary>
UINT8 breakConditionBefore : 2;
/// <summary>
/// Breaking condition after the character.
/// </summary>
UINT8 breakConditionAfter : 2;
/// <summary>
/// The character is some form of whitespace, which may be meaningful
/// for justification.
/// </summary>
UINT8 isWhitespace : 1;
/// <summary>
/// The character is a soft hyphen, often used to indicate hyphenation
/// points inside words.
/// </summary>
UINT8 isSoftHyphen : 1;
UINT8 padding : 2;
};
Notice the strange " : " after each member declaration. I'm going to assume it's a default initialisation value for the member variable.
I tried searching Google to confirm, but without knowing exactly what it's called I didn't get far (most of the results where to do with default initialisation).
What is the name of this technique?