POV-Ray : Newsgroups : povray.off-topic : Adventures with C++ : Re: Adventures with C++ Server Time
29 Jul 2024 02:23:15 EDT (-0400)
  Re: Adventures with C++  
From: Orchid Win7 v1
Date: 23 May 2013 13:40:14
Message: <519e547e$1@news.povray.org>
The OTHER fun thing, of course, is when you invoke a template with the 
wrong parameters.

Trouble is, the compiler has no idea that the parameters are wrong. All 
it knows is that when it tries to expand the template, somewhere several 
million miles away from your code a type mismatch happens, or an 
operator doesn't exist, or...

This would be acceptable if VC offered some how to find out WHAT 
TEMPLATE it was attempting to expand when the error occurred. But no, it 
just shows you the source code for the STL (or Boost or whatever) and 
points at the line on which the problem was actually detected. There 
seems to be no way that I can discover what line of which file resulting 
in this template being invoked in the first place - and THAT is surely 
where the problem is, not in STL itself.

(E.g., today I erroneously said set<string, string>. It took quite a 
while to hunt through the source control history to manually inspect 
every template instruction I've recently touched and thus discover the 
problem. If I knew, say, WHAT FILE to look in, it might be faster...)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.