Some useful code programed with template technology under C++11 stander.