Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambiguous operator== overloads with GCC 13 and C++20 #3182

Open
jwillikers opened this issue Oct 5, 2023 · 0 comments
Open

Ambiguous operator== overloads with GCC 13 and C++20 #3182

jwillikers opened this issue Oct 5, 2023 · 0 comments

Comments

@jwillikers
Copy link

When building libsass version 3.6.5 with GCC 13.2.1 and C++20 enabled, there are compiler errors regarding amibuous overloads for operator== member functions in ast_sel_cmp.cpp.
The errors are as follows.

/home/jordan/.conan/data/libsass/3.6.5/_/_/build/b9b403c606639d0c440df3dfd255621c158be49e/src/src/ast_sel_cmp.cpp:17:51: error: ambiguous overload for 'operator==' (operand types are 'const Sass::SelectorList' and 'const Sass::List')
   17 |     if (auto l = Cast<List>(&rhs)) { return *this == *l; }
      |                                             ~~~~~ ^~ ~~
      |                                             |        |
      |                                             |        const Sass::List
      |                                             const Sass::SelectorList

/home/jordan/.conan/data/libsass/3.6.5/_/_/build/b9b403c606639d0c440df3dfd255621c158be49e/src/src/ast_sel_cmp.cpp:30:54: error: ambiguous overload for 'operator==' (operand types are 'const Sass::SelectorList' and 'const Sass::List')
   30 |     if (auto list = Cast<List>(&rhs)) { return *this == *list; }
      |                                                ~~~~~ ^~ ~~~~~
      |                                                |        |
      |                                                |        const Sass::List
      |                                                const Sass::SelectorList

/home/jordan/.conan/data/libsass/3.6.5/_/_/build/b9b403c606639d0c440df3dfd255621c158be49e/src/src/ast_sel_cmp.cpp:167:20: error: ambiguous overload for 'operator==' (operand types are 'Sass::SelectorComponent' and 'const Sass::SimpleSelector')
  167 |     return *get(0) == rhs;
      |            ~~~~~~~ ^~ ~~~
      |            |          |
      |            |          const Sass::SimpleSelector
      |            Sass::SelectorComponent

/home/jordan/.conan/data/libsass/3.6.5/_/_/build/b9b403c606639d0c440df3dfd255621c158be49e/src/src/ast_sel_cmp.cpp:286:18: error: ambiguous overload for 'operator==' (operand types are 'const Sass::SimpleSelector' and 'Sass::SelectorComponent')
  286 |     return *this == *rhs.get(0);
      |            ~~~~~ ^~ ~~~~~~~~~~~
      |            |        |
      |            |        Sass::SelectorComponent
      |            const Sass::SimpleSelector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant