leftibot 64a823c630 Address review: expose strongly-typed operators for strong typedefs
Register forwarding binary operators at typedef creation time via a
custom Proxy_Function_Base subclass (Strong_Typedef_Binary_Op). Each
operator unwraps __value from both operands, dispatches on the
underlying types, and re-wraps arithmetic results in the typedef.
Comparison operators return the raw bool.

- Arithmetic: +, -, *, /, % → Meters + Meters -> Meters
- Comparison: <, >, <=, >=, ==, != → Meters < Meters -> bool
- Operators that don't exist on the base type error at call time
  (e.g. StrongString * StrongString -> error)
- Users can extend typedefs with their own operations using
  to_underlying() for unwrapping

Tests cover int-based arithmetic, string-based concatenation, string
multiplication error, comparison ops, type safety of results, and
user-defined operator extensions.

Requested by @lefticus in PR #680 review.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 11:04:46 -06:00
..
dispatchkit Fix #594: Map keys become dangling references when pushed into Vector (#650) 2026-04-12 16:39:19 -06:00
language Address review: expose strongly-typed operators for strong typedefs 2026-04-14 11:04:46 -06:00
utility Fix #499: Add object_from_json, map_to_object, and object_to_map functions (#676) 2026-04-13 15:44:04 -06:00
chaiscript_basic.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
chaiscript_defines.hpp Fix #146: Add configuration to bypass the registering of 'built-in' functions. (#642) 2026-04-11 16:49:13 -06:00
chaiscript_stdlib.hpp Fix #146: Add configuration to bypass the registering of 'built-in' functions. (#642) 2026-04-11 16:49:13 -06:00
chaiscript_threading.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
chaiscript.hpp Fix #571: How to redirect "cout" and "print" to a microsoft Windows 10 window? (#657) 2026-04-11 18:58:09 -06:00