Skip to content

Instantly share code, notes, and snippets.

@ObjectBoxPC
Last active May 1, 2021 03:55
Show Gist options
  • Save ObjectBoxPC/1e965db5fda2fc9e31659ae8e328be94 to your computer and use it in GitHub Desktop.
Save ObjectBoxPC/1e965db5fda2fc9e31659ae8e328be94 to your computer and use it in GitHub Desktop.
Misusing C++ alternative tokens
#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