aboutsummaryrefslogtreecommitdiff
path: root/AGENTS/CONVENTIONS/TEMPLATES_AND_OPERATORS.md
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-30 14:33:33 +0000
committer_ov4 <ov4@ov4.org>2026-10-30 14:33:33 +0000
commit9b2d82dadbb465de71985a8db3aa8df454579b72 (patch)
tree686703c7f74565baad63f368b90124f8577c4616 /AGENTS/CONVENTIONS/TEMPLATES_AND_OPERATORS.md
parent0cf54b4f77ccf8376341950b02ceb7c1d1268ed7 (diff)
docs(types): explain implicit constructors and raw text literalsHEADmain
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'AGENTS/CONVENTIONS/TEMPLATES_AND_OPERATORS.md')
-rw-r--r--AGENTS/CONVENTIONS/TEMPLATES_AND_OPERATORS.md9
1 files changed, 6 insertions, 3 deletions
diff --git a/AGENTS/CONVENTIONS/TEMPLATES_AND_OPERATORS.md b/AGENTS/CONVENTIONS/TEMPLATES_AND_OPERATORS.md
index 79f1a88..675ea3e 100644
--- a/AGENTS/CONVENTIONS/TEMPLATES_AND_OPERATORS.md
+++ b/AGENTS/CONVENTIONS/TEMPLATES_AND_OPERATORS.md
@@ -22,11 +22,13 @@ Part of [Load-bearing conventions](../CONVENTIONS.md). Basic call resolution is
- When multiple definitions share a function/procedure name, every ordinary and
template definition must specify OVERLOAD.
- `resolveCall` computes static argument types/ranks once, then tries exact ordinary,
- non-variadic template and variadic template tiers; an expected result type filters
+ non-variadic template and variadic template tiers, then repeats with permitted
+ BYVAL conversions; an expected result type filters
ordinary candidates, while template tiers still match parameters only. Same-tier ties
are errors.
- Candidate checking must stay silent and must not instantiate speculative class
- types. Explicit arguments pre-bind types without allowing conversions.
+ types. Explicit arguments pre-bind types; substituted scalar BYVAL parameters
+ may then use permitted conversions.
- Instances keep the template owner for diagnostics/library behavior and the first
requester in `VisibilityUnit` for lookup (`value_or(CurrentUnit)`).
- Deferred bodies use the symbol snapshot at the template declaration to preserve
@@ -40,7 +42,8 @@ Part of [Load-bearing conventions](../CONVENTIONS.md). Basic call resolution is
token on PrototypeAST. Canonical names contain a space (`OPERATOR +`,
`Class.OPERATOR AND`) to avoid collisions with ordinary identifiers.
- `OperatorGen.cc` probes visible global and left-class member signatures without
- emitting diagnostics or evaluating operands. Matching is exact; member/global ties
+ emitting diagnostics or evaluating operands. Exact operands and directly supported
+ builtins precede converted overloads; member/global ties
are ambiguous and access is checked only after selection.
- Both getExprTypeInfo and emission must consult this resolver with the expression's
result context before hardcoded builtin result types. A strict context requires the