Xcode, Cocoa and std::list
Xcode, Cocoa and std::list
- Subject: Xcode, Cocoa and std::list
- From: "McLaughlin, Michael P." <email@hidden>
- Date: Fri, 27 Mar 2009 13:04:38 -0400
- Acceptlanguage: en-US
- Thread-topic: Xcode, Cocoa and std::list
Don't know if this is the proper forum for this but I encountered a strange
error, as follows:
In a Cocoa header for an ObjectiveC++ class, I have (after the list and
vector headers, etc.)
@interface myClass : NSObject {
std::vector<int> myVec;
std::list<int> myList;
}
In the implementation (myClass.mm) file, myVec behaves just as expected but
any reference to myList (e.g., myList.size()) crashes with a BAD_ACCESS
error.
However, if I declare
std::list<int> myList;
inside a method of myClass, then it too works properly. Moreover, if I
declare
std::vector< std::list <int> > myVecOfLists;
in the *interface*, then both the vector and its list components work
properly.
Is there some Xcode/Cocoa/ObjectiveC++ fine print that I should have read?
or some other fault obvious to anyone?
TIA.
--
Mike McLaughlin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden