My blog
My LinkedIn Profile

BOOKS i'm reading

Napoleon Hill Keys to Success: The 17 Principles of Personal Achievement, Napoleon Hill, ISBN: 978-0452272811
The 4-Hour Workweek: Escape 9-5, Live Anywhere, and Join the New Rich (Expanded and Updated), Timothy Ferriss, ISBN: 978-0307465351
The Fountainhead, Ayn Rand, ISBN: 0452273331


What is the C++ SFINAE principle ?


Permalink 01:17:33 pm, by lano1106, 322 words, 6261 views   English (CA)
Categories: C++

What is the C++ SFINAE principle ?

Comments, Pingbacks:

Comment from: Michal [Visitor] Email
Hallo Olivier.
Thank You for Your example.

So far I am trying to understand how it works.

Unfortunatelly I have problem with preliminary step: it does not compile on my linux box (g++ (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)).

I get the following error:
p41.cpp:12: error: expected primary-expression before ">" token

Line 12 in my program is the following:

enum { Yes = sizeof(IsClassT...::test....(0)) == 1 };

(sorry for modifications in line above, but I couldn't put template parameter T in Your page, because they have a format of tag).

have You got idea why doesn't it compile?

best regards
PermalinkPermalink 08/31/09 @ 01:29
Comment from: lano1106 [Member]

To be honest, I had an intellectual understanding of the example I was giving but I have
never bothered to compile it to see if it works until today.

I have tried to compile it with gcc 3.4.4 and I get the same error message. I will try to
find an answer and post it if possible.

Thank you for the comment.
PermalinkPermalink 08/31/09 @ 20:22

This post has 10 feedbacks awaiting moderation...

Comments are closed for this post.

Olivier Langlois's blog

I want you to find in this blog informations about C++ programming that I had a hard time to find in the first place on the web.

October 2015
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31


Custom Search


XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 2

powered by