Something scary for halloween
Oct. 31st, 2007 09:15 pmSo, 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":
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
no subject
Date: 2007-11-01 05:32 am (UTC)Luckily, you can find some utilities on the web which will decode C++ compiler error messages that contain templates.
no subject
Date: 2007-11-01 06:51 am (UTC)I'm always impressed by the tricks that people like Andrei Alexandrescu can do with C++ templating, but it also seems to me that when that much cleverness is required to do what are ultimately relatively simple tasks, then the there's something wrong with the language.
no subject
Date: 2007-11-01 08:07 am (UTC)