[Qt-interest] Weird compiler error with QString(QChar(value))
Srdjan Todorovic
todorovic.s at googlemail.com
Fri May 7 11:19:36 CEST 2010
Hi,
On 6 May 2010 19:39, K. Frank <kfrank29.c at gmail.com> wrote:
> There is a good explanation for this in Marshall Cline's "C++ FAQ LITE":
> http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.19
I just used that as a template for my own test snippet.
Questions, no doubt off-topic for Qt:
1) Why does the C++ compiler / standard allow function declarations
inside a function?
(as opposed to the C-style declarations outside functions that I
have encountered before)
Surely this is not related to function pointers. Or is it?
Also does a function declaration inside a function go out of
scope after the function
hits the ret asm instruction? Does it ever go in scope if the
function is *never* called?
Note that definitions are not allowed (in GCC) and that seems to
make sense.
2) Does anyone ever use this feature of C++?
I think I'll have to ask in #c++
Regards,
Srdjan
More information about the Qt-interest-old
mailing list