Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22307

Errors after updating to GCC 12

$
0
0

I have a project where I'm using the datetimepp library and it has been working fine. However I recently did a pacman -Syu and updated gcc. I then compiled the project (which had been compiling properly before that) and compiled it. I got multiple errors complaining "default argument redefinition"

datetimepp/datetime.h:311:96: error: redefinition of default argument for ‘typename std::enable_if<std::is_floating_point<_Tp>::value>::type* <anonymous>’  311 | template<class Scalar, typename std::enable_if<std::is_floating_point<Scalar>::value>::type* = nullptr>      |                                                                                                ^~~~~~~datetimepp/datetime.h:73:96: note: original definition appeared here   73 | template<class Scalar, typename std::enable_if<std::is_floating_point<Scalar>::value>::type* = nullptr>      |                                                                                                ^~~~~~~datetimepp/datetime.h:323:90: error: redefinition of default argument for ‘typename std::enable_if<std::is_integral<_Tp>::value>::type* <anonymous>’  323 | template<class Scalar, typename std::enable_if<std::is_integral<Scalar>::value>::type* = nullptr>      |                                                                                          ^~~~~~~datetimepp/datetime.h:76:90: note: original definition appeared here   76 | template<class Scalar, typename std::enable_if<std::is_integral<Scalar>::value>::type* = nullptr>      |                                                                                          ^~~~~~~datetimepp/datetime.h:335:96: error: redefinition of default argument for ‘typename std::enable_if<std::is_floating_point<_Tp>::value>::type* <anonymous>’  335 | template<class Scalar, typename std::enable_if<std::is_floating_point<Scalar>::value>::type* = nullptr>      |                                                                                                ^~~~~~~datetimepp/datetime.h:79:96: note: original definition appeared here   79 | template<class Scalar, typename std::enable_if<std::is_floating_point<Scalar>::value>::type* = nullptr>      |                                                                                                ^~~~~~~datetimepp/datetime.h:342:90: error: redefinition of default argument for ‘typename std::enable_if<std::is_integral<_Tp>::value>::type* <anonymous>’  342 | template<class Scalar, typename std::enable_if<std::is_integral<Scalar>::value>::type* = nullptr>      |                                                                                          ^~~~~~~datetimepp/datetime.h:82:90: note: original definition appeared here   82 | template<class Scalar, typename std::enable_if<std::is_integral<Scalar>::value>::type* = nullptr>

Just to confirm that the program was indeed working before I updated, I rolled back the gcc update and the program compiled successfully.

Is this a problem with my program that I should fix, or is it a problem with g++?


Viewing all articles
Browse latest Browse all 22307

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>