With regard to your question, I've a few comments: Hi Daniel, first and foremost I terribly apologize for coming so late here.
(key, newitem) ĮrrorĜ2248 'ValuePairArray::operator =' : cannot access private member declared in class 'ValuePairArray' If (mHashMap.CopyFrom(src.mHashMap) = maxon::FAILED)
(newitem) įollowing code continues on the previous code, but adds a maxon::HashMap.Īnd results in compiler error for the private assignment operator being inaccessible. using the ValuePairArray class via a storage wrapper class using the ValuePairArray class directly If (mBaseArray.CopyFrom(src.mBaseArray) = maxon::FAILED) MAXON_WARN_UNUSED maxon::Result CopyFrom(const StorageWrapper& src) MAXON_OPERATOR_MOVE_ASSIGNMENT(StorageWrapper) MAXON_DISALLOW_COPY_AND_ASSIGN(StorageWrapper) If (mBaseArrayValues.CopyFrom(src.mBaseArrayValues) = maxon::FAILED) MAXON_WARN_UNUSED maxon::Result CopyFrom(const ValuePairArray& src) MAXON_OPERATOR_MOVE_ASSIGNMENT(ValuePairArray) MBaseArrayValues(std::move(src.mBaseArrayValues)) MAXON_DISALLOW_COPY_AND_ASSIGN(ValuePairArray) I just don't see what is missing in my TestClass?įollowing code uses only maxon::BaseArray and all compiles fine. Now, I do understand the fact that the assignment operator is private for the hashmap data structure, and thus the reason for the error being reported. operator = cannot acces private memberĮrrorĜ2248 'TestClass::operator =' : cannot access private member declared in class 'TestClass'
MAXON_WARN_UNUSED maxon::Result CopyFrom(const TestClass& src) MAXON_OPERATOR_MOVE_ASSIGNMENT(TestClass) MAXON_DISALLOW_COPY_AND_ASSIGN(TestClass) And I just seem not to be able to put my finger on. I do have provided the necessary constructors and operators to make it work for the maxon::BaseArray, but I seem to miss something for the maxon::HashMap. So, now that I am using maxon::HashMap I encounter an issue I don't seem to know the solution for. This has been brought up quite a while, back in the days before R20, but mostly when using maxon::BaseArray.
R19, I experience a 'TestClass::operator = ': cannot access private member declared in class 'TestClass'. I haven't digged deeper, so it is just a thought I have. This probably due to changes in the SDK related to maxon::HashMap::Insert replacing the former maxon::HashMap::Put. In R20 and above the issue I experience does not seem to exist. This related to the fact that MAXON_DISALLOW_COPY_AND_ASSIGN needed to be defined. While implementing plugins in the past I managed to understand that for using a specific class into maxon::BaseArray one had to provide own copy and assignment functionality, instead of the default generated ones.