Skip to main content
added 247 characters in body
Source Link
rwong
  • 17.2k
  • 3
  • 38
  • 82

Updated (2016/08/24)

Recommended article with focus on C++11:

An introduction to C++'s SFINAE concept: compile-time introspection of a class member (Jean Guegant)


As a learner of C++ Template Metaprogramming a few months ago, I would still recommend to read this book.

As a learner of C++ Template Metaprogramming a few months ago, I would still recommend to read this book.

Updated (2016/08/24)

Recommended article with focus on C++11:

An introduction to C++'s SFINAE concept: compile-time introspection of a class member (Jean Guegant)


As a learner of C++ Template Metaprogramming a few months ago, I would still recommend to read this book.

added 120 characters in body
Source Link
rwong
  • 17.2k
  • 3
  • 38
  • 82
added 362 characters in body
Source Link
rwong
  • 17.2k
  • 3
  • 38
  • 82

The missing parts from C++11 are:


There is a construct which you will see a lot in code that is pasted onto Stackoverflow: std::enable_if. However, in practice, I find this quite difficult to use, because of the One-Definition Rule and SFINAE. This is why this book is important, because it goes over the basics.


If you use C++ templates substantially in a cross-platform library, you will need to test-compile your code in different compilers. This is because each compiler has different level of compliance to the C++ specification. Code that compiles fine on one may be reject by the other, and occasionally the compiler that accepts it is the one that breaks the specification.

If you use C++ templates substantially in a cross-platform library, you will need to test-compile your code in different compilers. This is because each compiler has different level of compliance to the C++ specification. Code that compiles fine on one may be reject by the other, and occasionally the compiler that accepts it is the one that breaks the specification.

The missing parts from C++11 are:


There is a construct which you will see a lot in code that is pasted onto Stackoverflow: std::enable_if. However, in practice, I find this quite difficult to use, because of the One-Definition Rule and SFINAE. This is why this book is important, because it goes over the basics.


If you use C++ templates substantially in a cross-platform library, you will need to test-compile your code in different compilers. This is because each compiler has different level of compliance to the C++ specification. Code that compiles fine on one may be reject by the other, and occasionally the compiler that accepts it is the one that breaks the specification.

Source Link
rwong
  • 17.2k
  • 3
  • 38
  • 82
Loading