From 60307cc373cf6bf794f4b3494f3cb8b983f2de43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20M=20G=C3=B3mez?= Date: Thu, 17 Aug 2023 11:20:22 +0100 Subject: [PATCH] updates manual with codegenDecl on params docs (#22333) * documents member * Update doc/manual_experimental.md Co-authored-by: Clay Sweetser --------- Co-authored-by: Andreas Rumpf Co-authored-by: Clay Sweetser --- doc/manual_experimental.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/manual_experimental.md b/doc/manual_experimental.md index b0ce775ee1..72e883cbc3 100644 --- a/doc/manual_experimental.md +++ b/doc/manual_experimental.md @@ -2385,8 +2385,7 @@ Notice when calling a constructor in the section of a global variable initializa Member pragma ============= -Similar to the `constructor` and `virtual` pragmas, the `member` pragma can be used to attach a `proc` or `func` to a type in C++. -It is more flexible than `virtual` in the sense that it accepts not only names but also operators or destructors. +Like the `constructor` and `virtual` pragmas, the `member` pragma can be used to attach a procedure to a C++ type. It's more flexible than the `virtual` pragma in the sense that it accepts not only names but also operators and destructors. For example: @@ -2439,4 +2438,4 @@ proc `()`(f: NimFunctor; n:int) {.importcpp: "#(@)" .} NimFunctor()(1) ``` Notice we use the overload of `()` to have the same semantics in Nim, but on the `importcpp` we import the functor as a function. -This allows to easy interop with functions that accepts for example a `const` operator in its signature. \ No newline at end of file +This allows to easy interop with functions that accepts for example a `const` operator in its signature.