mrdocs::describe::isSingleStringObject
Whether a described type collapses to a single string.
Synopsis
template<class T>
concept isSingleStringObject = has_describe_members<T>::value &&
describedMemberCount<T>() == 1 &&
describedMembersAllText<T>();
Description
true when T is a described struct whose only reflected member (inherited ones included) is a plain string. Such a type is represented as that one string rather than as a nested object, both in the XML output and in the reflection DOM. This is the single source of truth for that rule, shared by the XML writer and the describedToDom proxy.
Examples:
-
ExprInfo(its only member is the written expression) ‐>true; reflects as the written string. -
SourceInfo,FunctionSymbol(many members) ‐>false. -
a described struct with one non‐string member ‐>
false.
Created with MrDocs