注释
template<typename T, bool good> void foo1(T& value)
或
template<typename T> void foo1(T& value)
编译时将弹出C2440错误:
error C2440: 'default argument' : cannot convert from 'void (__cdecl *)(T &)' to 'void (__cdecl *)(int &)'
None of the functions with this name in scope match the target type
运行编译环境:
Windows 7 Enterprise
Visual Studio 2008 SP1