C++11StdLib  Table of Code Examples

C++ Templates - The Complete Guide, 2nd Edition

Table of Code Examples

This is the table of contents of all code examples of the book C++ Templates - The Complete Guide, 2nd Edition
by David Vandevoorde, Nicolai M. Josuttis, and Douglas Gregor.



[examples-home]  [book-home]  [copyrights

basics:
  basics/addspace.hpp
  basics/addvalue.hpp
  basics/arrays.cpp
  basics/arrays.hpp
  basics/boolstring.hpp
  basics/boolstringgetbool.hpp
  basics/byref.hpp
  basics/byvalue.hpp
  basics/cref.cpp
  basics/errornovel1.cpp
  basics/errornovel2.cpp
  basics/foldtraverse.cpp
  basics/foreach.cpp
  basics/foreach.hpp
  basics/foreachinvoke.cpp
  basics/foreachinvoke.hpp
  basics/invoke.hpp
  basics/invokeret.hpp
  basics/isprime.hpp
  basics/isprime11.hpp
  basics/isprime14.hpp
  basics/len1.hpp
  basics/len2.hpp
  basics/lessarray.hpp
  basics/lessstring.hpp
  basics/max1.cpp
  basics/max1.hpp
  basics/max2.cpp
  basics/max3ref.cpp
  basics/max3val.cpp
  basics/max4.cpp
  basics/maxauto.hpp
  basics/maxcommon.hpp
  basics/maxconstexpr.hpp
  basics/maxdecltype.hpp
  basics/maxdecltypedecay.hpp
  basics/maxdefault1.hpp
  basics/maxdefault3.hpp
  basics/maxdefault4.hpp
  basics/maxdefaultdeclval.hpp
  basics/message.cpp
  basics/move1.cpp
  basics/move2.cpp
  basics/myfirst.cpp
  basics/myfirst.hpp
  basics/myfirst2.hpp
  basics/myfirstmain.cpp
  basics/printcoll.hpp
  basics/referror1.cpp
  basics/referror2.cpp
  basics/specialmemtmpl1.cpp
  basics/specialmemtmpl2.hpp
  basics/specialmemtmpl3.cpp
  basics/specialmemtmpl3.hpp
  basics/stack1.hpp
  basics/stack1test.cpp
  basics/stack2.hpp
  basics/stack3.hpp
  basics/stack3test.cpp
  basics/stack5assign.hpp
  basics/stack5decl.hpp
  basics/stack6assign.hpp
  basics/stack6decl.hpp
  basics/stack7assign.hpp
  basics/stack7decl.hpp
  basics/stack8decl.hpp
  basics/stack9.hpp
  basics/stack9test.cpp
  basics/stackauto.cpp
  basics/stackauto.hpp
  basics/stackdeduce1.hpp
  basics/stacknontype.cpp
  basics/stacknontype.hpp
  basics/stackpartspec.hpp
  basics/tmplparamref.cpp
  basics/varprint1.hpp
  basics/varprint2.hpp
  basics/varusing.cpp

bridge:
  bridge/forupto1.cpp
  bridge/forupto2.hpp
  bridge/forupto3.hpp
  bridge/forupto4.cpp
  bridge/functionptr.hpp
  bridge/functorbridge.hpp
  bridge/isequalitycomparable.hpp
  bridge/specificfunctorbridge.hpp
  bridge/tryequals.hpp

debugging:
  debugging/hasderef.hpp
  debugging/tracer.hpp
  debugging/tracertest.cpp

deduce:
  deduce/aliastemplate.cpp
  deduce/initlist.cpp
  deduce/resulttypetmpl.cpp

details:
  details/adl.cpp
  details/definitions1.hpp
  details/definitions2.hpp
  details/definitions3.hpp
  details/fppm.cpp
  details/funcoverload1.cpp
  details/funcoverload1.hpp
  details/funcoverload2.cpp
  details/implicit.cpp
  details/inject.cpp
  details/lazy1.hpp
  details/lazy2.cpp
  details/max.cpp
  details/nontmpl1.cpp
  details/nontmpl2.cpp
  details/tmplconstr.cpp
  details/tupleoverload.cpp
  details/variadicoverload.cpp

exprtmpl:
  exprtmpl/exprarray.hpp
  exprtmpl/exprops1.hpp
  exprtmpl/exprops1a.hpp
  exprtmpl/exprops2.hpp
  exprtmpl/exprops3.hpp
  exprtmpl/exprops4.hpp
  exprtmpl/exprscalar.hpp
  exprtmpl/sarray1.cpp
  exprtmpl/sarray1.hpp
  exprtmpl/sarray2.cpp
  exprtmpl/sarray2.hpp
  exprtmpl/sarrayops1.hpp
  exprtmpl/sarrayops2.hpp

inherit:
  inherit/basememberpair.hpp
  inherit/countertest.cpp
  inherit/ebco1.cpp
  inherit/ebco2.cpp
  inherit/empty.cpp
  inherit/equalitycomparable.cpp
  inherit/iteratorfacadeaccessskel.hpp
  inherit/iteratorfacadeskel.hpp
  inherit/listnode.hpp
  inherit/listnodeiterator0.hpp
  inherit/objectcounter.hpp
  inherit/person.hpp
  inherit/projectioniterator.cpp
  inherit/projectioniteratorskel.hpp
  inherit/virtual.cpp
  inherit/wrapper.cpp

meta:
  meta/duration.hpp
  meta/durationadd.hpp
  meta/ifthenelse.hpp
  meta/pow3const.hpp
  meta/pow3enum.hpp
  meta/ratio.hpp
  meta/ratioadd.hpp
  meta/removeallextents.hpp
  meta/sqrt1.cpp
  meta/sqrt1.hpp
  meta/sqrt2.hpp
  meta/sqrtconstexpr.hpp
  meta/unruh.cpp

names:
  names/anglebrackethack.cpp

overload:
  overload/initlist.cpp
  overload/initlistctor.cpp
  overload/initlistovl.cpp

poly:
  poly/MyClass.hpp
  poly/conceptspoly.hpp
  poly/conceptsreq.hpp
  poly/coord.hpp
  poly/dynahier.hpp
  poly/dynapoly.cpp
  poly/printmax.cpp
  poly/statichier.hpp
  poly/staticpoly.cpp

traits:
  traits/accum0.hpp
  traits/accum1.cpp
  traits/accum1.hpp
  traits/accum2.hpp
  traits/accum3.hpp
  traits/accum5.hpp
  traits/accum6.cpp
  traits/accum6.hpp
  traits/accum7.hpp
  traits/accumtraits2.hpp
  traits/accumtraits3.hpp
  traits/accumtraits4.hpp
  traits/accumtraits4bigint.hpp
  traits/addreference.hpp
  traits/boolconstant.hpp
  traits/decay.cpp
  traits/decay.hpp
  traits/elementtype.cpp
  traits/elementtype.hpp
  traits/hasbegin.hpp
  traits/hasless.hpp
  traits/hasmember.cpp
  traits/hasmember.hpp
  traits/hasplus.hpp
  traits/hassizetype.hpp
  traits/hastype.cpp
  traits/hastype.hpp
  traits/hasvarious.hpp
  traits/ifthenelse.hpp
  traits/isarray.hpp
  traits/isclass.hpp
  traits/isconvertible.hpp
  traits/isdefaultconstructible1.hpp
  traits/isdefaultconstructible2.hpp
  traits/isdefaultconstructible3.hpp
  traits/isenum.hpp
  traits/isfunction.hpp
  traits/isfunda.hpp
  traits/isfundatest.cpp
  traits/islvaluereference.hpp
  traits/isnothrowmoveconstructible1.hpp
  traits/isnothrowmoveconstructible2.hpp
  traits/ispointer.hpp
  traits/ispointertomember.hpp
  traits/isreference.hpp
  traits/isrvaluereference.hpp
  traits/issame.cpp
  traits/issame.hpp
  traits/issame0.hpp
  traits/isvalid.hpp
  traits/isvalid1.cpp
  traits/isvalid2.cpp
  traits/passbyvalue.cpp
  traits/plus1.hpp
  traits/plus2.hpp
  traits/plus3.hpp
  traits/removeconst.hpp
  traits/removecv.hpp
  traits/removereference.hpp
  traits/removevolatile.hpp
  traits/rparam.hpp
  traits/rparam1.cpp
  traits/rparam2.cpp
  traits/rparamcls.hpp
  traits/sizeof.cpp
  traits/smallestint.hpp
  traits/sumpolicy1.hpp
  traits/sumpolicy2.hpp

tuples:
  tuples/apply.hpp
  tuples/compressedtuple1.cpp
  tuples/constantget.hpp
  tuples/copycounter.hpp
  tuples/copycountertest.hpp
  tuples/ctvalue.hpp
  tuples/indexlistreverse.hpp
  tuples/indexsort.cpp
  tuples/literals.hpp
  tuples/makeindexlist.hpp
  tuples/maketuple.hpp
  tuples/popback.hpp
  tuples/popfront.hpp
  tuples/pushback.hpp
  tuples/pushfront.hpp
  tuples/reverse.hpp
  tuples/select.hpp
  tuples/splat.hpp
  tuples/tuple0.hpp
  tuples/tupleelt1.hpp
  tuples/tupleelt2.hpp
  tuples/tupleeq.hpp
  tuples/tupleget.hpp
  tuples/tupleio.hpp
  tuples/tuplesort.hpp
  tuples/tuplesorttest.hpp
  tuples/tuplestorage1.hpp
  tuples/tuplestorage2.hpp
  tuples/tuplestorage3.hpp
  tuples/tupletypelist.hpp

typelist:
  typelist/accumulate.hpp
  typelist/addconst.hpp
  typelist/cons.hpp
  typelist/consfront.hpp
  typelist/consisempty.hpp
  typelist/conslisttest.hpp
  typelist/conspopfront.hpp
  typelist/conspushfront.hpp
  typelist/cttypelist.hpp
  typelist/ctvalue.hpp
  typelist/ctvalue17.hpp
  typelist/genericlargesttype.hpp
  typelist/genericpushback.hpp
  typelist/identity.hpp
  typelist/insertionsort.hpp
  typelist/insertionsorttest.hpp
  typelist/insertsorted.hpp
  typelist/largesttype.hpp
  typelist/largesttypeacc.hpp
  typelist/largesttypeacc0.hpp
  typelist/multiply.hpp
  typelist/nthelement.hpp
  typelist/select.hpp
  typelist/transform.hpp
  typelist/typelist.hpp
  typelist/typelistfront.hpp
  typelist/typelistisempty.hpp
  typelist/typelistpopback.hpp
  typelist/typelistpopfront.hpp
  typelist/typelistpushback.hpp
  typelist/typelistpushfront.hpp
  typelist/typelistreverse.hpp
  typelist/valuelist.hpp
  typelist/valuelisttest.hpp
  typelist/variadictransform.hpp

typeoverload:
  typeoverload/advance2.hpp
  typeoverload/advance3.hpp
  typeoverload/container1.hpp
  typeoverload/container4.hpp
  typeoverload/enableif.hpp
  typeoverload/iscontextualbool.hpp
  typeoverload/isconvertible.hpp
  typeoverload/lessresult.hpp
  typeoverload/min.cpp
  typeoverload/min.hpp
  typeoverload/min2.hpp
  typeoverload/min3.hpp

utils:
  utils/isconstructible.cpp
  utils/traits1.cpp
  utils/traits2.cpp

variant:
  variant/accumulate.hpp
  variant/commontype.hpp
  variant/findindexof.hpp
  variant/printrec.cpp
  variant/variant.cpp
  variant/variant.hpp
  variant/variantchoice.hpp
  variant/variantchoiceassign.hpp
  variant/variantchoicedestroy.hpp
  variant/variantchoiceinit.hpp
  variant/variantcopyassign.hpp
  variant/variantcopyctor.hpp
  variant/variantcopyctortmpl.hpp
  variant/variantdefaultctor.cpp
  variant/variantdefaultctor.hpp
  variant/variantdestroy.hpp
  variant/variantdestroy17.hpp
  variant/variantempty.hpp
  variant/variantexception.cpp
  variant/variantget.hpp
  variant/variantis.hpp
  variant/variantmovector.hpp
  variant/variantpromote.cpp
  variant/variantstorage.hpp
  variant/variantstorageastuple.hpp
  variant/variantstorageasunion.hpp
  variant/variantvisit.hpp
  variant/variantvisitimpl.hpp
  variant/variantvisitresult.hpp
  variant/variantvisitresultcommon.hpp
  variant/variantvisitresultstd.hpp
  variant/visit.cpp