Skip to content

ARROW-13444: [C++] Remove usage of deprecated std::result_of#10814

Closed
bkietz wants to merge 2 commits intoapache:masterfrom
bkietz:13444-C20-compatibility-by-upda
Closed

ARROW-13444: [C++] Remove usage of deprecated std::result_of#10814
bkietz wants to merge 2 commits intoapache:masterfrom
bkietz:13444-C20-compatibility-by-upda

Conversation

@bkietz
Copy link
Copy Markdown
Member

@bkietz bkietz commented Jul 27, 2021

Also clean up some UBSAN nullptr arithmetic warnings

@bkietz bkietz requested a review from westonpace July 27, 2021 13:33
@github-actions
Copy link
Copy Markdown

Copy link
Copy Markdown
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

Just one question.

@bkietz
Copy link
Copy Markdown
Member Author

bkietz commented Jul 27, 2021

@pitrou anything else?

Copy link
Copy Markdown
Member

@westonpace westonpace left a comment

Choose a reason for hiding this comment

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

LGTM. Can I ask, for my own learning, why you would choose to use decltype instead of std::result_of?

Also, thanks for taking care of the null pointer arithmetic. I'll close my PR in favor of this one.

@anders-wind
Copy link
Copy Markdown

LGTM. Can I ask, for my own learning, why you would choose to use decltype instead of std::result_of?

std::result_of is deprecated in c++17 and removed in c++20. See https://issues.apache.org/jira/browse/ARROW-13444

@westonpace
Copy link
Copy Markdown
Member

LGTM. Can I ask, for my own learning, why you would choose to use decltype instead of std::result_of?

std::result_of is deprecated in c++17 and removed in c++20. See https://issues.apache.org/jira/browse/ARROW-13444

Ah, yes, thank you. I should have been more clear and said arrow::detail::result_of but looking closer I see that utility is in future.h and not in a more generally accessible utility class.

@bkietz bkietz closed this in 4c02c6d Jul 27, 2021
@bkietz bkietz deleted the 13444-C20-compatibility-by-upda branch July 27, 2021 19:58
yahoNanJing pushed a commit to yahoNanJing/clickhouse-arrow that referenced this pull request May 7, 2024
Also clean up some UBSAN nullptr arithmetic warnings

Closes apache#10814 from bkietz/13444-C20-compatibility-by-upda

Authored-by: Benjamin Kietzman <[email protected]>
Signed-off-by: Benjamin Kietzman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants