References #593
References
#593
|
Is there a way of declaring plain reference variables in CPP2? e.g., int foo = 10;
int& bar = foo;I tried |
Answered by
AbhinavK00
Aug 15, 2023
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. |
2 replies
Answer selected by
jmafc
|
You can use a parameterized statement to the same effect (https://cpp2.godbolt.org/z/dqPaTP55W): |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.