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

etl/type_traits.h: Add support for type_identity #905

Merged
merged 3 commits into from
Jun 11, 2024

Conversation

tigran2008
Copy link
Contributor

No description provided.

Copy link

Review changes with SemanticDiff.

@jwellbelove
Copy link
Contributor

Did you add a unit test?

@tigran2008
Copy link
Contributor Author

Sorry, I overlooked that part :/

I'm away from my computer right now, but would the following be enough if I added it later?

Given this function:

template <typename T>
T add(T first, typename etl::type_identity<T>::type second) {
    return first + second;
}

The result of add(2.5, 1) would be checked if it was equal to 3.5

@jwellbelove
Copy link
Contributor

That looks OK.

@tigran2008
Copy link
Contributor Author

Did I do this right? 😅

Use CHECK_CLOSE instead of CHECK for equality
@tigran2008
Copy link
Contributor Author

Well, I changed the CHECK into a CHECK_CLOSE.

@jwellbelove jwellbelove changed the base branch from master to pull-request/#905-Add-support-for-type_identity June 11, 2024 12:43
@jwellbelove jwellbelove merged commit 6ced063 into ETLCPP:pull-request/#905-Add-support-for-type_identity Jun 11, 2024
63 checks passed
jwellbelove pushed a commit that referenced this pull request Jun 24, 2024
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.

2 participants