Edrusb / DAR

DAR - Disk ARchive
http://dar.linux.free.fr/
GNU General Public License v2.0
138 stars 19 forks source link

error: use of undeclared identifier 'set_unexpected' #52

Closed ryandesign closed 1 year ago

ryandesign commented 1 year ago

dar 2.7.10 fails to build with clang 16:

https://build.macports.org/builders/ports-10.9_x86_64-builder/builds/236560/steps/install-port/logs/stdio

erreurs.cpp:163:9: error: use of undeclared identifier 'set_unexpected'
        set_unexpected(inattendue);
        ^

My understanding is that clang 16 and later builds in C++17 mode by default and that std::set_unexpected was removed in C++17.

Manually adding -std=c++14 to the CXXFLAGS environment variable works around the problem.

Edrusb commented 1 year ago

Thanks Ryan for this feedback.

Yes, it makes sense removing this as dar/libdar no more use exception specifications for a long time now... set_unexepected() is thus completely useless in dar/libdar

Edrusb commented 1 year ago

set_unexpected() is now removed (git/branch_2.7.x) and will be available with next release (2.7.11)

Edrusb commented 1 year ago

closing this issue with release 2.7.11 which include this fix