Make basic_process default constructor =delete'd#563
Conversation
The basic_process defaulted default constructor fails to compiles and since it is *NOT* expected to be default constructible this marks it as such and removes the misleading comment Fixes boostorg#562
|
Are you telling me that a defaulted default constructor is not expected to be deleted? |
A defaulted constructor tells the compiler to automatically synthesize its definition when it needs one. In this case, it will fail to do so because a sub-object is not default constructible itself, but that could depend on the template parameter,... The semantic meaning conveyed by a defaulted implementation is that it is an available method, if you want to prevent or document non-usage explicitly that's what Here in practice we could probably also just remove the default constructor. Since there are other constructors, omitting the no argument one will prevent it from being made available by the compiler implicitly. But deleting it explicitly makes is very clear to users, through the compiler error message, that it's non-availability is intentional (versus a "no matching constructor found, see the following 3 billions template constructors") |
The basic_process defaulted default constructor fails to compiles and since it is NOT expected to be default constructible this marks it as such and removes the misleading comment
Fixes #562