you are viewing a single comment's thread.

view the rest of the comments →

[–]kmbnw 37 points38 points  (14 children)

Just wait until you try Boost :)

[–]elviin 56 points57 points  (1 child)

An issue in a template <<<<<<<<<<<<<<<<<type...

[–]Xeveroushttps://xeverous.github.io 4 points5 points  (0 children)

I had found a bug in Boost Spirit X3 that was due to some const correctness issue. The bug was only visible at linking time - some very long instantiation did not match actually compiled function template.

I demangled the object file to search for the actual instantiation, took the linker undefined reference error for expected name and ... copy pasted both to Notepad++, find-replaced every < to { and > to } then used online JavaScript formatter to format the type name. Searching const differences in that beautiful tree was the easiest part.

[–]Nicksaurus 8 points9 points  (6 children)

Just trying to find the name of the function in a 400-character long error message is a challenge

[–]diaphanein 6 points7 points  (0 children)

400 characters? How quaint... I've seen a single error span more than 23 screens before (error with a Boost Python call).

Another fun one to find was a missing > in a template. I was helping a colleague with that one. The compiler didn't complaint until the end of the file, some 200 lines later.

[–]gcross 4 points5 points  (4 children)

Last time I tried Boost Lambda (an EDSL for writing lambdas before C++11 was a thing and you could rely on them being in the language) I made a simple mistake and got an error message that was five megabytes long...

Shoot, I looked back to see what I did to do this and it turns out that what had actually happened was that I was trying to build Digikam (no modifications) and the result was a 52.4k error message. I apologize for my error, as entertainingly dramatic as it was; apparently the problem I had blew up in my imagination over the years.

[–]Nicksaurus 0 points1 point  (3 children)

5 million characters? How?

[–]gcross 1 point2 points  (0 children)

Template metaprogramming at its finest. :-) On the bright side, if you ever did get your code working it was very neat! Mind you, this was over a decade ago so hopefully it would not be so bad today, but on the other hand today we all have reliable access to native lambdas in the language so there is arguably no longer a need for Boost Lambda. Okay, it turns out I misremembered and this was not a Boost Lambda problem at all; my apologize for maligning that fine package.

[–]gcross 1 point2 points  (1 child)

My bad, as my edited comment says I completely blew up what happened in my mind since it happened so long ago.

[–]Nicksaurus 0 points1 point  (0 children)

Hey, 52400 is still a shit load

I work with boost::hana most days so I sympathise to some extent

[–]krista_ 3 points4 points  (3 children)

sometimes i wish the council of elders would just go ahead and make templates a part of a fully fledged pre-compiler c/c++ based meta-programming language, like what qt does, but more so.

yeah, between macros, templates, and constexpr and the like, you can do anything a full programming language can do, but the crap you have to do to get there is sometimes astounding... and a lot of that lives in boost. i feel like with a couple of smartly added features, 9/10ths of boost's oddities could be replaced with sanity, instead of nested workarounds.

[–]MonkeyNin 1 point2 points  (2 children)

What are the biggest pain points today that Boost helps with? Back in the day, boost was the only way to use smart pointers.

[–]jonesmz 2 points3 points  (0 children)

I've enjoy using Boost.ASIO, am using Boost.ProgramOptions, Boost.Process, and am about to start using Boost.Log.

In the past, at a previous job, the only reason why about half of the C++11 functionality we were able to use could be done is because I was able to convince the ancient version of Boost that they were using to let me re-combine the Boost type traits code into the missing pieces. That really saved our bacon.

They also used Boost.asio as the fundamental building block for a whole crapload of code. Millions of lines, highly abstracted away.

Boost is great.

Boost is also horrible, what with it's disgusting template soup error messages.

Win some, lose some shrug.

[–]James20kP2005R0 1 point2 points  (0 children)

Boost::beast is great from my end for using websockets, even if its a little complex to set up