News for hackers. Stuff that matters.
Re:The joy of max() by rileymat2 on Friday March 30, 2018 @09:19PM (#16721096)
With no solid ABI it is unlikely.
Re:The joy of max() by anarazel on Friday March 30, 2018 @09:26PM (#16721111)
Is that a likely problem for the kernel, actually? Given that there's no API stability, and the fact that syscalls are an explicit ABI anyway, I don't see how that'd matter for linux?

(not that I'm arguing for C++ in linux or such)

Re:The joy of max() by ihalip on Saturday March 31, 2018 @04:53AM (#16722434)
When using C++, you also need to take into account the compiler ABI.
Re:The joy of max() by clappski on Saturday March 31, 2018 @10:38AM (#16723461)
Does that really matter in the context of the Linux kernel, seeing as GCC is the only supported compiler currently?
Re:The joy of max() by rileymat2 on Friday March 30, 2018 @09:29PM (#16721118)
Sorry, Just my sour grapes.

Recently created a third party SDK DLL in c++ and could not pass c++ types natively (unless you coupled to compiler and maybe version of compiler).

Re:The joy of max() by gmueckl on Saturday March 31, 2018 @05:56AM (#16722621)
This is C++ on Windows for you. On Linux, most compilers follow the ABI that GCC created, which has become very stable. I actually cannot name a C++ compiler that doesn't follow that ABI.
Re:The joy of max() by cesarb on Saturday March 31, 2018 @09:55AM (#16723288)
Actually, Linux nowadays uses the Itanium C++ ABI (even on non-IA64 architectures), and AFAIK it was created by Intel, not GCC.
Re:The joy of max() by gmueckl on Saturday March 31, 2018 @11:37AM (#16723703)
I stand corrected. Indeed, the Itanium ABI defined by Intel is the base.

The important part is that it is used by most, if not all, C++ compilers on that platform.

Re:The joy of max() by pjmlp on Saturday March 31, 2018 @04:01PM (#16724901)
Which is why any Windows developer that wants to export OO libraries uses COM instead, with the benefit that any Windows compiler that can speak COM is able to use the library.

UWP now even supports generics and actual inheritance.

Re:The joy of max() by garmaine on Saturday March 31, 2018 @03:37AM (#16722240)
Kernel modules?
Re:The joy of max() by jjnoakes on Friday March 30, 2018 @09:38PM (#16721154)
One can use the C ABI with C++.
Re:The joy of max() by Buge on Friday March 30, 2018 @11:02PM (#16721440)
How does that work with templates, overloading, operators, etc?
Re:The joy of max() by loeg on Friday March 30, 2018 @11:21PM (#16721498)
They aren't exposed to ABI surfaces. Only C compatible stuff would be.
Re:The joy of max() by ygra on Saturday March 31, 2018 @02:53AM (#16722131)
Cf. e.g. Microsoft's CRT implementation, which uses C++ by now, but still exposes a C API.
Re:The joy of max() by pjmlp on Saturday March 31, 2018 @03:59PM (#16724883)
On Windows that ABI is COM, on Windows 10 it was updated to UWP and is quite feature rich, even if it doesn't support 100% C++ features.