Skip to content

Commit 325020d

Browse files
Update lib/checkclass.cpp
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
1 parent b8fbea9 commit 325020d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/checkclass.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ void CheckClassImpl::constructors()
356356
if (var.hasDefault()) {
357357
usage.init = true;
358358
hasAnyDefaultInit = true;
359-
} else if (var.isReference() || (var.isConst() && !var.isClass())) {
359+
} else if (!var.isStatic() && (var.isReference() || (var.isConst() && !var.isClass()))) {
360360
// the default constructor is deleted, so all members are initialized by every instance
361361
isDefaultConstructible = false;
362362
} else if (cpp14OrLater && !hasAnySelfInit && isInitialized(usage, FunctionType::eConstructor)) {

0 commit comments

Comments
 (0)