Skip to main content

C++ Templates for Microcontrollers

  • Chapter
  • First Online:
Book cover Real-Time C++
  • 4580 Accesses

Abstract

C++ templates use the same source code for different types. This can improve code flexibility and make programs easier to maintain because code can be written and tested once, yet used with different types. Templates can also be used in generic programming that treats different types with the same semantics. This chapter introduces templates and static polymorphism, the STL, template metaprogramming and some generic programming methods, and shows how these can be used effectively for microcontrollers.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. B. Eckel, Thinking in C++ Volume 2: Practical Programming (Pearson Prentice Hall, Upper Saddle River, 2004)

    Google Scholar 

  2. N.M. Josuttis, The C++ Standard Library: A Tutorial and Reference, 2nd edn. (Addison-Wesley, Boston, 2011)

    Google Scholar 

  3. D. Vandevoorde, N.M. Josuttis, C++ Templates: The Complete Guide (Addison-Wesley, Boston, 2003)

    Google Scholar 

  4. Wikipedia, ASCII (2017), http://en.wikipedia.org/wiki/ASCII

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer-Verlag GmbH Germany, part of Springer Nature

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Kormanyos, C. (2018). C++ Templates for Microcontrollers. In: Real-Time C++. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-56718-0_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-56718-0_5

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-662-56717-3

  • Online ISBN: 978-3-662-56718-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics