Special functions that are in the C++17 standard don't work [on hold]









up vote
-4
down vote

favorite












I need to use a special function in my program. It is named comp_ellint_1(double) (in some dictionaries also ellint_K(double)).
I found it in the C++17 standard



enter image description here



But, it don't work as you can see. My compiler says me that there is no member comp_ellint_1 in namespace std.



OK. I tried to search what the problem is and found several methods to make it happen:
1. Use macros #define __STDCPP_MATH_SPEC_FUNCS__ and #define __STDCPP_WANT_MATH_SPEC_FUNCS__ 1



  1. Use #include <tr1/cmath> and also std::tr1::comp_ellint_1().
    But my compiler says that it can't found namespace tr1 and also <tr1/cmath>.


  2. Use gcc.
    Many people and articles says that all I need was only provided in GCC compiler. I upgraded it to the latest version and made a default compiler.


But after all my attempts my code still doesn't work. Please, help me if you understand what is going on...



In addition, I have to say that I work on the macbook in CLion or Xcode.










share|improve this question









New contributor




Igor Lazarev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by πάντα ῥεῖ, VTT, user657267, jww, Matthieu Brucher Nov 10 at 11:26


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – πάντα ῥεῖ, VTT, user657267, jww, Matthieu Brucher
If this question can be reworded to fit the rules in the help center, please edit the question.












  • std::tr1 is experimental - so there is no guarantee functions in that namespace will be supported. Assuming the functions you want are supported in recent versions of g++ and libg++, you will need to specify -std=c++17, since gcc/g++ are not configured by default to build for the latest standard.
    – Peter
    Nov 10 at 11:19










  • You should show your code, the command line used, and the exact error. Please don't describe your code or the error.
    – jww
    Nov 10 at 11:21










  • tr1 was for C++11 and absorbed into std. But if your compiler doesn't support tr1 fucntions, the odds of supporting C++17 are... low. Try boost instead in that case.
    – Matthieu Brucher
    Nov 10 at 11:26










  • You shouldn't define __STDCPP_MATH_SPEC_FUNCS__ yourself – it's defined (or not) by the compiler, and if the compiler defines it, you can enable the functions by defining __STDCPP_WANT_MATH_SPEC_FUNCS__.
    – molbdnilo
    Nov 10 at 11:39










  • @Peter where should I write this? (-std...) I'm a noob in it
    – Igor Lazarev
    Nov 10 at 11:49














up vote
-4
down vote

favorite












I need to use a special function in my program. It is named comp_ellint_1(double) (in some dictionaries also ellint_K(double)).
I found it in the C++17 standard



enter image description here



But, it don't work as you can see. My compiler says me that there is no member comp_ellint_1 in namespace std.



OK. I tried to search what the problem is and found several methods to make it happen:
1. Use macros #define __STDCPP_MATH_SPEC_FUNCS__ and #define __STDCPP_WANT_MATH_SPEC_FUNCS__ 1



  1. Use #include <tr1/cmath> and also std::tr1::comp_ellint_1().
    But my compiler says that it can't found namespace tr1 and also <tr1/cmath>.


  2. Use gcc.
    Many people and articles says that all I need was only provided in GCC compiler. I upgraded it to the latest version and made a default compiler.


But after all my attempts my code still doesn't work. Please, help me if you understand what is going on...



In addition, I have to say that I work on the macbook in CLion or Xcode.










share|improve this question









New contributor




