Skip to content

Commit

Permalink
Use default constructor for default arguments
Browse files Browse the repository at this point in the history
GCC 4.8 complains about the initializer list.

gcc/rust/ChangeLog:

	* typecheck/rust-tyty.h: Change initializer list to default constructor
	call.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
  • Loading branch information
P-E-P committed Nov 20, 2024
1 parent 9614958 commit bd257b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gcc/rust/typecheck/rust-tyty.h
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ class ADTType : public BaseType, public SubstitutionRef
std::vector<SubstitutionParamMapping> subst_refs,
SubstitutionArgumentMappings generic_arguments
= SubstitutionArgumentMappings::error (),
RegionConstraints region_constraints = {},
RegionConstraints region_constraints = RegionConstraints{},
std::set<HirId> refs = std::set<HirId> ())
: BaseType (ref, ref, TypeKind::ADT, ident, refs),
SubstitutionRef (std::move (subst_refs), std::move (generic_arguments),
Expand All @@ -670,7 +670,7 @@ class ADTType : public BaseType, public SubstitutionRef
std::vector<SubstitutionParamMapping> subst_refs,
SubstitutionArgumentMappings generic_arguments
= SubstitutionArgumentMappings::error (),
RegionConstraints region_constraints = {},
RegionConstraints region_constraints = RegionConstraints{},
std::set<HirId> refs = std::set<HirId> ())
: BaseType (ref, ty_ref, TypeKind::ADT, ident, refs),
SubstitutionRef (std::move (subst_refs), std::move (generic_arguments),
Expand All @@ -683,7 +683,7 @@ class ADTType : public BaseType, public SubstitutionRef
std::vector<SubstitutionParamMapping> subst_refs, ReprOptions repr,
SubstitutionArgumentMappings generic_arguments
= SubstitutionArgumentMappings::error (),
RegionConstraints region_constraints = {},
RegionConstraints region_constraints = RegionConstraints{},
std::set<HirId> refs = std::set<HirId> ())
: BaseType (ref, ty_ref, TypeKind::ADT, ident, refs),
SubstitutionRef (std::move (subst_refs), std::move (generic_arguments),
Expand Down

0 comments on commit bd257b0

Please sign in to comment.