GH-48590: [C++] Modernize type traits using C++20 concepts (Preliminary)#49348
GH-48590: [C++] Modernize type traits using C++20 concepts (Preliminary)#49348abhishek593 wants to merge 1 commit intoapache:mainfrom
Conversation
aacbfe7 to
943f82b
Compare
|
@pitrou I just want to post my analysis here. The code so far what I have submitted is standard-compliant (compiles on gcc-14, gcc-15, clang). But the check C++ / C++ Minimal Build Example fails which uses gcc-13. This is because of a bug in gcc-13 when evaluating concept-constrained partial specialisation of nested templates. Hence, the error: Error from CI: Code from codegen_internal.h(present in my changes): Since CI uses these older compilers, we may have a few options if we want to proceed:
- VisitArrayValuesInline<Arg0Type>(arg0, [&](Arg0Value v) {
- *out_data++ = functor.op.template Call<OutValue, Arg0Value>(ctx, v, &st);
+ VisitArrayValuesInline<Arg0Type>(arg0, [&](typename ThisType::Arg0Value v) {
+ *out_data++ = functor.op.template Call<typename ThisType::OutValue, typename ThisType::Arg0Value>(ctx, v, &st);
BTW, is there any reason why compilers are not being upgraded? |
|
Thanks for working on this @abhishek593 .
Ouch!
In this case, gcc 13 is the default compiler on Ubuntu 24.04, so we want to continue supporting it.
I would add option 4: not convert the places where we hit a compiler bug (if at all possible). |
Rationale for this change
This is a preliminary PR intended to demonstrate the scope and feasibility of modernizing the Arrow C++ codebase using C++20 Concepts.
What changes are included in this PR?
Are these changes tested?
Yes.
Are there any user-facing changes?
No.
Questions for the Reviewer