mgieseki / dvisvgm

A fast DVI, EPS, and PDF to SVG converter
https://dvisvgm.de
GNU General Public License v3.0
306 stars 33 forks source link

dvisvgm-2.13 fail to build on macOS 10.11.6 #173

Closed aminophen closed 2 years ago

aminophen commented 2 years ago

Related: https://trac.macports.org/ticket/63553

On macOS 10.11.6, dvisvgm-2.13 (or 2.12) fails to build:

PSPattern.cpp:111:9: error: no viable conversion from returned value of type 'unique_ptr<SVGElement, default_delete<SVGElement>>' to function return type 'unique_ptr<XMLElement, default_delete<XMLElement>>'

I don't know well about C++11 but Google told me the following

Index: PSPattern.cpp
===================================================================
--- PSPattern.cpp   (revision 61708)
+++ PSPattern.cpp   (working copy)
@@ -108,7 +108,7 @@
    // add all succeeding path elements to this group
    auto group = util::make_unique<SVGElement>("g");
    group->setClipPathUrl("pc"+XMLString(psID()));
-   return group;
+   return std::move(group);
 }

Is it safe to apply for TL'22? Thanks.

mgieseki commented 2 years ago

Yes, it's safe to add std::move here which is mainly just a type cast. However, it should be redundant as the compiler is supposed to add it implicitly. I guess the error is caused by a compiler issue present in older versions of Clang.

aminophen commented 2 years ago

thanks, applied r61722.