Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build errors related to stl_algobase.h and limits #5

Open
barracuda156 opened this issue Jan 30, 2024 · 0 comments
Open

Build errors related to stl_algobase.h and limits #5

barracuda156 opened this issue Jan 30, 2024 · 0 comments

Comments

@barracuda156
Copy link

Follow-up to #4
Switching to C++17, it fail then on the following:

In file included from /opt/local/include/gcc13/c++/bits/specfun.h:43,
                 from /opt/local/include/gcc13/c++/cmath:3699,
                 from /opt/local/include/gcc13/c++/math.h:36,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_gmsh/gmsh/work/gmsh-4.12.2-source/contrib/mpeg_encode/opts.cpp:43:
/opt/local/include/gcc13/c++/bits/stl_algobase.h:281:56: error: macro "min" passed 3 arguments, but takes just 2
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |                                                        ^
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_gmsh/gmsh/work/gmsh-4.12.2-source/contrib/mpeg_encode/headers/opts.h:40,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_gmsh/gmsh/work/gmsh-4.12.2-source/contrib/mpeg_encode/opts.cpp:41:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_gmsh/gmsh/work/gmsh-4.12.2-source/contrib/mpeg_encode/headers/general.h:151: note: macro "min" defined here
  151 | #define min(a,b) ((a) < (b) ? (a) : (b))
      | 
/opt/local/include/gcc13/c++/bits/stl_algobase.h:303:56: error: macro "max" passed 3 arguments, but takes just 2
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |                                                        ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_gmsh/gmsh/work/gmsh-4.12.2-source/contrib/mpeg_encode/headers/general.h:149: note: macro "max" defined here
  149 | #define max(a,b) ((a) > (b) ? (a) : (b))
      | 
In file included from /opt/local/include/gcc13/c++/bits/specfun.h:44:
/opt/local/include/gcc13/c++/limits:317:11: error: macro "min" requires 2 arguments, but only 1 given
  317 |       min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
      |           ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_gmsh/gmsh/work/gmsh-4.12.2-source/contrib/mpeg_encode/headers/general.h:151: note: macro "min" defined here
  151 | #define min(a,b) ((a) < (b) ? (a) : (b))
      | 
/opt/local/include/gcc13/c++/limits:321:11: error: macro "max" requires 2 arguments, but only 1 given
  321 |       max() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
      |           ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_gmsh/gmsh/work/gmsh-4.12.2-source/contrib/mpeg_encode/headers/general.h:149: note: macro "max" defined here
  149 | #define max(a,b) ((a) > (b) ? (a) : (b))
      | 
/opt/local/include/gcc13/c++/bits/stl_algobase.h:467:37: error: '__is_char' was not declared in this scope; did you mean 'std::__is_char'?
  467 |     typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
      |                                     ^~~~~~~~~
      |                                     std::__is_char
In file included from /opt/local/include/gcc13/c++/cmath:44:
/opt/local/include/gcc13/c++/bits/cpp_type_traits.h:400:12: note: 'std::__is_char' declared here
  400 |     struct __is_char
      |            ^~~~~~~~~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:467:53: error: wrong number of template arguments (1, should be 2)
  467 |     typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
      |                                                     ^
In file included from /opt/local/include/gcc13/c++/cmath:45:
/opt/local/include/gcc13/c++/ext/type_traits.h:45:12: note: provided for 'template<bool <anonymous>, class> struct __gnu_cxx::__enable_if'
   45 |     struct __enable_if
      |            ^~~~~~~~~~~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:467:54: error: expected identifier before '::' token
  467 |     typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
      |                                                      ^~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:467:56: error: '__value' should have been declared inside '::'
  467 |     typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
      |                                                        ^~~~~~~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:467:63: error: expected ';' before ',' token
  467 |     typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
      |                                                               ^
      |                                                               ;
/opt/local/include/gcc13/c++/bits/stl_algobase.h:473:37: error: '__is_char' was not declared in this scope; did you mean 'std::__is_char'?
  473 |     typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
      |                                     ^~~~~~~~~
      |                                     std::__is_char
/opt/local/include/gcc13/c++/bits/cpp_type_traits.h:400:12: note: 'std::__is_char' declared here
  400 |     struct __is_char
      |            ^~~~~~~~~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:473:53: error: wrong number of template arguments (1, should be 2)
  473 |     typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
      |                                                     ^
/opt/local/include/gcc13/c++/ext/type_traits.h:45:12: note: provided for 'template<bool <anonymous>, class> struct __gnu_cxx::__enable_if'
   45 |     struct __enable_if
      |            ^~~~~~~~~~~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:473:54: error: expected identifier before '::' token
  473 |     typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
      |                                                      ^~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:473:54: error: explicit qualification in declaration of '__value'
/opt/local/include/gcc13/c++/bits/stl_algobase.h:473:54: error: redefinition of 'template<bool _IsMove, class _CharT> int __value'
/opt/local/include/gcc13/c++/bits/stl_algobase.h:467:54: note: 'template<bool _IsMove, class _CharT> int __value<_IsMove, _CharT>' previously declared here
  467 |     typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
      |                                                      ^~
