https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114652
Bug ID: 114652 Summary: g++ fails to compile the ceres-solver-2.2.0 project: error: use of built-in trait '__remove_cvref(_Tp)' in function signature; use library traits instead Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: yuri at tsoft dot com Target Milestone: --- Command and error: /usr/local/bin/g++13 -DCERES_SUITESPARSE_VERSION=\"7.6.1\" -DEIGEN_MPL2_ONLY -DGFLAGS_IS_A_DLL=0 -DGLOG_USE_GFLAGS -DGLOG_USE_GLOG_EXPORT -Dceres_EXPORTS -I/wrkdirs/usr/ports/math/ceres-solver/work/ceres-solver-2.2.0/include -I/wrkdirs/usr/ports/math/ceres-solver/work/ceres-solver-2.2.0/internal -I/wrkdirs/usr/ports/math/ceres-solver/work/.build/include -I/usr/local/include/suitesparse -I/usr/local/include/eigen3 -O2 -pipe -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc13 -stdlib=libc++ -Wl,-rpath=/usr/local/lib/gcc13 -isystem /usr/local/include -Wmissing-declarations -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers -O2 -pipe -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc13 -stdlib=libc++ -Wl,-rpath=/usr/local/lib/gcc13 -isystem /usr/local/include -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -pthread -MD -MT internal/ceres/CMakeFiles/ceres_internal.dir/parameter_block_ordering.cc.o -MF internal/ceres/CMakeFiles/ceres_internal.dir/parameter_block_ordering.cc.o.d -o internal/ceres/CMakeFiles/ceres_internal.dir/parameter_block_ordering.cc.o -c /wrkdirs/usr/ports/math/ceres-solver/work/ceres-solver-2.2.0/internal/ceres/parameter_block_ordering.cc In file included from /usr/include/c++/v1/__algorithm/copy_move_common.h:12, from /usr/include/c++/v1/__algorithm/copy.h:12, from /usr/include/c++/v1/__memory/uninitialized_algorithms.h:13, from /usr/include/c++/v1/__memory/ranges_uninitialized_algorithms.h:22, from /usr/include/c++/v1/memory:896, from /wrkdirs/usr/ports/math/ceres-solver/work/ceres-solver-2.2.0/internal/ceres/parameter_block_ordering.h:34, from /wrkdirs/usr/ports/math/ceres-solver/work/ceres-solver-2.2.0/internal/ceres/parameter_block_ordering.cc:31: /usr/include/c++/v1/__algorithm/iterator_operations.h: In instantiation of 'static constexpr std::__1::__remove_cvref_t<_Tp> std::__1::_IterOps<std::__1::_ClassicAlgPolicy>::prev(_Iter&&, typename std::__1::iterator_traits<__remove_cvref(_Tp)>::difference_type) [with _Iter = std::__1::__wrap_iter<ceres::internal::ParameterBlock**>&]': /usr/include/c++/v1/__algorithm/iterator_operations.h:161:27: error: use of built-in trait '__remove_cvref(_Tp)' in function signature; use library traits instead 161 | __remove_cvref_t<_Iter> prev(_Iter&& __iter, | ^~~~ /usr/include/c++/v1/__algorithm/iterator_operations.h: In instantiation of 'static constexpr std::__1::__remove_cvref_t<_Tp> std::__1::_IterOps<std::__1::_ClassicAlgPolicy>::next(_Iter&&, typename std::__1::iterator_traits<__remove_cvref(_Tp)>::difference_type) [with _Iter = std::__1::__wrap_iter<ceres::internal::ParameterBlock**>&]': /usr/include/c++/v1/__algorithm/iterator_operations.h:153:27: error: use of built-in trait '__remove_cvref(_Tp)' in function signature; use library traits instead 153 | __remove_cvref_t<_Iter> next(_Iter&& __it, | ^~~~ Log: https://pkg-status.freebsd.org/ampere3/data/140releng-armv7-default/26c5fe5d2fe6/logs/ceres-solver-2.2.0_8.log OS: FreeBSD 14.0