-
Notifications
You must be signed in to change notification settings - Fork 31
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
Resolve compiler issues for common compiler configurations #42
Comments
Some of this may be impossible without either changing the call syntax or waiting until the library can support C++20. There are a couple alternatives:
This introduces a lot of duplication and isn't visually appealing.
Relevant links: Even still, this option may require a new syntax because operators can't be cleanly templated. E.g. you may need to write the syntax:
Here at least we could offer a new syntax:
This would maintain dual compatibility but would be sad to introduce a new call syntax. It's unclear to me if consteval could provide a consistent syntax to what exists today.
What's unfortunate is that the correct idx can be inferred at compile time at the call site, but not once the member method has been invoked. C++17 has everything it needs. I don't think this is trivial to resolve, so, I will leave this as an open problem, but not blocking for release. I tried every trick I had. |
After some extensive digging, I'm now convinced the existing syntax will be impossible to support in other compiler implementations. I'm going to add two new functions when C++20 (or higher) is present with syntax like so:
I will leave the existing syntax available when clang is present, since these functions can peacefully co-exist (and will even be able to share the other's cacheing). I'm disappointed maintaining the existing syntax isn't possible going but I think this strikes the best balance for compatibility. |
This flavour no longer requires a clang extension and so should unlock other compilers. In a downstream CL I will add this to ObjectRef to enable the new syntax and eventually update existing usage. #42 PiperOrigin-RevId: 710513656
Sadly, the syntax the clang extension offers cannot be reproduced with standard C++20. These new map types will allow for C++20 support on non-clang compilers. #42 PiperOrigin-RevId: 710765161
Sadly, the syntax the clang extension offers cannot be reproduced with standard C++20. These new map types will allow for C++20 support on non-clang compilers. #42 PiperOrigin-RevId: 710765161
Sadly, the syntax the clang extension offers cannot be reproduced with standard C++20. These new map types will allow for C++20 support on non-clang compilers. #42 PiperOrigin-RevId: 710765161
Sadly, the syntax the clang extension offers cannot be reproduced with standard C++20. These new map types will allow for C++20 support on non-clang compilers. #42 PiperOrigin-RevId: 710765161
Sadly, the syntax the clang extension offers cannot be reproduced with standard C++20. These new map types will allow for C++20 support on non-clang compilers. #42 PiperOrigin-RevId: 710765161
This flavour no longer requires a clang extension and so should unlock other compilers. I'm keeping this in a separate CL since it's the first time both C++17 and C++20 versions for code in use and would like to flush out build failures. In a downstream CL I will add this to `ObjectRef` to enable the new syntax and eventually update existing usage. #42 PiperOrigin-RevId: 710778389
This flavour no longer requires a clang extension and so should unlock other compilers. I'm keeping this in a separate CL since it's the first time both C++17 and C++20 versions for code in use and would like to flush out build failures. In a downstream CL I will add this to `ObjectRef` to enable the new syntax and eventually update existing usage. #42 PiperOrigin-RevId: 710778389
#42 These changes were largely made by agent with the following prompt: "Observe the changes I have made replacing uses of () and [] operator member methods, and moved them to .Call and .Access respectively. Replicate those replacements throughout the file where needed. Don't add uses of Ptr() where they don't exist." PiperOrigin-RevId: 710513656
This flavour no longer requires a clang extension and so should unlock other compilers. I'm keeping this in a separate CL since it's the first time both C++17 and C++20 versions for code in use and would like to flush out build failures. In a downstream CL I will add this to `ObjectRef` to enable the new syntax and eventually update existing usage. #42 PiperOrigin-RevId: 710778389
Sadly, the syntax the clang extension offers cannot be reproduced with standard C++20. These new map types will allow for C++20 support on non-clang compilers. #42 PiperOrigin-RevId: 710765161
Sadly, the syntax the clang extension offers cannot be reproduced with standard C++20. These new map types will allow for C++20 support on non-clang compilers. #42 PiperOrigin-RevId: 710765161
This flavour no longer requires a clang extension and so should unlock other compilers. I'm keeping this in a separate CL since it's the first time both C++17 and C++20 versions for code in use and would like to flush out build failures. In a downstream CL I will add this to `ObjectRef` to enable the new syntax and eventually update existing usage. #42 PiperOrigin-RevId: 710778389
#42 These changes were largely made by agent with the following prompt: "Observe the changes I have made replacing uses of () and [] operator member methods, and moved them to .Call and .Access respectively. Replicate those replacements throughout the file where needed. Don't add uses of Ptr() where they don't exist." PiperOrigin-RevId: 710513656
This flavour no longer requires a clang extension and so should unlock other compilers. I'm keeping this in a separate CL since it's the first time both C++17 and C++20 versions for code in use and would like to flush out build failures. In a downstream CL I will add this to `ObjectRef` to enable the new syntax and eventually update existing usage. #42 PiperOrigin-RevId: 710778389
#42 These changes were largely made by agent with the following prompt: "Observe the changes I have made replacing uses of () and [] operator member methods, and moved them to .Call and .Access respectively. Replicate those replacements throughout the file where needed. Don't add uses of Ptr() where they don't exist." PiperOrigin-RevId: 710513656
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction` and `lambda_compatible` which depended on the full form. Since they are not used I will just remove them. #42 PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction` and `lambda_compatible` which depended on the full form. Since they are not used I will just remove them. #42 PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction` and `lambda_compatible` which depended on the full form. Since they are not used I will just remove them. #42 PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. Also, gcc seems to take issue with using declarations that shadow types in the outer namespace, so they have been modified with a leading "_", e.g. "using _ExposedType = ...". #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. Also, gcc seems to take issue with using declarations that shadow types in the outer namespace, so they have been modified with a leading "_", e.g. "using _ExposedType = ...". #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. Also, gcc seems to take issue with using declarations that shadow types in the outer namespace, so they have been modified with a leading "_", e.g. "using _ExposedType = ...". #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. Also, gcc seems to take issue with using declarations that shadow types in the outer namespace, so they have been modified with a leading "_", e.g. "using _ExposedType = ...". #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. Also, gcc seems to take issue with using declarations that shadow types in the outer namespace, so they have been modified with a leading "_", e.g. "using _ExposedType = ...". #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. Also, gcc seems to take issue with using declarations that shadow types in the outer namespace, so they have been modified with a leading "_", e.g. "using _ExposedType = ...". #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
#42 These changes were largely made by agent with the following prompt: "Observe the changes I have made replacing uses of () and [] operator member methods, and moved them to .Call and .Access respectively. Replicate those replacements throughout the file where needed. Don't add uses of Ptr() where they don't exist." PiperOrigin-RevId: 711312812
#42 These changes were largely made by agent with the following prompt: "Observe the changes I have made replacing uses of () and [] operator member methods, and moved them to .Call and .Access respectively. Replicate those replacements throughout the file where needed. Don't add uses of Ptr() where they don't exist." PiperOrigin-RevId: 711312812
In a follow up CL all of these tests will be the only tests run on C++17 GitHub actions. Without these tests there would be no test coverage for C++17 after the project migrates to C++20 syntax. Also drive by cleanup of clang-tidy failures. #42 PiperOrigin-RevId: 711214863
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. Also, gcc seems to take issue with using declarations that shadow types in the outer namespace, so they have been modified with a leading "_", e.g. "using _ExposedType = ...". #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
In a follow up CL all of these tests will be the only tests run on C++17 GitHub actions. Without these tests there would be no test coverage for C++17 after the project migrates to C++20 syntax. Also drive by cleanup of clang-tidy failures. #42 PiperOrigin-RevId: 711214863
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. Also, gcc seems to take issue with using declarations that shadow types in the outer namespace, so they have been modified with a leading "_", e.g. "using _ExposedType = ...". Pack discriminator only operates on types and const auto&. This had inconsistent behaviour across compilers, and Ubuntu + C++20 specifically breaks. A similar issue was encountered a while back when trying to support Windows, which was what motivated the "diminished" forms. #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. Also, gcc seems to take issue with using declarations that shadow types in the outer namespace, so they have been modified with a leading "_", e.g. "using _ExposedType = ...". Pack discriminator only operates on types and const auto&. This had inconsistent behaviour across compilers, and Ubuntu + C++20 specifically breaks. A similar issue was encountered a while back when trying to support Windows, which was what motivated the "diminished" forms. #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
As the matrix of supported compilers an increasing number of compiler inconsistencies are unfortunately showing, both across clang and gcc, but also across platforms (mac and Linux) and versions (C++17 and C++20). gcc does not seem to permit template specialisations within class definitions so inner helper classes have been moved out of classes (despite the current form being cleaner). `InvocableMap`s have been updated not to have derived non-type template parameters, so they're now just passed as explicit types. This is objectively absurd, as what I wrote is valid C+++ and gcc should know better, but it just straight up segfaults so better luck next time gcc. Also removed `conjunction`, `lambda_compatible`, and `type_map` which depended on the full form or needed clang Since they are not used I will just remove them. Also, gcc seems to take issue with using declarations that shadow types in the outer namespace, so they have been modified with a leading "_", e.g. "using _ExposedType = ...". Pack discriminator only operates on types and const auto&. This had inconsistent behaviour across compilers, and Ubuntu + C++20 specifically breaks. A similar issue was encountered a while back when trying to support Windows, which was what motivated the "diminished" forms. #42 Tested: Compiled on Ubuntu and Mac platforms with C++20 using clang and gcc. PiperOrigin-RevId: 711515926
Some common compilers (such as those bundled with the Android NDK on stock Bazel) have outdated or non-conformant clang implementations.
Some of these legal but unsupported syntaxes could be obviated with equivalent but supported implementations.
The text was updated successfully, but these errors were encountered: