diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 0000000..ac7af2e --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1 @@ +/html/ diff --git a/doc/html/.gitignore b/doc/html/.gitignore deleted file mode 100644 index 98336bd..0000000 --- a/doc/html/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/standalone_HTML.manifest -/docutils.css -/minimal.css -/reference.css diff --git a/doc/html/boostbook.css b/doc/html/boostbook.css deleted file mode 100644 index 28f8935..0000000 --- a/doc/html/boostbook.css +++ /dev/null @@ -1,716 +0,0 @@ - -/*============================================================================= -Copyright (c) 2004 Joel de Guzman -http://spirit.sourceforge.net/ - -Copyright 2013 Niall Douglas additions for colors and alignment. -Copyright 2013 Paul A. Bristow additions for more colors and alignments. - -Distributed under the Boost Software License, Version 1.0. (See accompany- -ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -=============================================================================*/ - -/*============================================================================= -Body defaults -=============================================================================*/ - - body - { - margin: 1em; - font-family: sans-serif; - } - -/*============================================================================= -Paragraphs -=============================================================================*/ - - p - { - text-align: left; - font-size: 10pt; - line-height: 1.15; - } - -/*============================================================================= -Program listings -=============================================================================*/ - - /* Code on paragraphs */ - p tt.computeroutput - { - font-size: 9pt; - } - - pre.synopsis - { - font-size: 9pt; - margin: 1pc 4% 0pc 4%; - padding: 0.5pc 0.5pc 0.5pc 0.5pc; - } - - .programlisting, - .screen - { - font-size: 9pt; - display: block; - margin: 1pc 4% 0pc 4%; - padding: 0.5pc 0.5pc 0.5pc 0.5pc; - } - - /* Program listings in tables don't get borders */ - td .programlisting, - td .screen - { - margin: 0pc 0pc 0pc 0pc; - padding: 0pc 0pc 0pc 0pc; - } - -/*============================================================================= -Headings -=============================================================================*/ - - h1, h2, h3, h4, h5, h6 - { - text-align: left; - margin: 1em 0em 0.5em 0em; - font-weight: bold; - } - - h1 { font-size: 140%; } - h2 { font-weight: bold; font-size: 140%; } - h3 { font-weight: bold; font-size: 130%; } - h4 { font-weight: bold; font-size: 120%; } - h5 { font-weight: normal; font-style: italic; font-size: 110%; } - h6 { font-weight: normal; font-style: italic; font-size: 100%; } - - /* Top page titles */ - title, - h1.title, - h2.title - h3.title, - h4.title, - h5.title, - h6.title, - .refentrytitle - { - font-weight: bold; - margin-bottom: 1pc; - } - - h1.title { font-size: 140% } - h2.title { font-size: 140% } - h3.title { font-size: 130% } - h4.title { font-size: 120% } - h5.title { font-size: 110% } - h6.title { font-size: 100% } - - .section h1 - { - margin: 0em 0em 0.5em 0em; - font-size: 140%; - } - - .section h2 { font-size: 140% } - .section h3 { font-size: 130% } - .section h4 { font-size: 120% } - .section h5 { font-size: 110% } - .section h6 { font-size: 100% } - - /* Code on titles */ - h1 tt.computeroutput { font-size: 140% } - h2 tt.computeroutput { font-size: 140% } - h3 tt.computeroutput { font-size: 130% } - h4 tt.computeroutput { font-size: 130% } - h5 tt.computeroutput { font-size: 130% } - h6 tt.computeroutput { font-size: 130% } - - -/*============================================================================= -Author -=============================================================================*/ - - h3.author - { - font-size: 100% - } - -/*============================================================================= -Lists -=============================================================================*/ - - li - { - font-size: 10pt; - line-height: 1.3; - } - - /* Unordered lists */ - ul - { - text-align: left; - } - - /* Ordered lists */ - ol - { - text-align: left; - } - -/*============================================================================= -Links -=============================================================================*/ - - a - { - text-decoration: none; /* no underline */ - } - - a:hover - { - text-decoration: underline; - } - -/*============================================================================= -Spirit style navigation -=============================================================================*/ - - .spirit-nav - { - text-align: right; - } - - .spirit-nav a - { - color: white; - padding-left: 0.5em; - } - - .spirit-nav img - { - border-width: 0px; - } - -/*============================================================================= -Copyright footer -=============================================================================*/ - .copyright-footer - { - text-align: right; - font-size: 70%; - } - - .copyright-footer p - { - text-align: right; - font-size: 80%; - } - -/*============================================================================= -Table of contents -=============================================================================*/ - - div.toc - { - margin: 1pc 4% 0pc 4%; - padding: 0.1pc 1pc 0.1pc 1pc; - font-size: 80%; - line-height: 1.15; - } - - .boost-toc - { - float: right; - padding: 0.5pc; - } - - /* Code on toc */ - .toc .computeroutput { font-size: 120% } - - /* No margin on nested menus */ - - .toc dl dl { margin: 0; } - -/*============================================================================= -Tables -=============================================================================*/ - - .table-title, - div.table p.title - { - margin-left: 4%; - padding-right: 0.5em; - padding-left: 0.5em; - } - - .informaltable table, - .table table - { - width: 92%; - margin-left: 4%; - margin-right: 4%; - } - - div.informaltable table, - div.table table - { - padding: 4px; - } - - /* Table Cells */ - div.informaltable table tr td, - div.table table tr td - { - padding: 0.5em; - text-align: left; - font-size: 9pt; - } - - div.informaltable table tr th, - div.table table tr th - { - padding: 0.5em 0.5em 0.5em 0.5em; - border: 1pt solid white; - font-size: 80%; - } - - table.simplelist - { - width: auto !important; - margin: 0em !important; - padding: 0em !important; - border: none !important; - } - table.simplelist td - { - margin: 0em !important; - padding: 0em !important; - text-align: left !important; - font-size: 9pt !important; - border: none !important; - } - -/*============================================================================= -Suppress margins in tables -=============================================================================*/ - - table th > *:first-child, - table td > *:first-child - { - margin-top: 0; - } - - table th > *:last-child, - table td > *:last-child - { - margin-bottom: 0; - } - -/*============================================================================= -Blurbs -=============================================================================*/ - - div.note, - div.tip, - div.important, - div.caution, - div.warning, - p.blurb - { - font-size: 9pt; /* A little bit smaller than the main text */ - line-height: 1.2; - display: block; - margin: 1pc 4% 0pc 4%; - padding: 0.5pc 0.5pc 0.5pc 0.5pc; - } - - p.blurb img - { - padding: 1pt; - } - -/*============================================================================= -Variable Lists -=============================================================================*/ - - div.variablelist - { - margin: 1em 0; - } - - /* Make the terms in definition lists bold */ - div.variablelist dl dt, - span.term - { - font-weight: bold; - font-size: 10pt; - } - - div.variablelist table tbody tr td - { - text-align: left; - vertical-align: top; - padding: 0em 2em 0em 0em; - font-size: 10pt; - margin: 0em 0em 0.5em 0em; - line-height: 1; - } - - div.variablelist dl dt - { - margin-bottom: 0.2em; - } - - div.variablelist dl dd - { - margin: 0em 0em 0.5em 2em; - font-size: 10pt; - } - - div.variablelist table tbody tr td p, - div.variablelist dl dd p - { - margin: 0em 0em 0.5em 0em; - line-height: 1; - } - -/*============================================================================= -Misc -=============================================================================*/ - - /* Title of books and articles in bibliographies */ - span.title - { - font-style: italic; - } - - span.underline - { - text-decoration: underline; - } - - span.strikethrough - { - text-decoration: line-through; - } - - /* Copyright, Legal Notice */ - div div.legalnotice p - { - text-align: left - } - -/*============================================================================= -Colors -=============================================================================*/ - - @media screen - { - body { - background-color: #FFFFFF; - color: #000000; - } - - /* Syntax Highlighting */ - .keyword { color: #0000AA; } - .identifier { color: #000000; } - .special { color: #707070; } - .preprocessor { color: #402080; } - .char { color: teal; } - .comment { color: #800000; } - .string { color: teal; } - .number { color: teal; } - .white_bkd { background-color: #FFFFFF; } - .dk_grey_bkd { background-color: #999999; } - - /* Links */ - a, a .keyword, a .identifier, a .special, a .preprocessor - a .char, a .comment, a .string, a .number - { - color: #005a9c; - } - - a:visited, a:visited .keyword, a:visited .identifier, - a:visited .special, a:visited .preprocessor a:visited .char, - a:visited .comment, a:visited .string, a:visited .number - { - color: #9c5a9c; - } - - h1 a, h2 a, h3 a, h4 a, h5 a, h6 a, - h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover, - h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited - { - text-decoration: none; /* no underline */ - color: #000000; - } - - /* Copyright, Legal Notice */ - .copyright - { - color: #666666; - font-size: small; - } - - div div.legalnotice p - { - color: #666666; - } - - /* Program listing */ - pre.synopsis - { - border: 1px solid #DCDCDC; - } - - .programlisting, - .screen - { - border: 1px solid #DCDCDC; - } - - td .programlisting, - td .screen - { - border: 0px solid #DCDCDC; - } - - /* Blurbs */ - div.note, - div.tip, - div.important, - div.caution, - div.warning, - p.blurb - { - border: 1px solid #DCDCDC; - } - - /* Table of contents */ - div.toc - { - border: 1px solid #DCDCDC; - } - - /* Tables */ - div.informaltable table tr td, - div.table table tr td - { - border: 1px solid #DCDCDC; - } - - div.informaltable table tr th, - div.table table tr th - { - background-color: #F0F0F0; - border: 1px solid #DCDCDC; - } - - .copyright-footer - { - color: #8F8F8F; - } - - /* Misc */ - span.highlight - { - color: #00A000; - } - } - - @media print - { - /* Links */ - a - { - color: black; - } - - a:visited - { - color: black; - } - - .spirit-nav - { - display: none; - } - - /* Program listing */ - pre.synopsis - { - border: 1px solid gray; - } - - .programlisting, - .screen - { - border: 1px solid gray; - } - - td .programlisting, - td .screen - { - border: 0px solid #DCDCDC; - } - - /* Table of contents */ - div.toc - { - border: 1px solid gray; - } - - .informaltable table, - .table table - { - border: 1px solid gray; - border-collapse: collapse; - } - - /* Tables */ - div.informaltable table tr td, - div.table table tr td - { - border: 1px solid gray; - } - - div.informaltable table tr th, - div.table table tr th - { - border: 1px solid gray; - } - - table.simplelist tr td - { - border: none !important; - } - - /* Misc */ - span.highlight - { - font-weight: bold; - } - } - -/*============================================================================= -Images -=============================================================================*/ - - span.inlinemediaobject img - { - vertical-align: middle; - } - -/*============================================================================== -Super and Subscript: style so that line spacing isn't effected, see -http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=1&postId=5341 -==============================================================================*/ - -sup, -sub { -height: 0; -line-height: 1; -vertical-align: baseline; -position: relative; - -} - -/* For internet explorer: */ - -* html sup, -* html sub { -vertical-align: bottom; -} - -sup { -bottom: 1ex; -} - -sub { -top: .5ex; -} - -/*============================================================================== -Indexes: pretty much the same as the TOC. -==============================================================================*/ - - .index - { - font-size: 80%; - padding-top: 0px; - padding-bottom: 0px; - margin-top: 0px; - margin-bottom: 0px; - margin-left: 0px; - } - - .index ul - { - padding-left: 3em; - } - - .index p - { - padding: 2px; - margin: 2px; - } - - .index-entry-level-0 - { - font-weight: bold; - } - - .index em - { - font-weight: bold; - } - - -/*============================================================================== -Alignment and coloring use 'role' feature, available from Quickbook 1.6 up. -Added from Niall Douglas for role color and alignment. -http://article.gmane.org/gmane.comp.lib.boost.devel/243318 -*/ - -/* Add text alignment (see http://www.w3schools.com/cssref/pr_text_text-align.asp) */ -span.aligncenter -{ - display: inline-block; width: 100%; text-align: center; -} -span.alignright -{ - display: inline-block; width: 100%; text-align: right; -} -/* alignleft is the default. */ -span.alignleft -{ - display: inline-block; width: 100%; text-align: left; -} - -/* alignjustify stretches the word spacing so that each line has equal width -within a chosen fraction of page width (here arbitrarily 20%). -*Not* useful inside table items as the column width remains the total string width. -Nor very useful, except to temporarily restrict the width. -*/ -span.alignjustify -{ - display: inline-block; width: 20%; text-align: justify; -} - -/* Text colors. -Names at http://www.w3.org/TR/2002/WD-css3-color-20020219/ 4.3. X11 color keywords. -Quickbook Usage: [role red Some red text] - -*/ -span.red { inline-block; color: red; } -span.green { color: green; } -span.lime { color: #00FF00; } -span.blue { color: blue; } -span.navy { color: navy; } -span.yellow { color: yellow; } -span.magenta { color: magenta; } -span.indigo { color: #4B0082; } -span.cyan { color: cyan; } -span.purple { color: purple; } -span.gold { color: gold; } -span.silver { color: silver; } /* lighter gray */ -span.gray { color: #808080; } /* light gray */ diff --git a/doc/html/images/alert.png b/doc/html/images/alert.png deleted file mode 100644 index b4645bc..0000000 Binary files a/doc/html/images/alert.png and /dev/null differ diff --git a/doc/html/images/blank.png b/doc/html/images/blank.png deleted file mode 100644 index 764bf4f..0000000 Binary files a/doc/html/images/blank.png and /dev/null differ diff --git a/doc/html/images/callouts/1.png b/doc/html/images/callouts/1.png deleted file mode 100644 index 6003ad3..0000000 Binary files a/doc/html/images/callouts/1.png and /dev/null differ diff --git a/doc/html/images/callouts/10.png b/doc/html/images/callouts/10.png deleted file mode 100644 index 0426f51..0000000 Binary files a/doc/html/images/callouts/10.png and /dev/null differ diff --git a/doc/html/images/callouts/11.png b/doc/html/images/callouts/11.png deleted file mode 100644 index 821afc4..0000000 Binary files a/doc/html/images/callouts/11.png and /dev/null differ diff --git a/doc/html/images/callouts/12.png b/doc/html/images/callouts/12.png deleted file mode 100644 index 7cec727..0000000 Binary files a/doc/html/images/callouts/12.png and /dev/null differ diff --git a/doc/html/images/callouts/13.png b/doc/html/images/callouts/13.png deleted file mode 100644 index 5b41e02..0000000 Binary files a/doc/html/images/callouts/13.png and /dev/null differ diff --git a/doc/html/images/callouts/14.png b/doc/html/images/callouts/14.png deleted file mode 100644 index de5bdbd..0000000 Binary files a/doc/html/images/callouts/14.png and /dev/null differ diff --git a/doc/html/images/callouts/15.png b/doc/html/images/callouts/15.png deleted file mode 100644 index 3fd6ac3..0000000 Binary files a/doc/html/images/callouts/15.png and /dev/null differ diff --git a/doc/html/images/callouts/2.png b/doc/html/images/callouts/2.png deleted file mode 100644 index f7c1578..0000000 Binary files a/doc/html/images/callouts/2.png and /dev/null differ diff --git a/doc/html/images/callouts/3.png b/doc/html/images/callouts/3.png deleted file mode 100644 index 3ff0a93..0000000 Binary files a/doc/html/images/callouts/3.png and /dev/null differ diff --git a/doc/html/images/callouts/4.png b/doc/html/images/callouts/4.png deleted file mode 100644 index 6aa29fc..0000000 Binary files a/doc/html/images/callouts/4.png and /dev/null differ diff --git a/doc/html/images/callouts/5.png b/doc/html/images/callouts/5.png deleted file mode 100644 index 36e7858..0000000 Binary files a/doc/html/images/callouts/5.png and /dev/null differ diff --git a/doc/html/images/callouts/6.png b/doc/html/images/callouts/6.png deleted file mode 100644 index c943676..0000000 Binary files a/doc/html/images/callouts/6.png and /dev/null differ diff --git a/doc/html/images/callouts/7.png b/doc/html/images/callouts/7.png deleted file mode 100644 index 20940de..0000000 Binary files a/doc/html/images/callouts/7.png and /dev/null differ diff --git a/doc/html/images/callouts/8.png b/doc/html/images/callouts/8.png deleted file mode 100644 index d8e34d4..0000000 Binary files a/doc/html/images/callouts/8.png and /dev/null differ diff --git a/doc/html/images/callouts/9.png b/doc/html/images/callouts/9.png deleted file mode 100644 index abe6360..0000000 Binary files a/doc/html/images/callouts/9.png and /dev/null differ diff --git a/doc/html/images/caution.png b/doc/html/images/caution.png deleted file mode 100644 index 5b7809c..0000000 Binary files a/doc/html/images/caution.png and /dev/null differ diff --git a/doc/html/images/draft.png b/doc/html/images/draft.png deleted file mode 100644 index 0084708..0000000 Binary files a/doc/html/images/draft.png and /dev/null differ diff --git a/doc/html/images/home.png b/doc/html/images/home.png deleted file mode 100644 index 5584aac..0000000 Binary files a/doc/html/images/home.png and /dev/null differ diff --git a/doc/html/images/important.png b/doc/html/images/important.png deleted file mode 100644 index 12c90f6..0000000 Binary files a/doc/html/images/important.png and /dev/null differ diff --git a/doc/html/images/next.png b/doc/html/images/next.png deleted file mode 100644 index 59800b4..0000000 Binary files a/doc/html/images/next.png and /dev/null differ diff --git a/doc/html/images/next_disabled.png b/doc/html/images/next_disabled.png deleted file mode 100644 index 10a8c59..0000000 Binary files a/doc/html/images/next_disabled.png and /dev/null differ diff --git a/doc/html/images/note.png b/doc/html/images/note.png deleted file mode 100644 index d0c3c64..0000000 Binary files a/doc/html/images/note.png and /dev/null differ diff --git a/doc/html/images/prev.png b/doc/html/images/prev.png deleted file mode 100644 index d88a40f..0000000 Binary files a/doc/html/images/prev.png and /dev/null differ diff --git a/doc/html/images/prev_disabled.png b/doc/html/images/prev_disabled.png deleted file mode 100644 index ab3c17e..0000000 Binary files a/doc/html/images/prev_disabled.png and /dev/null differ diff --git a/doc/html/images/smiley.png b/doc/html/images/smiley.png deleted file mode 100644 index 30a77f7..0000000 Binary files a/doc/html/images/smiley.png and /dev/null differ diff --git a/doc/html/images/tip.png b/doc/html/images/tip.png deleted file mode 100644 index 5c4aab3..0000000 Binary files a/doc/html/images/tip.png and /dev/null differ diff --git a/doc/html/images/toc-blank.png b/doc/html/images/toc-blank.png deleted file mode 100644 index 6ffad17..0000000 Binary files a/doc/html/images/toc-blank.png and /dev/null differ diff --git a/doc/html/images/toc-minus.png b/doc/html/images/toc-minus.png deleted file mode 100644 index abbb020..0000000 Binary files a/doc/html/images/toc-minus.png and /dev/null differ diff --git a/doc/html/images/toc-plus.png b/doc/html/images/toc-plus.png deleted file mode 100644 index 941312c..0000000 Binary files a/doc/html/images/toc-plus.png and /dev/null differ diff --git a/doc/html/images/up.png b/doc/html/images/up.png deleted file mode 100644 index 17d9c3e..0000000 Binary files a/doc/html/images/up.png and /dev/null differ diff --git a/doc/html/images/up_disabled.png b/doc/html/images/up_disabled.png deleted file mode 100644 index e22bc87..0000000 Binary files a/doc/html/images/up_disabled.png and /dev/null differ diff --git a/doc/html/images/warning.png b/doc/html/images/warning.png deleted file mode 100644 index 1c33db8..0000000 Binary files a/doc/html/images/warning.png and /dev/null differ diff --git a/doc/html/index.html b/doc/html/index.html deleted file mode 100644 index 74a1ab2..0000000 --- a/doc/html/index.html +++ /dev/null @@ -1,65 +0,0 @@ - -
- -Copyright © 2005, 2008-2016 Rene Rivera
Copyright © 2015 Charly Chevalier
Copyright © 2015 Joel Falcou
- Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -
-Table of Contents
- -Last revised: July 19, 2016 at 15:27:08 GMT |
-- |
- The comprehensiveness of this library would not be possible without the existence - of the indispensable resource that is the Pre-defined - C/C++ Compiler Macros Project. It was, and continues to be, the primary - source of the definitions that make up this library. Thanks to Bjorn Reese - and all the volunteers that make that resource possible. -
-- This library would be an incoherent mess if it weren't for Boost community - that provided invaluable feedback for the eight years that it took to polish - into a useable form. In particular I would like to thank: Mathias Gaunard, - Robert Stewart, Joël Lamotte, Lars Viklund, Nathan Ridge, Artyom Beilis, Joshua - Boyce, Gottlob Frege, Thomas Heller, Edward Diener, Dave Abrahams, Iain Denniston, - Dan Price, Ioannis Papadopoulos, and Robert Ramey. And thanks to Joel Falcou - for managing the review of this library. -
-- | - |
- We know that a library like this one will be an eternal work-in-progress. And - as such we expect, and look forward to, others contributing corrections and - additions to the predefs. With that in mind we need to keep a consistent way - of defining the new predefs. Hence all current, and future, predefs follow - the same structure and requirements. -
-- All predefs need to follow a set of requirements: -
-BOOST_VERSION_NUMBER_NOT_AVAILABLE
.
- BOOST_VERSION_NUMBER_AVAILABLE
- when the predef is detected.
- *_AVAILABLE
- macros as needed.
- *_EMULATED
macros to indicate that it
- was previously detected by another header and is being "emulated"
- by the system. Note that the *_AVAILABLE
macros must still be defined
- in this situation.
- - And there are some extra guidelines that predef headers should follow: -
-- For general consistency it's suggested that new predef headers follow the structure - below, as current predef headers do. First we have the copyright and license - statement, followed by the include guard: -
-/* -Copyright Jane Doe YYYY -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE_1_0.txt or copy at -http://www.boost.org/LICENSE_1_0.txt) -*/ - -#ifndef BOOST_PREDEF_category_tag_H -#define BOOST_PREDEF_category_tag_H --
- If the detection depends on the detection of another predef you should include - those headers here. -
-#include <boost/predef/CATEGORY_TAG/DEPENDENCY.h> --
- Depending on how you are defining the predef you will at minimum have to include
- the version_number.h
header. But you might also want to include
- the make.h
header for the version number decomposing
- utility macros:
-
#include <boost/predef/version_number.h> -#include <boost/predef/make.h> --
- The Predef library uses Quickbook for documentation and for the individual - predefs to appear in the reference section we add in-code documentation followed - by the zero-value default definition of the predef macro. We strongly recommend - this particular placement of the documentation and default definition because - some development environments automatically interpret this and provide in-line - help for the macro. In particular this works for the popular Eclipse IDE: -
-/*` -[heading `BOOST_category_tag`] - -Documentation about what is detected. -*/ - -#define BOOST_category_tag BOOST_VERSION_NUMBER_NOT_AVAILABLE --
- Next is the detection and definition of the particular predef. The structure
- for this is to do a single overall check (condition_a
)
- and place further version detection inside this. The first action inside the
- overall check is to "#undef
- BOOST_category_tag
" which undefines
- the zero-value default. The rest is up to the you how to do the checks for
- defining the version. But at minimum it must "#define
- BOOST_category_tag BOOST_VERSION_NUMBER_AVAILABLE
"
- as the fallback to minimally indicate that the predef was detected:
-
#if (condition_a) -# undef BOOST_category_tag -# if (condition_b) -# define BOOST_category_tag BOOST_VERSION_NUMBER(major,minor,patch) -# else -# define BOOST_category_tag BOOST_VERSION_NUMBER_AVAILABLE -# endif -#endif --
- We also need to provide the *_AVAILABLE
versions of the predef.
-
#if BOOST_category_tag -# define BOOST_category_tag_AVAILABLE -#endif --
- And for convenience we also want to provide a *_NAME
macro:
-
#define BOOST_catagory_tag_NAME "Name" --
- The testing of the predef macros is automated to generate checks for all the - defined predefs, whether detected or not. To do this we need to declare the - predef to the test system. This declaration is empty for regular use. And during - the test programs they expand out specially to create informational output: -
-#include <boost/predef/detail/test.h> -BOOST_PREDEF_DECLARE_TEST(BOOST_category_tag,BOOST_category_tag_NAME) --
- And, of course, we last need to close out the include guard: -
-#endif
-
-- For headers of predefs that need to be mutually exclusive in the detection - we need to add checks and definitions to detect when the predef is detected - by multiple headers. -
-
- Internally compiler, operating system, and platforms define BOOST_PREDEF_DETAIL_COMP_DETECTED
,
- BOOST_PREDEF_DEFAIL_OS_DETECTED
,
- and BOOST_PREDEF_DETAIL_PLAT_DETECTED
- respectively when the predef is first detected. This is used to guard against
- multiple definition of the detection in later included headers. In those cases
- the detection would instead be written as:
-
#if !BOOST_PREDEF_DETAIL_category_DETECTED && (condition_a) -# undef BOOST_category_tag -# if (condition_b) -# define BOOST_category_tag BOOST_VERSION_NUMBER(major,minor,patch) -# else -# define BOOST_category_tag BOOST_VERSION_NUMBER(0,0,1) -# endif -#endif --
- And we also include a header that defines the *_DETECTED
macro when we have the detection:
-
#if BOOST_category_tag -# define BOOST_category_tag_AVAILABLE -# include <boost/predef/detail/CATEGORY_detected.h> -#endif --
- Everything else about the header is the same as the basic detection header. -
-
- Because compilers are frequently emulated by other compilers we both want to
- have exclusive detection of the compiler and also provide information that
- we detected the emulation of the compiler. To accomplish this we define a local
- *_DETECTION
- macro for the compiler detection. And conditionally define either the base
- compiler predef BOOST_COMP_compiler
- or the alternate BOOST_COMP_compiler_EMULATED
- predef.
-
- The initial detection would look like: -
-#if (condition_a) -# if (condition_b) -# define BOOST_COMP_tag_DETECTION BOOST_VERSION_NUMBER(major,minor,patch) -# else -# define BOOST_COMP_tag_DETECTION BOOST_VERSION_NUMBER_AVAILABLE -# endif -#endif --
- And then we can conditionally define the base or emulated predefs: -
-#ifdef BOOST_COMP_tag_DETECTION -# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) -# define BOOST_COMP_tag_EMULATED BOOST_COMP_tag_DETECTION -# else -# undef BOOST_COMP_tag -# define BOOST_COMP_tag BOOST_COMP_tag_DETECTION -# endif -# define BOOST_category_tag_AVAILABLE -# include <boost/predef/detail/comp_detected.h> -#endif --
- By including: -
-#include <boost/predef/make.h> --
- One will get a set of utility macros to decompose common version macros as - defined by compilers. For example the EDG compiler uses a simple 3-digit version - macro (M,N,P). It can be decomposed and defined as: -
-#define BOOST_CCOMP_EDG BOOST_PREDEF_MAKE_N_N_N(__EDG_VERSION__) --
- The decomposition macros are split into three types: decimal decomposition, - hexadecimal decomposition, and date decomposition. They follow the format of - using "N" for decimal, "F" for hexadecimal, and "Y", - "M", "D" for dates. -
-- | - |
- The predef_check
utility provides
- a facility for building a program that will check a given set of expressions
- against the definitions it detected when it was built.
-
predef_check
- programs
-
- Even though there is only one predef_check
- program, there are variations for each of the languages that are detected by
- Predef to match the convention for sources files. For all of them one invokes
- with a list of expression arguments. The expressions are evaluated within the
- context of the particular predef_check
program and if they
- all are true zero (0) is returned. Otherwise the index of the first false expression
- is returned.
-
- The expression syntax is simple: -
-predef-definition [ relational-operator version-value ] --
- predef-definition
can be any of the Predef definitions.
- For example BOOST_COMP_GCC
.
-
- relational-operator
can be any of: >
,
- <
, >=
, <=
,
- ==
and !=
.
-
- version-number
can be a full or partial version
- triplet value. If it's a partial version triple it is completed with zeros.
- That is x.y
is equivalent to x.y.0
and
- x
is equivalent to x.0.0
.
-
- The relations-operator
and version-number
- can be ommited. In which case it is equivalent to:
-
predef-definition > 0.0.0 --
- You can use the predef_check
programs directly from Boost
- Build to configure target requirements. This is useful for controlling what
- gets built as part of your project based on the detailed version information
- available in Predef. The basic use is simple:
-
import path-to-predef-src/tools/check/predef - : check require - : predef-check predef-require ; - -exe my_windows_program : windows_source.cpp - : [ predef-require "BOOST_OS_WINDOWS" ] ; --
- That simple use case will skip building the my_windows_program
- unless one is building for Windows. Like the direct predef_check
- you can pass mutiple expressions using relational comparisons. For example:
-
import path-to-predef-src/tools/check/predef - : check require - : predef-check predef-require ; - -lib my_special_lib : source.cpp - : [ predef-require "BOOST_OS_WINDOWS != 0" "BOOST_OS_VMS != 0"] ; --
- And in that case the my_special_lib
is built only when the
- OS is not Windows or VMS. The requires
rule is a special
- case of the check
rule. And is defined in terms of it:
-
rule require ( expressions + : language ? ) -{ - return [ check $(expressions) : $(language) : : <build>no ] ; -} --
- The expression can also use explicit "and", "or" logical - operators to for more complex checks: -
-import path-to-predef-src/tools/check/predef - : check require - : predef-check predef-require ; - -lib my_special_lib : source.cpp - : [ predef-require "BOOST_OS_WINDOWS" or "BOOST_OS_VMS"] ; --
- You can use the check
rule for more control and to implement
- something other than control of what gets built. The definition for the check
- rule is:
-
rule check ( expressions + : language ? : true-properties * : false-properties * ) --
- When invoked as a reuirement of a Boost Build target this rule will add the
- true-properties
to the target if all the expressions
- evaluate to true. Otherwise the false-properties
get added
- as requirements. For example you could use it to enable or disable features
- in your programs:
-
import path-to-predef-src/tools/check/predef - : check require - : predef-check predef-require ; - -exe my_special_exe : source.cpp - : [ predef-check "BOOST_OS_WINDOWS == 0" - : : <define>ENABLE_WMF=0 - : <define>ENABLE_WMF=1 ] ; --
- For both check
and require
the language
- argument controls which variant of the predef_check
program
- is used to check the expressions. It defaults to "c++", but can be
- any of: "c", "cpp", "objc", and "objcpp".
-
- | - |
BOOST_HW_*
- category (from Charly Chevalier).
- AVAILABLE
- macros for Windows Platform. (from Vemund Handeland)
- predef_check
- functionality.
- and
and or
logical operators for predef_check
- expression on the Boost Build side.
- BOOST_ARCH_PARISC
to
- correctly spelled name (from Graham Hanson).
- MAKE_YYYYM
macros to
- correctly limit the month (from rick68).
- BOOST_PREDEF_MAKE_0X_VVRRPP
- macro (from Erik Lindahl).
- predef_check
program
- and BBv2 integration for build configuration checks.
- BOOST_PLAT_*
platform definitions for MinGW and Windows
- platform variants.
- ![]() |
-Warning | -
---|---|
- The big change for this version is the restructuring of the definitions to
- avoid duplicate definitions in one category. That is, only one |
- | - |
- This library defines a set of compiler, architecture, operating system, library, - and other version numbers from the information it can gather of C, C++, Objective - C, and Objective C++ predefined macros or those defined in generally available - headers. The idea for this library grew out of a proposal to extend the Boost - Config library to provide more, and consistent, information than the feature - definitions it supports. What follows is an edited version of that brief proposal. -
-- The idea is to define a set of macros to identify compilers and consistently - represent their version. This includes: -
-#if
/#elif
directives, for each of the supported
- compilers. All macros would be defined, regardless of the compiler. The
- one macro corresponding to the compiler being used would be defined, in
- terms of BOOST_VERSION_NUMBER, to carry the exact compiler version. All
- other macros would expand to an expression evaluating to false (for instance,
- the token 0) to indicate that the corresponding compiler is not present.
- - The current Predef library is now, both an independent library, and expanded - in scope. It includes detection and definition of architectures, compilers, - languages, libraries, operating systems, and endianness. The key benefits are: -
-#ifdef
.
- #ifdef
- checks.
- #include
- <boost/predef.h>
- so that it's friendly to precompiled header usage.
- #include
- <boost/predef/os/windows.h>
- for single checks.
-
- An important design choice concerns how to represent compiler versions by means
- of a single integer number suitable for use in preprocessing directives. Let's
- do some calculation. The "basic" signed type for preprocessing constant-expressions
- is long in C90 (and C++, as of 2006) and intmax_t in C99. The type long shall
- at least be able to represent the number +2 147 483 647
.
- This means the most significant digit can only be 0, 1 or 2; and if we want
- all decimal digits to be able to vary between 0 and 9, the largest range we
- can consider is [0, 999 999 999]
. Distributing evenly, this
- means 3 decimal digits for each version number part.
-
- So we can: -
-- It appears relatively safe to go for the first option and set it at 2/2/5. - That covers CodeWarrior and others, which are up to and past 10 for the major - number. Some compilers use the build number in lieu of the patch one; five - digits (which is already reached by VC++ 8) seems a reasonable limit even in - this case. -
-![]() |
-Note | -
---|---|
- A 2/2/6 scheme would allow for bigger patch/build numbers at the cost, for - instance, of limiting the major version number to 20 (or, with further constraints, - to 21). - |
- It might reassure the reader that this decision is actually encoded in one
- place in the code; the definition of BOOST_VERSION_NUMBER
.
-
- Even though the basics of this library are done, there is much work that can - be done: -
-BOOST_WORKAROUND
- macro would benefit from a more readable syntax. As would the BOOST_TESTED_AT
detail macro.
- - | - |
- | - |
BOOST_ARCH_ALPHA
- - DEC Alpha architecture. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - 4.0.0 - - |
-
-
- |
-
- - 5.0.0 - - |
-
-
- |
-
- - 6.0.0 - - |
-
BOOST_ARCH_ARM
- - ARM architecture. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - 8.0.0 - - |
-
-
- |
-
- - V.0.0 - - |
-
-
- |
-
- - V.0.0 - - |
-
-
- |
-
- - V.0.0 - - |
-
BOOST_ARCH_BLACKFIN
- - Blackfin Processors from Analog Devices. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_ARCH_CONVEX
- - Convex Computer - architecture. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - 1.0.0 - - |
-
-
- |
-
- - 2.0.0 - - |
-
-
- |
-
- - 3.2.0 - - |
-
-
- |
-
- - 3.4.0 - - |
-
-
- |
-
- - 3.8.0 - - |
-
BOOST_ARCH_IA64
- - Intel Itanium 64 architecture. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_ARCH_M68K
- - Motorola 68k architecture. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - 6.0.0 - - |
-
-
- |
-
- - 6.0.0 - - |
-
-
- |
-
- - 6.0.0 - - |
-
-
- |
-
- - 4.0.0 - - |
-
-
- |
-
- - 4.0.0 - - |
-
-
- |
-
- - 4.0.0 - - |
-
-
- |
-
- - 3.0.0 - - |
-
-
- |
-
- - 3.0.0 - - |
-
-
- |
-
- - 3.0.0 - - |
-
-
- |
-
- - 2.0.0 - - |
-
-
- |
-
- - 2.0.0 - - |
-
-
- |
-
- - 2.0.0 - - |
-
-
- |
-
- - 1.0.0 - - |
-
-
- |
-
- - 1.0.0 - - |
-
-
- |
-
- - 1.0.0 - - |
-
-
- |
-
- - 0.0.1 - - |
-
-
- |
-
- - 0.0.1 - - |
-
-
- |
-
- - 0.0.1 - - |
-
BOOST_ARCH_MIPS
- - MIPS - architecture. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.0.0 - - |
-
-
- |
-
- - 1.0.0 - - |
-
-
- |
-
- - 1.0.0 - - |
-
-
- |
-
- - 2.0.0 - - |
-
-
- |
-
- - 2.0.0 - - |
-
-
- |
-
- - 2.0.0 - - |
-
-
- |
-
- - 3.0.0 - - |
-
-
- |
-
- - 3.0.0 - - |
-
-
- |
-
- - 4.0.0 - - |
-
-
- |
-
- - 4.0.0 - - |
-
BOOST_ARCH_PARISK
- - HP/PA RISC - architecture. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - 1.0.0 - - |
-
-
- |
-
- - 1.1.0 - - |
-
-
- |
-
- - 1.1.0 - - |
-
-
- |
-
- - 1.1.0 - - |
-
-
- |
-
- - 2.0.0 - - |
-
-
- |
-
- - 2.0.0 - - |
-
-
- |
-
- - 2.0.0 - - |
-
-
- |
-
- - 2.0.0 - - |
-
BOOST_ARCH_PPC
- - PowerPC architecture. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - 6.1.0 - - |
-
-
- |
-
- - 6.1.0 - - |
-
-
- |
-
- - 6.3.0 - - |
-
-
- |
-
- - 6.3.0 - - |
-
-
- |
-
- - 6.4.0 - - |
-
-
- |
-
- - 6.4.0 - - |
-
BOOST_ARCH_PYRAMID
- - Pyramid 9810 architecture. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
BOOST_ARCH_RS6000
- - RS/6000 architecture. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_ARCH_SPARC
- - SPARC architecture. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - 9.0.0 - - |
-
-
- |
-
- - 8.0.0 - - |
-
BOOST_ARCH_SH
- - SuperH architecture: - If available versions [1-5] are specifically detected. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - 5.0.0 - - |
-
-
- |
-
- - 4.0.0 - - |
-
-
- |
-
- - 3.0.0 - - |
-
-
- |
-
- - 3.0.0 - - |
-
-
- |
-
- - 2.0.0 - - |
-
-
- |
-
- - 1.0.0 - - |
-
BOOST_ARCH_SYS370
- - System/370 architecture. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_ARCH_SYS390
- - System/390 architecture. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_ARCH_X86
-
- Intel x86 architecture.
- This is a category to indicate that either BOOST_ARCH_X86_32
- or BOOST_ARCH_X86_64
is detected.
-
BOOST_ARCH_Z
- - z/Architecture - architecture. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
BOOST_ARCH_X86_32
- - Intel x86 architecture: - If available versions [3-6] are specifically detected. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.0.0 - - |
-
-
- |
-
- - V.0.0 - - |
-
-
- |
-
- - 6.0.0 - - |
-
-
- |
-
- - 5.0.0 - - |
-
-
- |
-
- - 4.0.0 - - |
-
-
- |
-
- - 3.0.0 - - |
-
BOOST_ARCH_X86_64
- - Intel IA-64 architecture. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
- | - |
BOOST_COMP_BORLAND
- - Borland C++ - compiler. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_CLANG
- - Clang compiler. Version - number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_COMO
- - Comeau C++ - compiler. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_DEC
- - Compaq - C/C++ compiler. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_DIAB
- - Diab - C/C++ compiler. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_DMC
- - Digital Mars - compiler. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_SYSC
- - Dignus Systems/C++ compiler. - Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_EDG
- - EDG C++ Frontend - compiler. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.0 - - |
-
BOOST_COMP_PATH
- - EKOpath compiler. - Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_GNUC
- - Gnu GCC - C/C++ compiler. Version number available as major, minor, and patch - (if available). -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - V.R.0 - - |
-
BOOST_COMP_GCCXML
- - GCC XML compiler. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
BOOST_COMP_GHS
- - Green Hills - C/C++ compiler. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_HPACC
- - HP aC++ compiler. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_IAR
- - IAR C/C++ compiler. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_IBM
- - IBM XL C/C++ - compiler. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_INTEL
- - Intel C/C++ - compiler. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_KCC
- - Kai C++ compiler. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_LLVM
- - LLVM compiler. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
BOOST_COMP_HIGHC
- - MetaWare High C/C++ compiler. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
BOOST_COMP_MWERKS
- - Metrowerks CodeWarrior - compiler. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - V.R.P >= 4.2.0 - - |
-
-
- |
-
- - 9.R.0 - - |
-
-
- |
-
- - 8.R.0 - - |
-
BOOST_COMP_MRI
- - Microtec C/C++ compiler. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
BOOST_COMP_MPW
- - MPW - C++ compiler. Version number available as major, and minor. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.0 - - |
-
BOOST_COMP_PALM
- - Palm C/C++ compiler. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_PGI
- - Portland Group - C/C++ compiler. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_SGI
- - SGI MIPSpro compiler. - Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_COMP_SUNPRO
- - Oracle Solaris - Studio compiler. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - VV.RR.P - - |
-
-
- |
-
- - VV.RR.P - - |
-
BOOST_COMP_TENDRA
- - TenDRA C/C++ - compiler. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
BOOST_COMP_MSVC
- - Microsoft Visual - C/C++ compiler. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - V.R.0 - - |
-
BOOST_COMP_WATCOM
- - Watcom C++ compiler. - Version number available as major, and minor. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
- | - |
- SIMD predefs depend on compiler options. For example, you will have to
- add the option -msse3
- to clang or gcc to enable SSE3. SIMD predefs are also inclusive. This means
- that if SSE3 is enabled, then every other extensions with a lower version
- number will implicitly be enabled and detected. However, some extensions
- are CPU specific, they may not be detected nor enabled when an upper version
- is enabled.
-
![]() |
-Note | -
---|---|
- SSE(1) and SSE2 are automatically enabled by default when using x86-64 - architecture. - |
- To check if any SIMD extension has been enabled, you can use: -
-#include <boost/predef/hardware/simd.h> -#include <iostream> - -int main() -{ -#if defined(BOOST_HW_SIMD_AVAILABLE) - std::cout << "SIMD detected!" << std::endl; -#endif - return 0; -} --
- When writing SIMD specific code, you may want to check if a particular
- extension has been detected. To do so you have to use the right architecture
- predef and compare it. Those predef are of the form BOOST_HW_SIMD_"ARCH"
(where "ARCH"
- is either ARM
, PPC
, or X86
).
- For example, if you compile code for x86 architecture, you will have to
- use BOOST_HW_SIMD_X86
.
- Its value will be the version number of the most recent SIMD extension
- detected for the architecture.
-
- To check if an extension has been enabled: -
-#include <boost/predef/hardware/simd.h> -#include <iostream> - -int main() -{ -#if BOOST_HW_SIMD_X86 >= BOOST_HW_SIMD_X86_SSE3_VERSION - std::cout << "This is SSE3!" << std::endl; -#endif - return 0; -} --
![]() |
-Note | -
---|---|
- The _VERSION defines that map version - number to actual real identifiers. This way it is easier to write comparisons - without messing up with version numbers. - |
- To "stricly" check the most - recent detected extension: -
-#include <boost/predef/hardware/simd.h> -#include <iostream> - -int main() -{ -#if BOOST_HW_SIMD_X86 == BOOST_HW_SIMD_X86_SSE3_VERSION - std::cout << "This is SSE3 and this is the most recent enabled extension!" - << std::endl; -#endif - return 0; -} --
- Because of the version systems of predefs and of the inclusive property - of SIMD extensions macros, you can easily check for ranges of supported - extensions: -
-#include <boost/predef/hardware/simd.h> -#include <iostream> - -int main() -{ -#if BOOST_HW_SIMD_X86 >= BOOST_HW_SIMD_X86_SSE2_VERSION &&\ - BOOST_HW_SIMD_X86 <= BOOST_HW_SIMD_X86_SSSE3_VERSION - std::cout << "This is SSE2, SSE3 and SSSE3!" << std::endl; -#endif - return 0; -} --
![]() |
-Note | -
---|---|
- Unlike gcc and clang, Visual Studio does not allow you to specify precisely - the SSE variants you want to use, the only detections that will take - place are SSE, SSE2, AVX and AVX2. For more informations, see here. - |
BOOST_HW_SIMD
- - The SIMD extension detected for a specific architectures. Version number - depends on the detected extension. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_HW_SIMD_X86
- - The SIMD extension for x86 (if detected). - Version number depends on the most recent detected extension. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - BOOST_HW_SIMD_X86_SSE_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_X86_SSE_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_X86_SSE_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_X86_SSE2_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_X86_SSE2_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_X86_SSE2_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_X86_SSE3_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_X86_SSSE3_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_X86_SSE4_1_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_X86_SSE4_2_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_X86_AVX_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_X86_FMA3_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_X86_AVX2_VERSION - - |
-
BOOST_HW_SIMD_X86_AMD
- - The SIMD extension for x86 (AMD) (if detected). - Version number depends on the most recent detected extension. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - BOOST_HW_SIMD_X86_SSE4A_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_X86_FMA4_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_X86_XOP_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_X86 - - |
-
![]() |
-Note | -
---|---|
- This predef includes every other x86 SIMD extensions and also has other
- more specific extensions (FMA4, XOP, SSE4a). You should use this predef
- instead of |
BOOST_HW_SIMD_ARM
- - The SIMD extension for ARM (if detected). - Version number depends on the most recent detected extension. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - BOOST_HW_SIMD_ARM_NEON_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_ARM_NEON_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_ARM_NEON_VERSION - - |
-
BOOST_HW_SIMD_PPC
- - The SIMD extension for PowerPC (if detected). - Version number depends on the most recent detected extension. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - BOOST_HW_SIMD_PPC_QPX_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_PPC_VMX_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_PPC_VMX_VERSION - - |
-
-
- |
-
- - BOOST_HW_SIMD_PPC_VSX_VERSION - - |
-
- Those defines represent x86 SIMD extensions versions. -
-![]() |
-Note | -
---|---|
- You MUST compare them with the predef
- |
BOOST_HW_SIMD_X86_MMX_VERSION
- - The MMX - x86 extension version number. -
-- Version number is: 0.99.0. -
-BOOST_HW_SIMD_X86_SSE_VERSION
- - The SSE - x86 extension version number. -
-- Version number is: 1.0.0. -
-BOOST_HW_SIMD_X86_SSE2_VERSION
- - The SSE2 x86 extension - version number. -
-- Version number is: 2.0.0. -
-BOOST_HW_SIMD_X86_SSE3_VERSION
- - The SSE3 x86 extension - version number. -
-- Version number is: 3.0.0. -
-BOOST_HW_SIMD_X86_SSSE3_VERSION
- - The SSSE3 x86 - extension version number. -
-- Version number is: 3.1.0. -
-BOOST_HW_SIMD_X86_SSE4_1_VERSION
- - The SSE4_1 - x86 extension version number. -
-- Version number is: 4.1.0. -
-BOOST_HW_SIMD_X86_SSE4_2_VERSION
- - The SSE4_2 - x86 extension version number. -
-- Version number is: 4.2.0. -
-BOOST_HW_SIMD_X86_AVX_VERSION
- - The AVX - x86 extension version number. -
-- Version number is: 5.0.0. -
-BOOST_HW_SIMD_X86_FMA3_VERSION
- - The FMA3 - x86 extension version number. -
-- Version number is: 5.2.0. -
-BOOST_HW_SIMD_X86_AVX2_VERSION
- - The AVX2 - x86 extension version number. -
-- Version number is: 5.3.0. -
-BOOST_HW_SIMD_X86_MIC_VERSION
- - The MIC (Xeon - Phi) x86 extension version number. -
-- Version number is: 9.0.0. -
-- Those defines represent x86 (AMD specific) SIMD extensions versions. -
-![]() |
-Note | -
---|---|
- You MUST compare them with the predef
- |
BOOST_HW_SIMD_X86_AMD_SSE4A_VERSION
- - SSE4A x86 - extension (AMD specific). -
-- Version number is: 4.0.0. -
-BOOST_HW_SIMD_X86_AMD_FMA4_VERSION
- - FMA4 - x86 extension (AMD specific). -
-- Version number is: 5.1.0. -
-BOOST_HW_SIMD_X86_AMD_XOP_VERSION
- - XOP - x86 extension (AMD specific). -
-- Version number is: 5.1.1. -
-- Those defines represent ARM SIMD extensions versions. -
-![]() |
-Note | -
---|---|
- You MUST compare them with the predef
- |
BOOST_HW_SIMD_ARM_NEON_VERSION
- - The NEON - ARM extension version number. -
-- Version number is: 1.0.0. -
-- Those defines represent Power PC SIMD extensions versions. -
-![]() |
-Note | -
---|---|
- You MUST compare them with the predef
- |
BOOST_HW_SIMD_PPC_VMX_VERSION
- - The VMX - powerpc extension version number. -
-- Version number is: 1.0.0. -
-BOOST_HW_SIMD_PPC_VSX_VERSION
- - The VSX - powerpc extension version number. -
-- Version number is: 1.1.0. -
-BOOST_HW_SIMD_PPC_QPX_VERSION
- - The QPX powerpc extension version number. -
-- Version number is: 2.0.0. -
-- | - |
BOOST_LANG_OBJC
- - Objective-C - language. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
BOOST_LANG_STDC
- - Standard - C language. If available, the year of the standard is detected as - YYYY.MM.1 from the Epoc date. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_LANG_STDCPP
- - Standard C++ language. - If available, the year of the standard is detected as YYYY.MM.1 from the - Epoc date. Because of the way the C++ standardization process works the defined - version year will not be the commonly known year of the standard. Specifically - the defined versions are: -
-Table 1. Detected Version Number vs. C++ Standard Year
-
- - Detected Version Number - - |
-
- - Standard Year - - |
-
- - C++ Standard - - |
-
---|---|---|
- - 27.11.1 - - |
-
- - 1998 - - |
-
- - ISO/IEC 14882:1998 - - |
-
- - 41.12.1 - - |
-
- - 2011 - - |
-
- - ISO/IEC 14882:2011 - - |
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - YYYY.MM.1 - - |
-
BOOST_LANG_STDCPPCLI
- - Standard C++/CLI - language. If available, the year of the standard is detected as YYYY.MM.1 - from the Epoc date. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - YYYY.MM.1 - - |
-
BOOST_LANG_STDECPP
- - Standard Embedded - C++ language. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
- | - |
BOOST_LIB_C_GNU
- - GNU glibc Standard - C library. Version number available as major, and minor. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.0 - - |
-
-
- |
-
- - V.R.0 - - |
-
BOOST_LIB_C_UC
- - uClibc Standard - C library. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_LIB_C_VMS
- - VMS libc Standard C library. Version number available as major, minor, and - patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_LIB_C_ZOS
- - z/OS libc Standard C library. Version number available as major, minor, and - patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_LIB_STD_CXX
- - libc++ C++ Standard Library. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.0.P - - |
-
BOOST_LIB_STD_DINKUMWARE
- - Dinkumware Standard - C++ Library. If available version number as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.0 - - |
-
BOOST_LIB_STD_COMO
- - Comeau Computing - Standard C++ Library. Version number available as major. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.0.0 - - |
-
BOOST_LIB_STD_MSIPL
- - Modena Software Lib++ Standard C++ - Library. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_LIB_STD_MSL
- - Metrowerks Standard C++ Library. - Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_LIB_STD_RW
- - Roguewave Standard C++ library. - If available version number as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_LIB_STD_SGI
- - SGI Standard C++ library. - If available version number as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_LIB_STD_GNU
- - GNU libstdc++ Standard - C++ library. Version number available as year (from 1970), month, and day. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_LIB_STD_STLPORT
- - STLport Standard C++ - library. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_LIB_STD_IBM
- - IBM VACPP Standard - C++ library. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
- | - |
BOOST_OS_AIX
- - IBM AIX - operating system. Version number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - 4.3.0 - - |
-
-
- |
-
- - 4.1.0 - - |
-
-
- |
-
- - 3.2.0 - - |
-
-
- |
-
- - 3.0.0 - - |
-
BOOST_OS_AMIGAOS
- - AmigaOS operating - system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_OS_ANDROID
- - Android - operating system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
BOOST_OS_BEOS
- - BeOS operating system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
BOOST_OS_BSD
- - BSD - operating system. -
-- BSD has various branch operating systems possible and each detected individually. - This detects the following variations and sets a specific version number - macro to match: -
-BOOST_OS_BSD_DRAGONFLY
- DragonFly BSD
- BOOST_OS_BSD_FREE
FreeBSD
- BOOST_OS_BSD_BSDI
BSDi BSD/OS
- BOOST_OS_BSD_NET
NetBSD
- BOOST_OS_BSD_OPEN
OpenBSD
- ![]() |
-Note | -
---|---|
- The general |
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - 4.2.0 - - |
-
-
- |
-
- - 4.3.0 - - |
-
-
- |
-
- - 4.4.0 - - |
-
-
- |
-
- - V.R.0 - - |
-
BOOST_OS_CYGWIN
- - Cygwin evironment. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
BOOST_OS_HAIKU
- - Haiku - operating system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
BOOST_OS_HPUX
- - HP-UX operating system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_OS_IOS
- - iOS operating system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__*1000 - - |
-
BOOST_OS_IRIX
- - IRIX operating system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_OS_LINUX
- - Linux operating system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_OS_MACOS
- - Mac OS operating - system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - 10.0.0 - - |
-
- - otherwise - - |
-
- - 9.0.0 - - |
-
BOOST_OS_OS400
- - IBM OS/400 operating - system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
BOOST_OS_QNX
- - QNX operating system. - Version number available as major, and minor if possible. And version 4 is - specifically detected. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.0 - - |
-
-
- |
-
- - 4.0.0 - - |
-
BOOST_OS_SOLARIS
- - Solaris - operating system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_OS_UNIX
- - Unix Environment operating - system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_OS_SVR4
- - SVR4 Environment - operating system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_OS_VMS
- - VMS operating system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_OS_WINDOWS
- - Microsoft - Windows operating system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_OS_BSD_BSDI
- - BSDi BSD/OS operating - system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
BOOST_OS_BSD_DRAGONFLY
- - DragonFly BSD - operating system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
BOOST_OS_BSD_FREE
- - FreeBSD operating - system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_OS_BSD_NET
- - NetBSD operating - system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.P - - |
-
-
- |
-
- - 0.8.0 - - |
-
-
- |
-
- - 0.9.0 - - |
-
-
- |
-
- - 1.0.0 - - |
-
-
- |
-
- - V.R.P - - |
-
BOOST_OS_BSD_OPEN
- - OpenBSD operating - system. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - 2.0.0 - - |
-
-
- |
-
- - 2.1.0 - - |
-
-
- |
-
- - 2.2.0 - - |
-
-
- |
-
- - 2.3.0 - - |
-
-
- |
-
- - 2.4.0 - - |
-
-
- |
-
- - 2.5.0 - - |
-
-
- |
-
- - 2.6.0 - - |
-
-
- |
-
- - 2.7.0 - - |
-
-
- |
-
- - 2.8.0 - - |
-
-
- |
-
- - 2.9.0 - - |
-
-
- |
-
- - 3.0.0 - - |
-
-
- |
-
- - 3.1.0 - - |
-
-
- |
-
- - 3.2.0 - - |
-
-
- |
-
- - 3.3.0 - - |
-
-
- |
-
- - 3.4.0 - - |
-
-
- |
-
- - 3.5.0 - - |
-
-
- |
-
- - 3.6.0 - - |
-
-
- |
-
- - 3.7.0 - - |
-
-
- |
-
- - 3.8.0 - - |
-
-
- |
-
- - 3.9.0 - - |
-
-
- |
-
- - 4.0.0 - - |
-
-
- |
-
- - 4.1.0 - - |
-
-
- |
-
- - 4.2.0 - - |
-
-
- |
-
- - 4.3.0 - - |
-
-
- |
-
- - 4.4.0 - - |
-
-
- |
-
- - 4.5.0 - - |
-
-
- |
-
- - 4.6.0 - - |
-
-
- |
-
- - 4.7.0 - - |
-
-
- |
-
- - 4.8.0 - - |
-
-
- |
-
- - 4.9.0 - - |
-
- | - |
BOOST_PLAT_MINGW
- - MinGW platform. Version - number available as major, minor, and patch. -
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
-
- |
-
- - V.R.0 - - |
-
-
- |
-
- - V.R.0 - - |
-
BOOST_PLAT_WINDOWS_DESKTOP
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_PLAT_WINDOWS_PHONE
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
BOOST_PLAT_WINDOWS_RUNTIME
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
-
- |
-
- - detection - - |
-
BOOST_PLAT_WINDOWS_STORE
-
- - Symbol - - |
-
- - Version - - |
-
---|---|
-
- |
-
- - detection - - |
-
- | - |
BOOST_ENDIAN_*
- - Detection of endian memory ordering. There are four defined macros in this - header that define the various generally possible endian memory orderings: -
-BOOST_ENDIAN_BIG_BYTE
,
- byte-swapped big-endian.
- BOOST_ENDIAN_BIG_WORD
,
- word-swapped big-endian.
- BOOST_ENDIAN_LITTLE_BYTE
,
- byte-swapped little-endian.
- BOOST_ENDIAN_LITTLE_WORD
,
- word-swapped little-endian.
- - The detection is conservative in that it only identifies endianness that - it knows for certain. In particular bi-endianness is not indicated as is - it not practically possible to determine the endianness from anything but - an operating system provided header. And the currently known headers do not - define that programatic bi-endianness is available. -
-- This implementation is a compilation of various publicly available information - and acquired knowledge: -
-- | - |
BOOST_VERSION_NUMBER
- BOOST_VERSION_NUMBER(major,minor,patch) --
- Defines standard version numbers, with these properties: -
-major
number can
- be in the [0,99] range.
- minor
number can
- be in the [0,99] range.
- patch
number can
- be in the [0,99999] range.
- BOOST_PREDEF_MAKE_..
- macros
- - These set of macros decompose common vendor version number macros which are - composed version, revision, and patch digits. The naming convention indicates: -
-BOOST_PREDEF_MAKE_0X
"
- for hexadecimal digits, and "BOOST_PREDEF_MAKE_10
"
- for decimal digits.
- V
"
- indicates the version digits, "R
"
- indicates the revision digits, "P
"
- indicates the patch digits, and "0
"
- indicates an ignored digit.
- - Macros are: -
-
- BOOST_PREDEF_MAKE_0X_VRP(V)
-
- BOOST_PREDEF_MAKE_0X_VVRP(V)
-
- BOOST_PREDEF_MAKE_0X_VRPP(V)
-
- BOOST_PREDEF_MAKE_0X_VVRR(V)
-
- BOOST_PREDEF_MAKE_0X_VRRPPPP(V)
-
- BOOST_PREDEF_MAKE_0X_VVRRP(V)
-
- BOOST_PREDEF_MAKE_0X_VRRPP000(V)
-
- BOOST_PREDEF_MAKE_0X_VVRRPP(V)
-
- BOOST_PREDEF_MAKE_10_VPPP(V)
-
- BOOST_PREDEF_MAKE_10_VRP(V)
-
- BOOST_PREDEF_MAKE_10_VRP000(V)
-
- BOOST_PREDEF_MAKE_10_VRPP(V)
-
- BOOST_PREDEF_MAKE_10_VRR(V)
-
- BOOST_PREDEF_MAKE_10_VRRPP(V)
-
- BOOST_PREDEF_MAKE_10_VRR000(V)
-
- BOOST_PREDEF_MAKE_10_VV00(V)
-
- BOOST_PREDEF_MAKE_10_VVRR(V)
-
- BOOST_PREDEF_MAKE_10_VVRRPP(V)
-
- BOOST_PREDEF_MAKE_10_VVRR0PP00(V)
-
- BOOST_PREDEF_MAKE_10_VVRR0PPPP(V)
-
- BOOST_PREDEF_MAKE_10_VVRR00PP00(V)
-
BOOST_PREDEF_MAKE_*..
- date macros
- - Date decomposition macros return a date in the relative to the 1970 Epoch - date. If the month is not available, January 1st is used as the month and - day. If the day is not available, but the month is, the 1st of the month - is used as the day. -
-
- BOOST_PREDEF_MAKE_DATE(Y,M,D)
-
- BOOST_PREDEF_MAKE_YYYYMMDD(V)
-
- BOOST_PREDEF_MAKE_YYYY(V)
-
- BOOST_PREDEF_MAKE_YYYYMM(V)
-
- | - |
- | - |
- To use the automatically defined predefs one needs to only include the single - top-level header: -
-#include <boost/predef.h> --
- This defines all the version macros known - to the library. For each macro it will be defined to either a zero - valued expression for when the particular item is not detected, and to a positive - value if it is detected. The predef macros fall onto five categories each with - macros of a particular prefix: -
-BOOST_ARCH_
for system/CPU
- architecture one is compiling for.
- BOOST_COMP_
for the compiler
- one is using.
- BOOST_LANG_
for language
- standards one is compiling against.
- BOOST_LIB_C_
and BOOST_LIB_STD_
for the C and C++ standard
- library in use.
- BOOST_OS_
for the operating
- system we are compiling to.
- BOOST_PLAT_
for platforms
- on top of operating system or compilers.
- BOOST_ENDIAN_
for endianness
- of the os and architecture combination.
- BOOST_HW_
for hardware
- specific features.
- BOOST_HW_SIMD
for SIMD
- (Single Instruction Multiple Data) detection.
- ![]() |
-Note | -
---|---|
- The detected definitions are for the configuration one is targeting during - the compile. In particular in a cross-compile this means the target system, - and not the host system. - |
- One uses the individual definitions to compare against specific versions by
- comparing against the BOOST_VERSION_NUMBER
- macro. For example, to make a choice based on the version of the GCC C++ compiler
- one would:
-
#include <boost/predef.h> -#include <iostream> - -int main() -{ - if (BOOST_COMP_GNUC >= BOOST_VERSION_NUMBER(4,0,0)) - std::cout << "GCC compiler is at least version 4.0.0" << std::endl; - else - std::cout << "GCC compiler is at older than version 4.0.0, or not a GCC compiler" << std::endl; - return 0; -} --
- As you might notice above the else
- clause also covers the case where the particular compiler is not detected.
- But one can make the test also test for the detection. All predef definitions
- are defined as a zero (0) expression when not detected. Hence one could use
- the detection with a natural single condition. For example:
-
#include <boost/predef.h> -#include <iostream> - -int main() -{ - if (BOOST_COMP_GNUC) - std::cout << "This is GNU GCC!" << std::endl; - else - std::cout << "Not GNU GCC." << std::endl; - return 0; -} --
- And since the predef's are preprocessor definitions the same is possible from - the preprocessor: -
-#include <boost/predef.h> -#include <iostream> - -#if BOOST_COMP_GNUC - #if BOOST_COMP_GNUC >= BOOST_VERSION_NUMBER(4,0,0) - const char * the_compiler = "GNU GCC, of at least version 4." - #else - const char * the_compiler = "GNU GCC, less than version 4." - #endif -#else - const char * the_compiler = "Not GNU GCC." -#endif - -int main() -{ - std::cout << the_compiler << std::endl; - return 0; -} --
- In addition, for each version macro defined there is an *_AVAILABLE
macro defined only when the particular
- aspect is detected. I.e. a definition equivalent to:
-
#if BOOST_PREDEF_ABC - #define BOOST_PREDEF_ABC_AVAILABLE -#endif --
- Also for each aspect there is a macro defined with a descriptive name of what - the detection is. -
-*_EMULATED
- macros
-
- Predef definitions are guaranteed to be uniquely detected within one category.
- But there are contexts under which multiple underlying detections are possible.
- The well known example of this is detection of GCC and MSVC compilers which
- are commonly emulated by other compilers by defining the same base macros.
- To account for this detection headers are allowed to define *_EMULATED
predefs when this situation is
- detected. The emulated predefs will be set to the version number of the detection
- instead of the regular predef macro for that detection. For example MSVC will
- set BOOST_COMP_MSVC_EMULATED
- but not set BOOST_COM_MSVC
,
- and it will also set BOOST_COMP_MSVC_AVAILABLE
.
-
BOOST_VERSION_NUMBER
macro
-
- All the predefs are defined to be a use of the BOOST_VERSION_NUMBER
- macro. The macro takes individual major, minor, and patch value expressions:
-
#define BOOST_VERSION_NUMBER( major, minor, patch ) ... --
- The arguments are: -
-- The ranges for each are "enforced" by the use of a modulo ("%"), - i.e. truncation, as opposed to a clamp. And hence this means that the limits - are enforced only enough to keep from having out-of-range problems. But not - enough to prevent other kinds of problems. Like exceeding the range and getting - false detections, or non-detections. It is up to the individual predefs to - ensure correct usage beyond the range guarantee. -
-
- The values for the arguments can be any preprocessor valid constant value expression.
- Only constant value arithmetic is used in the definition of the BOOST_VERSION_NUMBER
macro and in any of
- the other predef macros. This means that any allowed base is possible, i.e.
- binary, octal, decimal, and hexadecimal. For example:
-
#define MY_APPLICATION_VERSION_NUMBER BOOST_VERSION_NUMBER(2,0xA,015) --
- Is equivalent to: -
-#define MY_APPLICATION_VERSION_NUMBER BOOST_VERSION_NUMBER(2,10,13) --
- | - |
Copyright Rene Rivera 2013-2014
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at