F
F. P. Beekhof
Hello,
could anybody tell what I'm doing wrong?
template <typename T, std::size_t D>
class DTree;
template <class is, typename T, std::size_t D>
is& operator>>(is& i_stream, DTree<T, D> &tree);
template <typename T, std::size_t D>
class DTreeProxy
{
public:
template <class is, typename TT, std::size_t DD>
friend is& operator>> (is& i_stream, DTree<T, D> &tree);
private: typedef int Blah;
};
template <class is, typename T, std::size_t D>
is& operator>>(is& i_stream, DTree<T, D> &tree)
{
typedef typename DTreeProxy<T, D>::Blah Blah; // Error
}
The error is then that Blah is private in the operator>>() context.
I'm lost. How should it be done ?
Many thanks in advance,
Fokko Beekhof
could anybody tell what I'm doing wrong?
template <typename T, std::size_t D>
class DTree;
template <class is, typename T, std::size_t D>
is& operator>>(is& i_stream, DTree<T, D> &tree);
template <typename T, std::size_t D>
class DTreeProxy
{
public:
template <class is, typename TT, std::size_t DD>
friend is& operator>> (is& i_stream, DTree<T, D> &tree);
private: typedef int Blah;
};
template <class is, typename T, std::size_t D>
is& operator>>(is& i_stream, DTree<T, D> &tree)
{
typedef typename DTreeProxy<T, D>::Blah Blah; // Error
}
The error is then that Blah is private in the operator>>() context.
I'm lost. How should it be done ?
Many thanks in advance,
Fokko Beekhof