Closed
Description
One can enforce non-default-initialization and non-integral initialization with
struct onlydouble { onlydouble() = delete; // OK, but redundant onlydouble(std::intmax_t) = delete; onlydouble(double); };
This enforces "non-integral initialization" only in the sense of causing an ambiguity in overload resolution in most cases, rather than through the "honeypot" behavior of deleted functions. This is also a poor way to enforce non-integral initialization, since the same ambiguity also blocks initialization with long double
.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity