This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/17673] New: ld: Unsatisfied symbols referencing static const via overloaded operator->


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]