Re: [LAD] [OT] Has anyone managed to compile this?

From: Victor Lazzarini <Victor.Lazzarini@email-addr-hidden>
Date: Sat Jan 16 2010 - 10:37:16 EET

of course, when you read the error messages they say just that. Thanks
for the fix.
yes, it's insane. It's a good laugh, though.

Victor

On 16 Jan 2010, at 01:25, Dominic Sacré wrote:

> On Sat, Jan 16, 2010 at 1:08 AM, Victor Lazzarini
> <Victor.Lazzarini@email-addr-hidden> wrote:
>> Torben's new project brought back to my mind this mind-bending C++
>> template example (see attached), which I could not yet get to
>> compile, I
>> have been told it has been compiled, but g++ will have none of it.
>> So I
>> still have doubts on whether it includes legal C++ code or not. But
>> it is an
>> interesting example (even if it does not build) of what (possibly)
>> can be
>> done with templates.
>>
>> My question to the list is: has anyone managed to compile this code?
>
> Wow, that's insane. But as far as I can tell, it is (almost) valid
> C++. What gcc rightly complains about are a couple of missing typename
> keywords. That's actually a pretty common mistake, because it's hard
> to understand why these are even necessary, and some compilers simply
> don't care.
> The attached version of the file compiles fine with gcc, and the
> program gives the correct answer.
>
>
> Dominic
> <prime.cpp>

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Sat Jan 16 12:15:01 2010

This archive was generated by hypermail 2.1.8 : Sat Jan 16 2010 - 12:15:01 EET