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

Replace is_same<>::value with is_same_v<> #8852

Merged
merged 1 commit into from
Jul 27, 2021

Conversation

codereport
Copy link
Contributor

Simple PR that ran a regex to replace is_same<...>::value with is_same_v<...>

@codereport codereport added 3 - Ready for Review Ready for review by team code quality libcudf Affects libcudf (C++/CUDA) code. 4 - Needs Review Waiting for reviewer to review or respond improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jul 26, 2021
@codereport codereport self-assigned this Jul 26, 2021
@codereport codereport requested a review from a team as a code owner July 26, 2021 17:00
int static constexpr encode_field_number_base(int field_number) noexcept
{
return (field_number * 8) + PB_TYPE_FIXED64;
}

template <typename T,
typename std::enable_if_t<!std::is_class<T>::value or
std::is_same<T, std::string>::value>* = nullptr>
typename std::enable_if_t<!std::is_class<T>::value or std::is_same_v<T, std::string>>* =
Copy link
Contributor

Choose a reason for hiding this comment

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

There might be value in a follow-up PR to convert these SFINAE checks into CUDF_ENABLE_IF().

Copy link
Contributor

Choose a reason for hiding this comment

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

Unresolved conversation just to unhide the comment above 😃

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we can config the CI style checker to detect such usage (of is_same<>::value) and raise a failure so we will never have to do this PR again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Once we get clang-tidy set up we could definitely automate this.

@codecov
Copy link

codecov bot commented Jul 26, 2021

Codecov Report

Merging #8852 (37589de) into branch-21.10 (18f7c01) will decrease coverage by 0.08%.
The diff coverage is 0.00%.

Impacted file tree graph

@@               Coverage Diff                @@
##           branch-21.10    #8852      +/-   ##
================================================
- Coverage         10.67%   10.59%   -0.09%     
================================================
  Files               110      116       +6     
  Lines             18271    19035     +764     
================================================
+ Hits               1951     2017      +66     
- Misses            16320    17018     +698     
Impacted Files Coverage Δ
python/cudf/cudf/__init__.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/__init__.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/categorical.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/column.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/lists.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/numerical.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/string.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/struct.py 0.00% <ø> (ø)
python/cudf/cudf/core/dataframe.py 0.00% <ø> (ø)
python/cudf/cudf/core/frame.py 0.00% <ø> (ø)
... and 73 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32f46f0...37589de. Read the comment docs.

@codereport
Copy link
Contributor Author

rerun tests

@codereport codereport added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 3 - Ready for Review Ready for review by team 4 - Needs Review Waiting for reviewer to review or respond labels Jul 27, 2021
@codereport
Copy link
Contributor Author

@gpucibot merge

@rapids-bot rapids-bot bot merged commit d942100 into rapidsai:branch-21.10 Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants