Struct BareSpecValues¶
Defined in File index_basis_registry.hpp
Struct Documentation¶
-
struct BareSpecValues¶
what a bare brace list in the spec argument of IndexBasisRegistry::add() and its kin,
{10}or{Spin::any, true}, binds to once IndexSpaceSpec and IndexBasisSpec reject it, through its one constructor. Nothing else reaches it: a bare value has no converting constructor to use, an empty{}no default constructor, and a designated list initializes aggregates only, so those bind to the spec and to the argument-list overloads as before. The overloads that take this fail with a diagnostic that names the spec spelling. A list of mixed types,{Spin::any, true}, has nostd::initializer_list<T>and keeps the compiler’s own diagnostic, as does{{}, 10}: the spec’s guard rejects it only once chosen, so the spec and this helper are both viable for it and the call is ambiguous.Note
list-initialization of a class, so that no compiler deduces from the list against a template parameter: MSVC forms
std::initializer_list<void>for a designated list againststd::initializer_list<T>, and gcc reads a designated list againstconst T (&)[N]as a GNU array designator, hard errors both rather than deduction failures