The code is somewhat like this:
template <class T>
class A {
private:
T* ptr_;
public:
T* get() { return ptr_; }
T& operator*() const {
ASSERT(ptr != NULL);
return *ptr;
}
};
int main() {
A<char[]> a;
}
and i got
Error C2265: (identifier) : reference to a zero-sized array is illegal in "T& operator*()" const
How can i make the complie happpy. I am using Vs2003 not 13 .
by the way, the problem occur when i complie a cpp file which include socped_ptr.h
Hope you can point me out from this!