Skip to content

Instantly share code, notes, and snippets.

@DieHertz
Last active August 29, 2015 13:56
Show Gist options
  • Save DieHertz/9074223 to your computer and use it in GitHub Desktop.
Save DieHertz/9074223 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
struct Foo {
Foo() = default;
Foo(const Foo&) { cout << "Foo::Foo(const Foo&)" << endl; }
Foo(Foo&&) { cout << "Foo::Foo(Foo&&)" << endl; }
template<class T> Foo(T&&) { cout << "Foo::Foo<T>(T&&)" << endl; }
};
int main() {
auto f = Foo{};
const auto copy_f = f;
auto copy_copy_f = copy_f;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment