cheind / dest

:panda_face: One Millisecond Deformable Shape Tracking Library (DEST)
BSD 3-Clause "New" or "Revised" License
288 stars 109 forks source link

Compile error when building with Visual Studio 2012 #1

Closed embeh closed 8 years ago

embeh commented 8 years ago

This is what I get when trying to build all, using Visual Studio 2012:

dest\inc\dest/core/regressor.h(63): error C2248: 'std::unique_ptr<_Ty>::operator =' : cannot access private member declared in class 'std::unique_ptr<_Ty>' 1> with 1> [ 1> _Ty=dest::core::Regressor::data 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\memory(1448) : see declaration of 'std::unique_ptr<_Ty>::operator =' 1> with 1> [ 1> _Ty=dest::core::Regressor::data 1> ] 1> This diagnostic occurred in the compiler generated function 'dest::core::Regressor &dest::core::Regressor::operator =(const dest::core::Regressor &)'

cheind commented 8 years ago

Thanks for noting. Will have a look tomorrow when I have access to a machine with VS 2012. Did you try the master branch or one of the release tags?

embeh commented 8 years ago

master branch, downloaded yesterday as zip

embeh commented 8 years ago

I get that error when trying to build the examples from the source...

cheind commented 8 years ago

Thanks, will have a look

cheind commented 8 years ago

I understand what will probably cause the issue (failure of providing an explicit assignment operator for PIMPL idiom), but I fail to reproduce your issue with VS 2013 (which is Microsoft Visual Studio Professional 2013, Version 12.0.21005.1 REL). Are you referring to VS 2012, i.e MSVC 11?

embeh commented 8 years ago

Correct, I got the error trying to build in Visual Studio Professional 2012, version 11

cheind commented 8 years ago

Hi,

I don't have access to VS 2012 currently. Would you mind creating a pull request with a proposed fix? I think its mainly due to not explicitly implementing the assignment operator= for the Regressor class. The assignment operator should deep-copy the values in the data struct pointed to by _data.

embeh commented 8 years ago

I would fix it - if I knew how ;-)

cheind commented 8 years ago

Latest master branch should resolve your issues.