Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - GCC 4.8.3 doesn't recognize C++11 mathematics functions : (2 Items)
   
GCC 4.8.3 doesn't recognize C++11 mathematics functions  
Hi,

I use SDP 6.5.0 with GCC 4.8.3 and Binutils 2.24.
And I am trying to compile Botan - C++ cryptographic library.

In other topic Mario Charest helped me to resolve the C++ to_string() issue (http://community.qnx.com/sf/discussion/do/
listPosts/projects.toolchain/discussion.core_development_tools.topc26761?_pagenum=4).

Now I got another problem. The compiler cannot find an integral overload of log, exp that are the part of C++11 features
.

See 4th overload for
http://en.cppreference.com/w/cpp/numeric/math/log
http://en.cppreference.com/w/cpp/numeric/math/exp

Did someone find a solution?
Re: GCC 4.8.3 doesn't recognize C++11 mathematics functions  
Our system headers have the C++ overloads in them, so GCC is setup to expect that's where they will come from and won't 
provide any of it's own.

6.5.0 system headers do not contain any C++11 support, so they will not have these overloads. 6.6.0 will though.

You can provide your own, like you did for the string stuff. Something like this might work (untested):

#include <math.h>

template<typename T>
double exp(T val) { return std::exp((double)val); }