Template syntax puzzle
Has anyone got an idea what the correct syntax for this overloaded operator might be?
This is what I thought would be OK, but it doesn't compile.
Code:
template <typename T>
class MyTemplate
{
public:
template <typename TIterator>
void operator ()(TIterator first, const TIterator& last);
};
template <typename T, typename TIterator>
inline void MyTemplate<T>::operator ()(TIterator first,
const TIterator& last)
{
}
Combining the declaration and definition in the class compiles fine, but there are compiler specific reasons why they must be separate. (It's to do with memory section directives)
"It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
Richard P. Feynman
Bookmarks