Last active
September 5, 2024 22:13
-
-
Save ObjectBoxPC/1e965db5fda2fc9e31659ae8e328be94 to your computer and use it in GitHub Desktop.
Misusing C++ alternative tokens
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <utility> | |
class my_class { | |
public: | |
compl my_class() {} // Destructor | |
}; | |
int main() { | |
my_class example_obj; | |
my_class bitand example_ref = example_obj; | |
my_class and example_rvalue_ref = std::move(example_obj); | |
my_class *example_ptr = bitand example_obj; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wrote a blog post with some more background on these tokens.