I want to overload conversion operator for two templates.
A.h
#pragma once
#include <B.h>
template <typename T> class A
{
operator B<T>() const;
}
B.h
#pragma once
#include <A.h>
template <typename T> class B
{
operator A<T>() const;
}
I got error
error C2833: 'operator A' is not a recognized operator or type see
reference to class template instantiation 'B<T>' being compiled
Although it works if conversion operator is overloaded only in one template.