c++ - VS2013 compiler: 'CObject::CObject' : cannot access private member declared in class 'CObject' -


i'm trying migrate project c++11 in visual studio. fixed number of issues, there's 1 remaining can't seem crack mfc:

error c2248: 'cobject::cobject' : cannot access private member declared in class 'cobject' (file.cpp) : see declaration of 'cobject::cobject' : see declaration of 'cobject' diagnostic occurred in compiler generated function 'clist<parametervalue,parametervalue &>::clist(const clist<parametervalue,parametervalue &> &)' 

this code hasn't changed on our end , has been compiling fine when targeting visual studio 2010 toolset. gather doesn't seem definition of cobject has changed either makes stranger.

there's other similar questions reported here, couldn't find solution problem there. in other cases appear issue comes lack of public default constructors, copy constructors, or assignment operators.

our class extends clist provides public versions of these, , parametervalue not inherit cobject.

class __declspec(dllexport) gparametervaluelist : public clist<parametervalue, parametervalue&> { // parametervalue struct not inherit cobject (or anything) public:     gparametervaluelist();     gparametervaluelist(const gparametervaluelist& srclist);     gparametervaluelist& operator=(const gparametervaluelist& srclist); } 

any appreciated.

p.s.our implementation exported dll, i'm wondering if might causing conflicts?

edit: not duplicate of error using carray or error using carray -> in these cobject derived classes missing public default , copy constructors. described above, not case our code.

i think problem in parametervalue class. try declare public constructors in there, including default constructor. seems me clist tries call parametervalue constructor somewhere, former can't because latter private.

alternatively, try use list of pointers, clist<parametervalue*, parametervalue*&>.

another alternative use std container instead of clist.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -