namespace mystd {
// ...
template<class In>
bool equal(In begin, In end, In begin2);
template<class In, class T>
T accumulate(In begin, In end, T t);
// ...
} // namespace mystd
1. equal() does work, but accumulate() doesn't. Why? I get a message that accumulate wasn't declared in this scope.
2. I have these functions in a namespace (was just experimenting), but if I try to call equal() like this: mystd::equal(vi.begin(), vi.end(), vi2.begin()) I get an error message: undefined reference to 'bool mystd::equal( ... )'.
Call to equal picks up std::equal through ADL. accumulate is probably wasn't brought in by other headers, so it is unavaliable.
If you call equal throught qualified name, ADL does not work, so it gives you an error.
Yor templated functions are unavaliable because template functions definition should be visible in current compilation unit. You cannot separate template function to header and implementation. Write them in headers.