forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
we currently do not implement the restriction on defaulted and deleted functions from https://eel.is/c++draft/dcl.contract.func#6
This means we accept pre and post, but they get dropped since the constructor is trivial.
A virtual function ([class.virtual]), a deleted function ([dcl.fct.def.delete]), or a function defaulted on its first declaration ([dcl.fct.def.default]) shall not have a function-contract-specifier-seq.
testcase https://godbolt.org/z/Gfba6MaTv
struct S{
S() pre(false) = default;
};
int main() {
S s;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels