D
Dmytro
Hi!
This code is ok:
template<class T>
struct Container
{
T x;
typedef int size_type;
size_type size() { return sizeof T; }
};
Why the compiler (VC7) does not compile the following code?
template<class T>
struct Container
{
T x;
typedef int size_type;
size_type size() const;
};
template<class T>
Container<T>::size_type Container<T>::size() { return sizeof T; }
This code is ok:
template<class T>
struct Container
{
T x;
typedef int size_type;
size_type size() { return sizeof T; }
};
Why the compiler (VC7) does not compile the following code?
template<class T>
struct Container
{
T x;
typedef int size_type;
size_type size() const;
};
template<class T>
Container<T>::size_type Container<T>::size() { return sizeof T; }