Skip to content

Instantly share code, notes, and snippets.

@cbecker
Last active January 13, 2017 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbecker/c3fe04087204bb7a7c17a3d321c0abf1 to your computer and use it in GitHub Desktop.
Save cbecker/c3fe04087204bb7a7c17a3d321c0abf1 to your computer and use it in GitHub Desktop.
Languages ref

This contains useful reminders for me from C++11.

Class-related

abstract classes

Read more here, but basically

virtual void f() = 0; // pure virtual

override +

Specifies that a virtual function overrides another virtual function, used in a derived class definition. override ensures that the function is virtual and is overriding a virtual function from the base class. The program is ill-formed (a compile-time error is generated) if this is not true.

Nested classes +

friend +

Appears in a class body and grants a function or another class access to private and protected members of the class where the friend declaration appears.

Smart pointers

std::unique_ptr<>

TODO

std::shared_ptr<>

TODO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment