News for hackers. Stuff that matters.
Re:C++ confessions of a C developer by revelation on Saturday December 03, 2016 @06:29PM (#13098005)
I made a conscious choice to use some of the new stuff like unique_ptr (primarily) and shared_ptr for memory management w/ move, lambdas, range loops and forward for varargs functions that are not an unsafe macro mess, constexpr, static asserts. It was quite nice, some of that is due to compiler progress, i.e. I always run with address sanitizer now.

Sadly they seem to have added more than they cleaned up. It's 2016, I don't want to have to write another freaking include guard. That should have ended years ago. UTF8 and friends are also a consistent pain, mostly because 3rd party library support is absent. This requires a strong message from the standard library or it's always going to falter.

Re:C++ confessions of a C developer by mrich on Saturday December 03, 2016 @07:29PM (#13098190)
pragma once is supported by enough compilers to be considered a standard by now :)
Re:C++ confessions of a C developer by slavik81 on Sunday December 04, 2016 @03:27AM (#13099279)
I built guardonce[1] to help mitigate complaints that #pragma once was non-standard. If you can easily convert back to include guards, you can worry less about what compilers you might support in the future and just consider the compilers you support right now.

[1]: https://github.com/cgmb/guardonce

Re:C++ confessions of a C developer by gpderetta on Sunday December 04, 2016 @05:40PM (#13102170)
FWIW we had our build system broken on MSVC because of pragma once. IIRC it was an issue with symlink.
Re:C++ confessions of a C developer by PeCaN on Sunday December 04, 2016 @02:15AM (#13099126)
The annoying thing is that in spite of the fact that everyone (including the bizarrely malcompliant and bug-ridden bcc32 compiler I use at work) supports #pragma once, it will never get standardized simply because pragma anything is supposed to be strictly implementation-defined.
Re:C++ confessions of a C developer by pizzaisthebest on Saturday December 03, 2016 @07:23PM (#13098168)
> It's 2016, I don't want to have to write another freaking include guard.

I'd say there are bigger issues with C++ than include guards, but include guards should be out when modules are in the standard (2020?).

Re:C++ confessions of a C developer by astrodust on Saturday December 03, 2016 @09:33PM (#13098522)
Modules are a gargantuan step forward. While we'll likely never get the effortless compilation speeds achieved by Pascal, hopefully the three day build on top-of-the-line hardware is a thing of the past.
Re:C++ confessions of a C developer by revelation on Saturday December 03, 2016 @07:54PM (#13098241)
It's pars pro toto, yes what I actually need is modules to do the whole forward declaration pimpl extern template stuff for me.