Skip to content

Instantly share code, notes, and snippets.

@plasma-effect
Created October 2, 2014 12:37
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 plasma-effect/504410accbbb64d626bf to your computer and use it in GitHub Desktop.
Save plasma-effect/504410accbbb64d626bf to your computer and use it in GitHub Desktop.
#include<iostream>
template<class T>struct test
{
typedef test<T> this_type;
T v_;
this_type(T v):v_(v){}
this_type():v_(T()){}
};
int main()
{
test<int> v(10);
std::cout<<v.v_<<std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment