Monday, October 21, 2013

My friend Piotrek Czerwiński had an alternative to snippet no.2

template struct WRITE {
	static void write()
	{
		cout<::write();
		cout< struct WRITE<100> {
   static void write()
	{
	}
};


int _tmain(int argc, _TCHAR* argv[])
{
	WRITE<0>::write();
	return 0;
}
This is made by partial template specialization :)

No comments:

Post a Comment