oscar-system/Polymake.jl

CxxWrap 0.11

saschatimme opened this issue · 2 comments

There is a new (possibly breaking) CxxWrap version out.

definitely breaking, I will have a closer look later.

The relevant change is that cxxwrap changed the C++ copy constructor mapping from Base.deepcopy_internal to Base.copy. We use deepcopy in a few places in the tests but this doesn't deepcopy anymore and seems to contain references only.

Maybe we could map both copy and deepcopy to the same copy constructor?
(To make sure both of them really do a proper C++ copy, whatever the C++ objects do in the background, but we can't control that anyway.)

if CxxWrap.libcxxwrapversion() >= v"0.8.0"
    Base.deepcopy(x::T) where T<:SmallObject = Base.copy(x)
else
    Base.copy(x::T) where T<:SmallObject = Base.deepcopy(x)
end