Re: 'lround' is not a member of 'std'

Valery Ushakov <[email protected]>
Newsgroups gmane.os.netbsd.devel.toolchain
Message-ID <[email protected]>
On Sat, Jun 08, 2024 at 17:37:35 +0200, Thomas Klausner wrote:

> On Sat, Jun 08, 2024 at 05:28:34PM +0200, Martin Husemann wrote:
>
> > [/tmp] martin@martins > cat test.cc 
> > #include <cmath>
> > 
> > int main(int argc, char **argv)
> > {
> > 	long double v = 1.7;
> > 	auto a = std::lround(v);
> > 	return a;
> > }
> 
> Thanks. But it doesn't when I remove the 'cmath' include. I'll test
> adding that for mame.

https://en.cppreference.com/w/cpp/numeric/math/round (too lazy to find
the actual standard text) says "Defined in header <cmath>".  Include
hygiene issues (i.e. something else pulls in <cmath> on the system
that their build succeeds (accidentally))?

-uwe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.