Angry example
-
Wasn't sure whether to post this in Clever code or here, but found this snippet in a link on VS standards compliance (http://msdn.microsoft.com/en-us/library/8yk3t00s%28v=vs.71%29.aspx[^]
// defining_member_templates_outside_a_class.cpp
// compile with: /LD
template <class T>
struct S
{
template<class U> void f(U);
};template<class T> template <class U> void S<T>::f(U)
{ //defined out of line
}It made me smile this morning. If you're thinking of complaining then just
S<T>::f(U)
. :) -
Wasn't sure whether to post this in Clever code or here, but found this snippet in a link on VS standards compliance (http://msdn.microsoft.com/en-us/library/8yk3t00s%28v=vs.71%29.aspx[^]
// defining_member_templates_outside_a_class.cpp
// compile with: /LD
template <class T>
struct S
{
template<class U> void f(U);
};template<class T> template <class U> void S<T>::f(U)
{ //defined out of line
}It made me smile this morning. If you're thinking of complaining then just
S<T>::f(U)
. :) -
Wasn't sure whether to post this in Clever code or here, but found this snippet in a link on VS standards compliance (http://msdn.microsoft.com/en-us/library/8yk3t00s%28v=vs.71%29.aspx[^]
// defining_member_templates_outside_a_class.cpp
// compile with: /LD
template <class T>
struct S
{
template<class U> void f(U);
};template<class T> template <class U> void S<T>::f(U)
{ //defined out of line
}It made me smile this morning. If you're thinking of complaining then just
S<T>::f(U)
. :) -
Wasn't sure whether to post this in Clever code or here, but found this snippet in a link on VS standards compliance (http://msdn.microsoft.com/en-us/library/8yk3t00s%28v=vs.71%29.aspx[^]
// defining_member_templates_outside_a_class.cpp
// compile with: /LD
template <class T>
struct S
{
template<class U> void f(U);
};template<class T> template <class U> void S<T>::f(U)
{ //defined out of line
}It made me smile this morning. If you're thinking of complaining then just
S<T>::f(U)
. :):laugh: That has to be the funniest code snippet I've ever seen! Should definitely have gone in clever code. :thumbsup: And that comment ("defined out of line") just makes it that much better!
[
S<T>::f(U) // Out of line.
](http://msdn.microsoft.com/en-us/library/8yk3t00s(v=vs.71).aspx)
-
Wasn't sure whether to post this in Clever code or here, but found this snippet in a link on VS standards compliance (http://msdn.microsoft.com/en-us/library/8yk3t00s%28v=vs.71%29.aspx[^]
// defining_member_templates_outside_a_class.cpp
// compile with: /LD
template <class T>
struct S
{
template<class U> void f(U);
};template<class T> template <class U> void S<T>::f(U)
{ //defined out of line
}It made me smile this morning. If you're thinking of complaining then just
S<T>::f(U)
. :)Wonder why they have written
S::f(U)
??:confused::confused::confused::~:~
-
Wonder why they have written
S::f(U)
??:confused::confused::confused::~:~
-
Wasn't sure whether to post this in Clever code or here, but found this snippet in a link on VS standards compliance (http://msdn.microsoft.com/en-us/library/8yk3t00s%28v=vs.71%29.aspx[^]
// defining_member_templates_outside_a_class.cpp
// compile with: /LD
template <class T>
struct S
{
template<class U> void f(U);
};template<class T> template <class U> void S<T>::f(U)
{ //defined out of line
}It made me smile this morning. If you're thinking of complaining then just
S<T>::f(U)
. :)It's definitely not a clever code. Somebody smokes joint too often. :)