A Closer Look at Type Deduction

In this chapter, you will learn all of the ins and outs of type deduction in C++, including some of the new additions in C++17. This chapter is important as it will teach you all of the ways in which the compiler will attempt to deduce type information automatically for you. Without a firm understanding of how type deduction works in C++, it is possible to create code that doesn't work as expected, especially when using auto and template programming. The knowledge gained from this chapter will provide you with the skills to properly leverage type deduction in your own applications.

The recipes in this chapter are as follows:

  • Using auto and type deduction
  • Learning how decltype type deduction rules work
  • Working with template function type deduction
  • Leveraging template class type deduction in C++17
  • Working with user-defined type deduction in C++17
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset