'lround' is not a member of 'std'

Thomas Klausner <[email protected]>
Newsgroups gmane.os.netbsd.devel.toolchain
Message-ID <[email protected]>
Hi!

When compiling mame on NetBSD-current, I see

../../../../../src/osd/modules/input/input_sdl.cpp:891:16: error: 'lround' is not a member of 'std'; did you mean 'lround'?

I worked around it by removing the "std::" in the package and reported
this upstream.

Upstream replied[1]:

--- begin ---

The title of this issue is factually incorrect – lround is a member of namespace std (round and return long int, overloaded for standard floating point types): https://en.cppreference.com/w/cpp/numeric/math/round

This is implemented correctly in GNU libstdc++ and llvm libc++. The patch is not correct.

--- end ---

Is there something we need to fix in NetBSD here?

Thanks,
 Thomas

[1] https://github.com/mamedev/mame/issues/12458
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.