Browse Source

LibWeb: Declare defaulted style value comparision operators inline

Some versions of clang, such as Apple clang-1400.0.29.202 error out on
the previous out of line operators. Explicitly defaulting comparison
operators out of line is allowed per P2085R0, but was checked in clang
before version 15 in C++20 mode.
Andrew Kaster 2 years ago
parent
commit
4a70fa052f

+ 0 - 2
Userland/Libraries/LibWeb/CSS/StyleValues/ContentStyleValue.cpp

@@ -19,6 +19,4 @@ ErrorOr<String> ContentStyleValue::to_string() const
     return m_properties.content->to_string();
 }
 
-bool ContentStyleValue::Properties::operator==(ContentStyleValue::Properties const&) const = default;
-
 }

+ 1 - 1
Userland/Libraries/LibWeb/CSS/StyleValues/ContentStyleValue.h

@@ -39,7 +39,7 @@ private:
     struct Properties {
         ValueComparingNonnullRefPtr<StyleValueList> content;
         ValueComparingRefPtr<StyleValueList> alt_text;
-        bool operator==(Properties const&) const;
+        bool operator==(Properties const&) const = default;
     } m_properties;
 };
 

+ 0 - 2
Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.cpp

@@ -40,6 +40,4 @@ ErrorOr<String> GridAreaShorthandStyleValue::to_string() const
     return builder.to_string();
 }
 
-bool GridAreaShorthandStyleValue::Properties::operator==(GridAreaShorthandStyleValue::Properties const&) const = default;
-
 }

+ 1 - 1
Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.h

@@ -44,7 +44,7 @@ private:
         ValueComparingNonnullRefPtr<GridTrackPlacementStyleValue const> column_start;
         ValueComparingNonnullRefPtr<GridTrackPlacementStyleValue const> row_end;
         ValueComparingNonnullRefPtr<GridTrackPlacementStyleValue const> column_end;
-        bool operator==(Properties const&) const;
+        bool operator==(Properties const&) const = default;
     } m_properties;
 };