Is the following specialization of the member function template bar
valid? It compiles on gcc 4.5.3 and VS .NET 2008. I'm confused because I vaguely recall reading that function templates cannot be specialized.
struct Foo
{
template<typename T>
void bar();
};
template<typename T>
void Foo::bar(){}
template<>
void Foo::bar<bool>(){}
int main()
{
Foo f;
f.bar<char>();
f.bar<bool>();
}