Igor Lazarev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by πάντα ῥεῖ, VTT, user657267, jww, Matthieu Brucher Nov 10 at 11:26


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – πάντα ῥεῖ, VTT, user657267, jww, Matthieu Brucher
If this question can be reworded to fit the rules in the help center, please edit the question.












  • std::tr1 is experimental - so there is no guarantee functions in that namespace will be supported. Assuming the functions you want are supported in recent versions of g++ and libg++, you will need to specify -std=c++17, since gcc/g++ are not configured by default to build for the latest standard.
    – Peter
    Nov 10 at 11:19










  • You should show your code, the command line used, and the exact error. Please don't describe your code or the error.
    – jww
    Nov 10 at 11:21










  • tr1 was for C++11 and absorbed into std. But if your compiler doesn't support tr1 fucntions, the odds of supporting C++17 are... low. Try boost instead in that case.
    – Matthieu Brucher
    Nov 10 at 11:26










  • You shouldn't define __STDCPP_MATH_SPEC_FUNCS__ yourself – it's defined (or not) by the compiler, and if the compiler defines it, you can enable the functions by defining __STDCPP_WANT_MATH_SPEC_FUNCS__.
    – molbdnilo
    Nov 10 at 11:39










  • @Peter where should I write this? (-std...) I'm a noob in it
    – Igor Lazarev
    Nov 10 at 11:49












up vote
-4
down vote

favorite









up vote
-4
down vote

favorite











I need to use a special function in my program. It is named comp_ellint_1(double) (in some dictionaries also ellint_K(double)).
I found it in the C++17 standard



enter image description here



But, it don't work as you can see. My compiler says me that there is no member comp_ellint_1 in namespace std.



OK. I tried to search what the problem is and found several methods to make it happen:
1. Use macros #define __STDCPP_MATH_SPEC_FUNCS__ and #define __STDCPP_WANT_MATH_SPEC_FUNCS__ 1



  1. Use #include <tr1/cmath> and also std::tr1::comp_ellint_1().
    But my compiler says that it can't found namespace tr1 and also <tr1/cmath>.


  2. Use gcc.
    Many people and articles says that all I need was only provided in GCC compiler. I upgraded it to the latest version and made a default compiler.


But after all my attempts my code still doesn't work. Please, help me if you understand what is going on...



In addition, I have to say that I work on the macbook in CLion or Xcode.










share|improve this question









New contributor




Igor Lazarev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I need to use a special function in my program. It is named comp_ellint_1(double) (in some dictionaries also ellint_K(double)).
I found it in the C++17 standard



enter image description here



But, it don't work as you can see. My compiler says me that there is no member comp_ellint_1 in namespace std.



OK. I tried to search what the problem is and found several methods to make it happen:
1. Use macros #define __STDCPP_MATH_SPEC_FUNCS__ and #define __STDCPP_WANT_MATH_SPEC_FUNCS__ 1



  1. Use #include <tr1/cmath> and also std::tr1::comp_ellint_1().
    But my compiler says that it can't found namespace tr1 and also <tr1/cmath>.


  2. Use gcc.
    Many people and articles says that all I need was only provided in GCC compiler. I upgraded it to the latest version and made a default compiler.


But after all my attempts my code still doesn't work. Please, help me if you understand what is going on...



In addition, I have to say that I work on the macbook in CLion or Xcode.







c++ function compiler-errors c++17






share|improve this question









New contributor




Igor Lazarev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Igor Lazarev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Nov 10 at 11:23









jww

51.7k37211476




51.7k37211476






New contributor




Igor Lazarev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 10 at 11:08









Igor Lazarev

1




1




New contributor




Igor Lazarev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Igor Lazarev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Igor Lazarev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as off-topic by πάντα ῥεῖ, VTT, user657267, jww, Matthieu Brucher Nov 10 at 11:26


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – πάντα ῥεῖ, VTT, user657267, jww, Matthieu Brucher
If this question can be reworded to fit the rules in the help center, please edit the question.




