Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq authored Sep 15, 2023
1 parent b7dd606 commit a5eb7db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/manual_experimental.md
Original file line number Diff line number Diff line change
Expand Up @@ -2392,7 +2392,7 @@ For example:

```nim
{.emit:"""/*TYPESECTION*/
{.emit: """/*TYPESECTION*/
struct CppStruct {
CppStruct(int x, char* y): x(x), y(y){}
int x;
Expand All @@ -2402,10 +2402,10 @@ struct CppStruct {
type
CppStruct {.importcpp, inheritable.} = object
proc makeCppStruct(a:cint = 5, b:cstring = "hello"): CppStruct {.importcpp: "CppStruct(@)", constructor.}
proc makeCppStruct(a: cint = 5, b:cstring = "hello"): CppStruct {.importcpp: "CppStruct(@)", constructor.}
(proc (s:CppStruct) = echo "hello")(makeCppStruct())
#if one remove a default value from the constructor and pass it to the call. The C++ compiler will complain.
(proc (s: CppStruct) = echo "hello")(makeCppStruct())
# If one removes a default value from the constructor and passes it to the call explicitly, the C++ compiler will complain.
```

Expand Down

0 comments on commit a5eb7db

Please sign in to comment.