Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

5.8. Sequence Classes

In this section we’ll describe the specific sequences provided by the MPL, and discuss how they fit the sequence concepts detailed above.

Before we begin, you should know that all of the MPL sequences have both an unnumbered and a numbered form. The unnumbered forms are the ones you’re already familiar with, like mpl::vector<int, long, int>. The corresponding numbered forms include the sequence’s length as part of its template name, for example, mpl::vector3<int, long, int>. The length of unnumbered forms is limited to 20 elements by default[4] to reduce coupling in the library and to limit compilation times. To use the numbered form of a sequence with length N, you must include a corresponding “numbered header” file, named for the sequence whose length is N rounded up to the nearest multiple of ten. For example:

[4] See the Configuration Macros section of the MPL reference manual for details on how to change this limit.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint