Last active
August 29, 2015 13:56
-
-
Save DieHertz/9074223 to your computer and use it in GitHub Desktop.
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 <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