brooksmoses: (anime-me)
[personal profile] brooksmoses
So, I discovered something scary this evening, as appropriate for the holiday. (Well, scary, for those of you who know C++, anyhow.)

I was tracking down a segfault in a testcase for our rather heavily template-based C++ library, and decided that the obvious thing was to run it in GDB and have a look at the stack trace.

I present to you just a tiny -- but telling -- piece from the middle of the ten-thousand-character result I got from "where":
  vsip::impl::None_type> > > > > > > > > > > > >, false>::exec

Date: 2007-11-01 08:07 am (UTC)
From: [identity profile] zwol.livejournal.com
Knowing what's going on there, I wonder, if you took that library and reimplemented it in a language with a sane metaprogramming facility ... would it get any more debuggable? I am actually thinking it wouldn't. You might not have the heinous parse-tree-in-the-type-system, but the construct seen by the code generator would still bear only a sketchy resemblance to the source.
Page generated Jan. 21st, 2026 12:54 am
Powered by Dreamwidth Studios