does long double work in plugins?

I tried to use std::logl() and the compiler couldn’t find it. Which is weird, since it’s a c++11 thing, afaik. Anyone?

try just logl() without the std::, it seems to compile ok on my side so it might just work (but I didn’t test it)

That seems to work, tx! but for c++11 logl should be in the std namespace, shouldn’t it?

I would think so too, but I didn’t research the problem further so I can’t explain it :slight_smile:

The function is just called long double std::log(long double).

An internet search of “logl” returns std::log, std::logf, std::logl - cppreference.com which is wrong for C++11. The function is in the C99 standard so perhaps some compilers support it (which is why removing std:: worked), but it’s not standard.

C++ prefers function overloads rather than different names for each type like C.

1 Like

Ah, that make sense, thx. I wanted to use the named function for a test, to be sure it was really calling the correct one. Turns out it was a dumb mistake on my part. But glad to have the correct info.