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

Support etl::underlying_type with compiler builtin #1045

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

Conversation

jiangyilism
Copy link

No description provided.

Copy link
Contributor

@rolandreichweinbmw rolandreichweinbmw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This is useful in some of my use cases.

@jwellbelove
Copy link
Contributor

The unit tests all fail for MSVC.

@jwellbelove
Copy link
Contributor

jwellbelove commented Mar 6, 2025

You need to update /etl/generators/type_traits_generator.h
Test with the python script generator_test.bat

@jiangyilism jiangyilism force-pushed the yichiang/etl_underlyingtype branch from de17a4f to 14b1fe1 Compare March 7, 2025 13:25
@jiangyilism
Copy link
Author

You need to update /etl/generators/type_traits_generator.h Test with the python script generator_test.bat

Modified /etl/generators/type_traits_generator.h and tested with

python scripts/generator_test.py on a linux PC. MSVC is not tested since I do not have a windows PC by hand. I will try to get one if MSVC tests are still failing.

@jwellbelove
Copy link
Contributor

It fails because __underlying_type is not defined for MSVC.

@jiangyilism jiangyilism force-pushed the yichiang/etl_underlyingtype branch from 14b1fe1 to 81085cb Compare March 7, 2025 21:41
@jiangyilism jiangyilism reopened this Mar 10, 2025
@jiangyilism
Copy link
Author

It fails because __underlying_type is not defined for MSVC.

updated to exclude the underlying_type tests if ETL_USING_BUILTIN_UNDERLYING_TYPE is not defined. It is not defined in MSVC builds since ETL_USE_TYPE_TRAITS_BUILTINS is not defined.

A successful MSVC run in my fork
https://github.com/jiangyilism/etl/actions/runs/13730165615

@jiangyilism jiangyilism force-pushed the yichiang/etl_underlyingtype branch from 81085cb to 555d710 Compare March 10, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

3 participants