This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17673] New: ld: Unsatisfied symbols referencing static const via overloaded operator->
- From: "jerrydy at sbcglobal dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Sep 2004 04:26:41 -0000
- Subject: [Bug c++/17673] New: ld: Unsatisfied symbols referencing static const via overloaded operator->
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I have test case below that compiles using HP aC++ and VC++ 6.0. This occurs
only when trying to reference the static const via an overloaded -> operator.
class HandleRep {
public:
static const int OCI_HTYPE = 100;
};
template <class T>
class shared_ptr {
public:
T* t;
T* operator -> () {
return t;
};
};
int main() {
shared_ptr<HandleRep> h;
int i = h->OCI_HTYPE;
}
--
Summary: ld: Unsatisfied symbols referencing static const via
overloaded operator->
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jerrydy at sbcglobal dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17673