Skip to content

Commit

Permalink
Fixes to C++ compatibility table.
Browse files Browse the repository at this point in the history
  • Loading branch information
nseam committed Sep 10, 2024
1 parent bfc9533 commit 6c09de3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ To improve code compatibility, please use the following syntax:
| `foo((Ba&)obj)` *2| `foo(*obj)` | `foo(PTR_TO_REF(obj))` |
| `foo((Ba*)obj)` *1| `foo(&obj)` | `foo(REF_TO_PTR(obj))` |
| `void* N` *4| `void*& N[]` | `VOID_DATA(N)` |
| `int foo` | `const int foo` | `CONST_CPP int foo` |
| `int foo(int v)` | `int foo(int& v)` | `int foo(int REF_CPP v)` |
| `X foo()` | `X& foo()` | `X REF_CPP foo()` |
| `int foo` *5| `const int foo` | `CONST_CPP int foo` |
| `int foo(int v)` *5| `int foo(int& v)` | `int foo(int REF_CPP v)` |
| `X foo()` *5| `X& foo()` | `X REF_CPP foo()` |
| `obj == NULL` *1| `obj == nullptr` | `obj == nullptr` |
| `X foo(T* v)` | `X foo(T* v)` | `obj == nullptr` |
| `datetime d = NULL`| `datetime d = 0` | `datetime = 0` |

**\*1** - Only if `obj` is a pointer.
**\*2** - Only if `obj` is an object or reference type (e.g., `Foo &`).
**\*3** - Only if `obj` is `Ref<X>`.
**\*4** - Only when used as a parameter to function.
**\*5** - In C++ we could want to return structure by reference or add `const` to the variable or result.

## Proposing changes

Expand Down

0 comments on commit 6c09de3

Please sign in to comment.