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
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
Use
#include <tr1/cmath>
and alsostd::tr1::comp_ellint_1()
.
But my compiler says that it can't found namespace tr1 and also<tr1/cmath>
.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
New contributor
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
|
show 2 more comments
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
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
Use
#include <tr1/cmath>
and alsostd::tr1::comp_ellint_1()
.
But my compiler says that it can't found namespace tr1 and also<tr1/cmath>
.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
New contributor
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
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
|
show 2 more comments
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
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
Use
#include <tr1/cmath>
and alsostd::tr1::comp_ellint_1()
.
But my compiler says that it can't found namespace tr1 and also<tr1/cmath>
.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
New contributor
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
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
Use
#include <tr1/cmath>
and alsostd::tr1::comp_ellint_1()
.
But my compiler says that it can't found namespace tr1 and also<tr1/cmath>
.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
c++ function compiler-errors c++17
New contributor
New contributor
edited Nov 10 at 11:23
jww
51.7k37211476
51.7k37211476
New contributor
asked Nov 10 at 11:08
Igor Lazarev
1
1
New contributor
New contributor
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
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
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
|
show 2 more comments
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
|
show 2 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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