put on hold as off-topic by πάντα ῥεῖ, VTT, user657267, jww, Matthieu Brucher Nov 10 at 11:26


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – πάντα ῥεῖ, VTT, user657267, jww, Matthieu Brucher
If this question can be reworded to fit the rules in the help center, please edit the question.











  • std::tr1 is experimental - so there is no guarantee functions in that namespace will be supported. Assuming the functions you want are supported in recent versions of g++ and libg++, you will need to specify -std=c++17, since gcc/g++ are not configured by default to build for the latest standard.
    – Peter
    Nov 10 at 11:19










  • You should show your code, the command line used, and the exact error. Please don't describe your code or the error.
    – jww
    Nov 10 at 11:21










  • tr1 was for C++11 and absorbed into std. But if your compiler doesn't support tr1 fucntions, the odds of supporting C++17 are... low. Try boost instead in that case.
    – Matthieu Brucher
    Nov 10 at 11:26










  • You shouldn't define __STDCPP_MATH_SPEC_FUNCS__ yourself – it's defined (or not) by the compiler, and if the compiler defines it, you can enable the functions by defining __STDCPP_WANT_MATH_SPEC_FUNCS__.
    – molbdnilo
    Nov 10 at 11:39










  • @Peter where should I write this? (-std...) I'm a noob in it
    – Igor Lazarev
    Nov 10 at 11:49
















  • std::tr1 is experimental - so there is no guarantee functions in that namespace will be supported. Assuming the functions you want are supported in recent versions of g++ and libg++, you will need to specify -std=c++17, since gcc/g++ are not configured by default to build for the latest standard.
    – Peter
    Nov 10 at 11:19










  • You should show your code, the command line used, and the exact error. Please don't describe your code or the error.
    – jww
    Nov 10 at 11:21










  • tr1 was for C++11 and absorbed into std. But if your compiler doesn't support tr1 fucntions, the odds of supporting C++17 are... low. Try boost instead in that case.
    – Matthieu Brucher
    Nov 10 at 11:26










  • You shouldn't define __STDCPP_MATH_SPEC_FUNCS__ yourself – it's defined (or not) by the compiler, and if the compiler defines it, you can enable the functions by defining __STDCPP_WANT_MATH_SPEC_FUNCS__.
    – molbdnilo
    Nov 10 at 11:39










  • @Peter where should I write this? (-std...) I'm a noob in it
    – Igor Lazarev
    Nov 10 at 11:49















std::tr1 is experimental - so there is no guarantee functions in that namespace will be supported. Assuming the functions you want are supported in recent versions of g++ and libg++, you will need to specify -std=c++17, since gcc/g++ are not configured by default to build for the latest standard.
– Peter
Nov 10 at 11:19




std::tr1 is experimental - so there is no guarantee functions in that namespace will be supported. Assuming the functions you want are supported in recent versions of g++ and libg++, you will need to specify -std=c++17, since gcc/g++ are not configured by default to build for the latest standard.
– Peter
Nov 10 at 11:19












You should show your code, the command line used, and the exact error. Please don't describe your code or the error.
– jww
Nov 10 at 11:21




You should show your code, the command line used, and the exact error. Please don't describe your code or the error.
– jww
Nov 10 at 11:21












tr1 was for C++11 and absorbed into std. But if your compiler doesn't support tr1 fucntions, the odds of supporting C++17 are... low. Try boost instead in that case.
– Matthieu Brucher
Nov 10 at 11:26




tr1 was for C++11 and absorbed into std. But if your compiler doesn't support tr1 fucntions, the odds of supporting C++17 are... low. Try boost instead in that case.
– Matthieu Brucher
Nov 10 at 11:26












You shouldn't define __STDCPP_MATH_SPEC_FUNCS__ yourself – it's defined (or not) by the compiler, and if the compiler defines it, you can enable the functions by defining __STDCPP_WANT_MATH_SPEC_FUNCS__.
– molbdnilo
Nov 10 at 11:39




You shouldn't define __STDCPP_MATH_SPEC_FUNCS__ yourself – it's defined (or not) by the compiler, and if the compiler defines it, you can enable the functions by defining __STDCPP_WANT_MATH_SPEC_FUNCS__.
– molbdnilo
Nov 10 at 11:39












@Peter where should I write this? (-std...) I'm a noob in it
– Igor Lazarev
Nov 10 at 11:49




@Peter where should I write this? (-std...) I'm a noob in it
– Igor Lazarev
Nov 10 at 11:49

















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

這個網誌中的熱門文章

How to read a connectionString WITH PROVIDER in .NET Core?

In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

Museum of Modern and Contemporary Art of Trento and Rovereto