[interop] Pass template names and named constants as template arguments - #62
Open
conrade-ctc wants to merge 14 commits into
Open
[interop] Pass template names and named constants as template arguments#62conrade-ctc wants to merge 14 commits into
conrade-ctc wants to merge 14 commits into
Conversation
…er-research#41) * [cpyrt] Improve error reporting for method calls without C++ object Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * [test] Add test for method calls on an instance without a C++ object Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Grigori Rybkine <Grigori.Rybkine@cern.ch> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…esearch#40) * [cpyrt] Penalize void* arguments in overload priority as intended * [test] Add regression test for void* overload priority --------- Co-authored-by: Emery Conrad <emery.conrad@chicagotrading.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…rch#42) Fixes the long-standing header duplication (previously `Cppyy.h` and `cpp_cppyy.h`) between cpyrt and interop, so that there is only a single source of definitions for the `cppjit::interop` API and types.
Changed definition of a function to the test it is actually used, and added a missing import
…er-research#50) Drops wheel sizes by about half. Previously the entire install tree of CppInterOp was staged that included duplicate shared libs due to versioning. This is fixed by adding a stripped shared-lib option in CppInterOp, leveraged in this patch.
…ch#52) [cpyrt] Clear the error indicator only where a call failed A debug build of CPython asserts when a C API call is made with the error indicator already set, so the __cpp_cross__ annotation, the meta_setattro fallthrough to tp_setattro, and the VectorData alias need it cleared. Clear it only on the failing path: AddToClass reports failure, and the two CPPScope sites can test the value they just produced, so an error raised elsewhere still propagates. meta_getattro returns a new reference; release it instead of leaking it.
* [test] Find eigen and boost under the Homebrew and MacPorts prefixes * [ci] Build and test manylinux and macOS arm64 wheels
…esearch#54) SetArg() created an element converter per call and appended it to fConverters, but Clear() frees only fBuffer, so the vector grew without bound across repeated std::initializer_list conversions. Create each element converter once, on first use of its index, and reuse it.
…iler-research#51) * Serialize and atomize test dictionary builds * Force loadfile scheduling for distributed test runs * Normalize the xfail marker keyword order * Correct the xfail markers and add missing reasons * Add the --run-crashing-xfails collection option * Enable strict xfail * Drop xfail markers that no longer fail on macOS and cling * Make the span tests include their own header
is_integral rejects a leading minus, so the comma-split fallback in AppendTypesSlow reads a negative literal as a type name. Accept the sign. Co-developed-with-the-help-of: Claude Code (Opus 5, human in the loop)
conrade-ctc
force-pushed
the
pr-c-template-args
branch
from
September 1, 2026 20:24
c1d9ce3 to
1e9aef5
Compare
A class or alias template name becomes a template-template argument. The argument carries the name and a null type. A constexpr variable or an enum constant goes through as its qualified name, so Sema builds an expression. true and false become bool values. The by-name paths need a CppInterOp that resolves the name. An older one reads the name as an integer literal and instantiates a garbage value. Probe for CppInterOp's SupportsNamedTemplateArguments export, and skip the test when it is absent. Co-developed-with-the-help-of: Claude Code (Fable 5, human in the loop)
conrade-ctc
force-pushed
the
pr-c-template-args
branch
from
September 1, 2026 21:15
1e9aef5 to
5d9ceb7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A template argument can now name a template or a constant. A class or alias template name becomes a template-template argument. A constexpr variable or an enum constant becomes an expression, so Sema reads its value.
trueandfalsebecome bool values. The first commit fixes a separate bug:is_integralrejected a leading minus, so a negative literal became a type name.The by-name paths need CppInterOp compiler-research/CppInterOp#1074, which resolves the name and exports a capability marker. cppjit probes for the marker and keeps the paths off when it is absent. The guarded test then skips.