/opt/local/include/gcc13/c++/bits/stl_algobase.h: At global scope:
/opt/local/include/gcc13/c++/bits/stl_algobase.h:783:45: error: 'template<bool _IsMove, class _Tp, class _Ref, class _Ptr, class _OI> _OI __copy_move_backward_a1' conflicts with a previous declaration
  783 |     __copy_move_backward_a1(_GLIBCXX_STD_C::_Deque_iterator<_Tp, _Ref, _Ptr>,
      |                                             ^~~~~~~~~~~~~~~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:777:5: note: previous declaration '_BI2 __copy_move_backward_a1(_BI1, _BI1, _BI2)'
  777 |     __copy_move_backward_a1(_BI1 __first, _BI1 __last, _BI2 __result)
      |     ^~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:783:45: error: '_Deque_iterator' is not a member of 'std'; did you mean 'reverse_iterator'?
  783 |     __copy_move_backward_a1(_GLIBCXX_STD_C::_Deque_iterator<_Tp, _Ref, _Ptr>,
      |                                             ^~~~~~~~~~~~~~~
      |                                             reverse_iterator
/opt/local/include/gcc13/c++/bits/stl_algobase.h:783:64: error: expected primary-expression before ',' token
  783 |     __copy_move_backward_a1(_GLIBCXX_STD_C::_Deque_iterator<_Tp, _Ref, _Ptr>,
      |                                                                ^
/opt/local/include/gcc13/c++/bits/stl_algobase.h:1128:12: error: '__fill_a' is not a member of 'std'; did you mean '__fill_a'?
 1128 |       std::__fill_a(__first, __first + __n, __value);
      |            ^~~~~~~~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:981:5: note: '__fill_a' declared here
  981 |     __fill_a(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&,
      |     ^~~~~~~~
/opt/local/include/gcc13/c++/bits/stl_algobase.h: In function '_OI fill_n(_OI, _Size, const _Tp&)':
/opt/local/include/gcc13/c++/bits/stl_algobase.h:1157:19: error: '__fill_n_a' is not a member of 'std'; did you mean '__fill_n_a'?
 1157 |       return std::__fill_n_a(__first, std::__size_to_integer(__n), __value,
      |                   ^~~~~~~~~~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:1117:5: note: '__fill_n_a' declared here
 1117 |     __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value,
      |     ^~~~~~~~~~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:1157:44: error: '__size_to_integer' is not a member of 'std'; did you mean '__is_integer'?
 1157 |       return std::__fill_n_a(__first, std::__size_to_integer(__n), __value,
      |                                            ^~~~~~~~~~~~~~~~~
      |                                            __is_integer
/opt/local/include/gcc13/c++/bits/stl_algobase.h: At global scope:
/opt/local/include/gcc13/c++/bits/stl_algobase.h:1192:7: error: '__is_random_access_iter' was not declared in this scope; did you mean 'std::__is_random_access_iter'?
 1192 |       __is_random_access_iter<_II>::__value, bool>::__type
      |       ^~~~~~~~~~~~~~~~~~~~~~~
      |       std::__is_random_access_iter
/opt/local/include/gcc13/c++/bits/stl_iterator_base_types.h:256:12: note: 'std::__is_random_access_iter' declared here
  256 |     struct __is_random_access_iter
      |            ^~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:1192:34: error: wrong number of template arguments (1, should be 2)
 1192 |       __is_random_access_iter<_II>::__value, bool>::__type
      |                                  ^
/opt/local/include/gcc13/c++/ext/type_traits.h:45:12: note: provided for 'template<bool <anonymous>, class> struct __gnu_cxx::__enable_if'
   45 |     struct __enable_if
      |            ^~~~~~~~~~~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:1192:35: error: expected identifier before '::' token
 1192 |       __is_random_access_iter<_II>::__value, bool>::__type
      |                                   ^~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:1192:35: error: explicit qualification in declaration of '__value'
/opt/local/include/gcc13/c++/bits/stl_algobase.h:1192:37: error: redeclaration of 'template<class _Tp, class _Ref, class _Ptr, class _II> int __value'
 1192 |       __is_random_access_iter<_II>::__value, bool>::__type
      |                                     ^~~~~~~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:467:54: note: previous declaration 'template<bool _IsMove, class _CharT> int __value<_IsMove, _CharT>'
  467 |     typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
      |                                                      ^~
/opt/local/include/gcc13/c++/bits/stl_algobase.h:1192:44: error: expected ';' before ',' token
 1192 |       __is_random_access_iter<_II>::__value, bool>::__type
      |                                            ^
      |                                            ;
/opt/local/include/gcc13/c++/bits/stl_algobase.h: At global scope:
/opt/local/include/gcc13/c++/bits/stl_algobase.h:2224:1: error: expected declaration before '}' token
 2224 | } // namespace std
      | ^
/opt/local/include/gcc13/c++/limits:317:7: error: 'constexpr' static data member 'min' must have an initializer
  317 |       min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
      |       ^~~
/opt/local/include/gcc13/c++/limits:317:7: error: expected ';' at end of member declaration
  317 |       min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
      |       ^~~
      |          ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant