Skip to content

Commit b7a3d4f

Browse files
authored
Update RTL_SYNTAX_AND_SEMANTICS.md
1 parent 221e763 commit b7a3d4f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Design-Docs/RTL_SYNTAX_AND_SEMANTICS.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ rtl::type().member<T>().method<..signature..>("method").build(&T::f);
109109
* **`.method<..signature..>(...)`**: registers a non-const member function. The template parameter `<..signature..>` disambiguates overloads.
110110
* Variants exist for const (`.methodConst`) and static (`.methodStatic`) methods.
111111
112-
> **Note:** The `function<..signature..>` and `method<..signature..>` template parameters are primarily for overload resolution. They tell RTL exactly which overload of a function or method you mean to register.
112+
👉 **Note:**
113+
> ***The `function<..signature..>` and `method<..signature..>` template parameters are primarily for overload resolution. They tell RTL exactly which overload of a function or method you mean to register.***
113114
114115
With these constructs—namespaces, non-member functions, overloads, records `(class/struct)`, constructors, and methods—you now have the full registration syntax for RTL. Together, they let you build a complete reflective model of your C++ code.
115116
@@ -195,7 +196,7 @@ When dealing with `rtl::RObject` results:
195196

196197
👉 **Tip**
197198

198-
> Use `canViewAs<T>()` for a cheap boolean check when branching, and `view<T>()` when you actually need the value.
199+
> ***Use `canViewAs<T>()` for a cheap boolean check when branching, and `view<T>()` when you actually need the value.***
199200
200201
---
201202

@@ -264,7 +265,7 @@ setProfile->bind<std::string>(targetObj).call(10); // compile-time error
264265
* All arguments are forwarded as universal references (`&&`), enabling **perfect forwarding** with **no copies**. Arguments are ultimately received exactly as the registered function expects (`lvalue`, `rvalue`, `const-lvalue-ref`).
265266
* `rtl::RObject` contains the return value, or is empty if the method returns `void`.
266267

267-
> By retrieving a `Method` from a `Record`, binding a target instance, and specifying the signature as needed, RTL allows safe, perfectly-forwarded reflective calls on member functions.
268+
> ***By retrieving a `Method` from a `Record`, binding a target instance, and specifying the signature as needed, RTL allows safe, perfectly-forwarded reflective calls on member functions.***
268269
269270
---
270271

@@ -491,7 +492,7 @@ RObject obj2 = std::move(obj1);
491492
* The underlying heap object remains untouched and alive until its final owner is destroyed.
492493

493494
👉 **Key idea**
494-
> *Heap move = `unique_ptr` move semantics (cheap pointer transfer).*
495+
> ***Heap move = `unique_ptr` move semantics (cheap pointer transfer).***
495496
496497
### Consistent Guarantees 🟨
497498

@@ -503,7 +504,7 @@ Across both stack and heap moves:
503504
* Cloning or invoking a moved-from object results in `rtl::error::EmptyRObject`.
504505

505506
✅ Bottom Line
506-
> *“When you move an `RObject`, RTL either calls your type’s move constructor (stack) or transfers ownership of its `unique_ptr` (heap). In both cases, the source is emptied and ownership remains safe.”*
507+
> ***“When you move an `RObject`, RTL either calls your type’s move constructor (stack) or transfers ownership of its `unique_ptr` (heap). In both cases, the source is emptied and ownership remains safe.”***
507508
508509
---
509510

0 commit comments

Comments
 (0)