References #593
-
Is there a way of declaring plain reference variables in CPP2? e.g., int foo = 10;
int& bar = foo; I tried |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Cppfront intends to do away with references completely. The basic guideline is to use pointers instead. If you do want refereces, you will have to use cpp style syntax. |
Beta Was this translation helpful? Give feedback.
-
You can use a parameterized statement to the same effect (https://cpp2.godbolt.org/z/dqPaTP55W):
|
Beta Was this translation helpful? Give feedback.
Cppfront intends to do away with references completely. The basic guideline is to use pointers instead. If you do want refereces, you will have to use cpp style syntax.