You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the line # distutils: extra_compile_args = -std=c++11 in src\sage\libs\giac\giac.pyx. Then compile (which now uses c++17)
Expected Behavior
Compiles fine
Actual Behavior
``̀
In file included from /Users/runner/miniconda3/envs/sage/include/giac/giac.h:5:
In file included from /Users/runner/miniconda3/envs/sage/include/giac/poly.h:26:
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:341:10: error: no template named 'pointer_to_binary_function' in namespace 'std'
std::pointer_to_binary_function < const monomial &, const monomial &, bool> strictly_greater ;
~~~~~^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:342:28: error: no template named 'pointer_to_binary_function' in namespace 'std'
sort_helper(const std::pointer_to_binary_function < const monomial &, const monomial &, bool> is_strictly_greater):strictly_greater(is_strictly_greater) {};
~~~~~^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:343:41: error: no member named 'ptr_fun' in namespace 'std'
sort_helper():strictly_greater(std::ptr_fun<const monomial &, const monomial &, bool>(m_lex_is_strictly_greater)) {};
~~~~~^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:343:49: error: expected expression
sort_helper():strictly_greater(std::ptr_fun<const monomial &, const monomial &, bool>(m_lex_is_strictly_greater)) {};
^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:343:70: error: expected expression
sort_helper():strictly_greater(std::ptr_fun<const monomial &, const monomial &, bool>(m_lex_is_strictly_greater)) {};
^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:343:95: error: expected '(' for function-style cast or type construction
sort_helper():strictly_greater(std::ptr_fun<const monomial &, const monomial &, bool>(m_lex_is_strictly_greater)) {};
~~~~^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:680:18: error: no template named 'pointer_to_binary_function' in namespace 'std'
const std::pointer_to_binary_function < const monomial &, const monomial &, bool> m_is_strictly_greater
~~~~~^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:729:44: error: no template named 'pointer_to_binary_function' in namespace 'std'
typedef std::map< index_t,T,const std::pointer_to_binary_function < const index_m &, const index_m &, bool> > application;
~~~~~^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:730:30: error: no type named 'ptr_fun' in namespace 'std'
application produit(std::ptr_fun(is_strictly_greater));
~~~~~^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:737:14: error: 'application' (aka 'int') is not a class, namespace, or enumeration
typename application::iterator prod_it,prod_itend;
^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:754:29: error: use of undeclared identifier 'prod_itend'; did you mean 'prod_it'?
prod_it=produit.begin(),prod_itend=produit.end();
### Additional Information
_No response_
### Environment
- **OS**:
- **Sage Version**:
### Checklist
- [X] I have searched the existing issues for a bug report that matches the one I want to file, without success.
- [X] I have read the documentation and troubleshoot guide
The text was updated successfully, but these errors were encountered:
In principle, the error cannot happen if everything are configured correctly.
I cannot reproduce the error on my machine (either replacing 11 with 17, or delete the line entirely as you suggested).
(I'm compiling with meson however, which if I recalled correctly might not parse the # distutils file headers, but by enabling --verbose I see it is compiling with C++17 by default.)
Which compiler are you using? Could be MSVC issue ?
Or maybe your version of Giac is too old? (judging by your line number, 342, this seems likely. But where is the header pulled from? Sage's spkg?)
Steps To Reproduce
Remove the line
# distutils: extra_compile_args = -std=c++11
insrc\sage\libs\giac\giac.pyx
. Then compile (which now uses c++17)Expected Behavior
Compiles fine
Actual Behavior
``̀
In file included from /Users/runner/miniconda3/envs/sage/include/giac/giac.h:5:
In file included from /Users/runner/miniconda3/envs/sage/include/giac/poly.h:26:
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:341:10: error: no template named 'pointer_to_binary_function' in namespace 'std'
std::pointer_to_binary_function < const monomial &, const monomial &, bool> strictly_greater ;
~~~~~^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:342:28: error: no template named 'pointer_to_binary_function' in namespace 'std'
sort_helper(const std::pointer_to_binary_function < const monomial &, const monomial &, bool> is_strictly_greater):strictly_greater(is_strictly_greater) {};
~~~~~^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:343:41: error: no member named 'ptr_fun' in namespace 'std'
sort_helper():strictly_greater(std::ptr_fun<const monomial &, const monomial &, bool>(m_lex_is_strictly_greater)) {};
~~~~~^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:343:49: error: expected expression
sort_helper():strictly_greater(std::ptr_fun<const monomial &, const monomial &, bool>(m_lex_is_strictly_greater)) {};
^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:343:70: error: expected expression
sort_helper():strictly_greater(std::ptr_fun<const monomial &, const monomial &, bool>(m_lex_is_strictly_greater)) {};
^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:343:95: error: expected '(' for function-style cast or type construction
sort_helper():strictly_greater(std::ptr_fun<const monomial &, const monomial &, bool>(m_lex_is_strictly_greater)) {};
~~~~^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:680:18: error: no template named 'pointer_to_binary_function' in namespace 'std'
const std::pointer_to_binary_function < const monomial &, const monomial &, bool> m_is_strictly_greater
~~~~~^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:729:44: error: no template named 'pointer_to_binary_function' in namespace 'std'
typedef std::map< index_t,T,const std::pointer_to_binary_function < const index_m &, const index_m &, bool> > application;
~~~~~^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:730:30: error: no type named 'ptr_fun' in namespace 'std'
application produit(std::ptr_fun(is_strictly_greater));
~~~~~^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:737:14: error: 'application' (aka 'int') is not a class, namespace, or enumeration
typename application::iterator prod_it,prod_itend;
^
/Users/runner/miniconda3/envs/sage/include/giac/monomial.h:754:29: error: use of undeclared identifier 'prod_itend'; did you mean 'prod_it'?
prod_it=produit.begin(),prod_itend=produit.end();
The text was updated successfully, but these errors were encountered: