These are the examples from the following book:
Nicolai M. Josuttis
C++ Templates - The Complete Guide, 2nd Edition
Addison-Wesley, 2017
ISBN-13: 978-0-321-71412-1
ISBN-10: 0-321-71412-1
Copyright © 2017 by Addison-Wesley, David Vandevoorde, Nicolai M. Josuttis, and Douglas Gregor.