Closed
Bug 1497330
Opened 6 years ago
Closed 6 years ago
TextOverflow.h:48:3: warning: explicitly defaulted default constructor is implicitly deleted [-Wdefaulted-function-deleted]
Categories
(Core :: Web Painting, defect, P3)
Core
Web Painting
Tracking
()
RESOLVED
FIXED
mozilla64
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
clang version 8.0.0 (trunk 343613) gives me this warning output for every compilation unit that includes TextOverflow.h: ========= 0:12.94 ../../../mozilla/layout/generic/TextOverflow.h:48:3: warning: explicitly defaulted default constructor is implicitly deleted [-Wdefaulted-function-deleted] 0:12.94 TextOverflow() = default; 0:12.94 ^ 0:12.94 ../../../mozilla/layout/generic/TextOverflow.h:232:26: note: default constructor of 'TextOverflow' is implicitly deleted because field 'mContentArea' has a deleted default constructor 0:12.94 LogicalRect mContentArea; 0:12.94 ^ 0:12.94 ../../dist/include/mozilla/WritingModes.h:1966:3: note: 'LogicalRect' has been explicitly marked deleted here 0:12.94 LogicalRect() = delete; 0:12.94 ^ ========= Basically, TextOverflow has a member-var whose constructor is explicitly deleted -- so TextOverflow's explicitly-default constructor is *actually* deleted, because it doesn't have any way to construct that member. So we should just make its explicitly-defaulted constructor be explicitly deleted instead, to reflect reality and address the build warning.
Assignee | ||
Comment 1•6 years ago
|
||
Before this patch, TextOverflow had an explicitly-*defaulted* default constructor. But in fact, this constructor was *implicitly* deleted because one of the member variables (of type LogicalRect) couldn't be default-constructed due to having its own default constructor explicitly deleted. clang trunk highlights this inconsistency with a build warning (-Wdefaulted-function-deleted) which this patch addresses.
Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/255753135a7f Explicitly delete TextOverflow's default constructor. r=dthayer
Assignee | ||
Updated•6 years ago
|
Comment 3•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/255753135a7f
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Assignee | ||
Updated•6 years ago
|
Blocks: build-clang-trunk
You need to log in
before you can comment on or make changes to this bug.
Description
•