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

Update some metafunctions for increased portability. #374

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Jan 2, 2025

Update some metafunctions for increased portability.

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).

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.

@copybara-service copybara-service bot force-pushed the test_711515926 branch 4 times, most recently from 4aaf0f0 to 5a1ded0 Compare January 3, 2025 18:21
@copybara-service copybara-service bot changed the title Pack discriminator only operates on types and const auto&. Update some metafunctions for increased portability. Jan 3, 2025
@copybara-service copybara-service bot force-pushed the test_711515926 branch 25 times, most recently from 0b2a20c to 19ec025 Compare January 5, 2025 04:21
@copybara-service copybara-service bot force-pushed the test_711515926 branch 4 times, most recently from 0ce1f86 to e9ae780 Compare January 7, 2025 21:42
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).

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
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

Successfully merging this pull request may close these issues.

1 participant