diff --git a/.gitignore b/.gitignore index 5e56e04..7553496 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /bin +/boost-build.jam diff --git a/doc/build.jam b/doc/build.jam index 937bc2b..3965a08 100644 --- a/doc/build.jam +++ b/doc/build.jam @@ -1,9 +1,10 @@ -# Copyright Redshift Software, Inc. 2011 +# Copyright Rene Rivera 2011 # 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) using quickbook ; +using boostbook ; import path ; if ! $(BOOST_ROOT) diff --git a/doc/history.qbk b/doc/history.qbk new file mode 100644 index 0000000..b2fb81e --- /dev/null +++ b/doc/history.qbk @@ -0,0 +1,27 @@ +[/ +Copyright 2014 Rene Rivera +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) +] + +[section History] + +[heading 1.1] + +* Addition of `BOOST_PLAT_*` platform definitions for MinGW and + Windows platform variants. +* Detection of ARM architecture for Windows compilers to target + mobile devices of WIndows 8. +* Improved ARM detection for 64 bit ARM. +* Added detection of iOS an an operating system. +* Improved detection of endianess on some platforms. +* Addition of exclusive plus emulated definitions for platform + and compiler detection. + +[warning The big change for this version is the restructuring of the +definitions to avoid duplicate definitions in one category. That is, only one +`BOOST_OS_*`, `BOOST_COMP_*`, and `BOOST_PLAT_*` variant will be detected +(except for sub-categories).] + +[endsect] diff --git a/doc/html/.gitignore b/doc/html/.gitignore index f723e33..98336bd 100644 --- a/doc/html/.gitignore +++ b/doc/html/.gitignore @@ -1 +1,4 @@ /standalone_HTML.manifest +/docutils.css +/minimal.css +/reference.css diff --git a/doc/html/index.html b/doc/html/index.html index 4bf72b6..024453d 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -1,10 +1,10 @@ -Predef 1.0 +Predef 1.1 - + @@ -13,12 +13,11 @@

-Predef 1.0

+Predef 1.1

Rene Rivera

-
-
+
- +

Last revised: October 15, 2013 at 04:40:06 GMT

Last revised: June 04, 2014 at 03:28:01 GMT


diff --git a/doc/html/predef/acknoledgements.html b/doc/html/predef/acknoledgements.html index e776864..7573714 100644 --- a/doc/html/predef/acknoledgements.html +++ b/doc/html/predef/acknoledgements.html @@ -4,13 +4,13 @@ Acknoledgements - - - + + +
-PrevUpHome +PrevUpHome

@@ -35,7 +35,7 @@

-

-PrevUpHome +PrevUpHome
diff --git a/doc/html/predef/adding_new_predefs.html b/doc/html/predef/adding_new_predefs.html index de2a4bd..091b7b7 100644 --- a/doc/html/predef/adding_new_predefs.html +++ b/doc/html/predef/adding_new_predefs.html @@ -4,8 +4,8 @@ Adding new predefs - - + + @@ -37,20 +37,21 @@ The headers must use the Boost Software License.
  • - The predef must, by default, be defined as BOOST_VERSION_NUMBER(0,0,0). + The predef must, by default, be defined as BOOST_VERSION_NUMBER_NOT_AVAILABLE.
  • The predef must be redefined to a non-zero value once detected.
  • - The predef must, by default, be defined to BOOST_VERSION_NUMBER(0,0,1) when the predef is detected. + The predef must, by default, be defined to BOOST_VERSION_NUMBER_AVAILABLE + when the predef is detected.
  • If possible, the predef will be defined as the version number detected.
  • The predef must define *_AVAILABLE - macros. + macros as needed.
  • The predef must define a symbolic constant string name macro. @@ -58,6 +59,16 @@
  • The predef must declare itself, after being defined, for the testing system.
  • +
  • + The predef must guarantee that it is the only one defined as detected per + category. +
  • +
  • + But a predef can define *_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: @@ -97,6 +108,12 @@ 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 @@ -120,7 +137,7 @@ http://www.boost.org/LICENSE_1_0.txt) Documentation about what is detected. */ -#define BOOST_category_tag BOOST_VERSION_NUMBER(0,0,0) +#define BOOST_category_tag BOOST_VERSION_NUMBER_NOT_AVAILABLE

    Next is the detection and definition of the particular predef. The structure @@ -130,27 +147,29 @@ Documentation about what is detected. 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(0,0,1)" as the fallback to minimally indicate - that the predef was detected: + 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(0,0,1)
    +#        define BOOST_category_tag BOOST_VERSION_NUMBER_AVAILABLE
     #    endif
     #endif
     

    - We also need to provide the *_AVAILABLE versions of the predef. And for - convenience we also want to provide a *_NAME macro: + We also need to provide the *_AVAILABLE versions of the predef.

    #if BOOST_category_tag
     #   define BOOST_category_tag_AVAILABLE
     #endif
    -
    -#define BOOST_catagory_tag_NAME "Name"
    +
    +

    + 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 @@ -168,6 +187,84 @@ Documentation about what is detected.

    + Adding + exclusive predefs +

    +

    + 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. +

    +

    + + Adding + an exclusive but emulated predef +

    +

    + 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
    +
    +

    + Using utility pattern macros

    @@ -192,7 +289,7 @@ Documentation about what is detected.
    -
    -
    - + + + + + + + + + + + + + + + +
    +

    + __arm64 +

    +
    +

    + detection +

    +

    __thumb__ @@ -190,6 +202,30 @@

    +

    + _M_ARM +

    +
    +

    + detection +

    +
    +

    + __arm64 +

    +
    +

    + 8.0.0 +

    +

    __TARGET_ARCH_ARM @@ -213,6 +249,18 @@

    +

    + _M_ARM +

    +
    +

    + V.0.0 +

    +
    @@ -2089,7 +2137,7 @@ -
    -
    -
    -
    + BOOST_OS_IOS +
    +

    + iOS operating system. +

    +
    ++++ + + + + + + + + + + + + + + + + + + + + + + +
    +

    + Symbol +

    +
    +

    + Version +

    +
    +

    + __APPLE__ +

    +
    +

    + detection +

    +
    +

    + __MACH__ +

    +
    +

    + detection +

    +
    +

    + __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ +

    +
    +

    + detection +

    +
    +

    + __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ +

    +
    +

    + __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__*1000 +

    +
    +
    + BOOST_OS_IRIX

    @@ -530,7 +605,7 @@

    - + BOOST_OS_LINUX

    @@ -581,7 +656,7 @@

    - + BOOST_OS_MACOS

    @@ -681,7 +756,7 @@

    - + BOOST_OS_OS400

    @@ -719,7 +794,7 @@

    - + BOOST_OS_QNX

    @@ -796,7 +871,7 @@

    - + BOOST_OS_SOLARIS

    @@ -848,7 +923,7 @@

    - + BOOST_OS_UNIX

    @@ -924,7 +999,7 @@

    - + BOOST_OS_SVR4

    @@ -1000,7 +1075,7 @@

    - + BOOST_OS_VMS

    @@ -1063,7 +1138,7 @@

    - + BOOST_OS_WINDOWS

    @@ -1151,7 +1226,7 @@

    - + BOOST_OS_BSD_BSDI

    @@ -1189,7 +1264,7 @@

    - + BOOST_OS_BSD_DRAGONFLY

    @@ -1227,7 +1302,7 @@

    - + BOOST_OS_BSD_FREE

    @@ -1279,7 +1354,7 @@

    - + BOOST_OS_BSD_NET

    @@ -1391,7 +1466,7 @@

    - + BOOST_OS_BSD_OPEN

    @@ -1793,7 +1868,7 @@ -


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/predef/reference/boost_plat_platform_macros.html b/doc/html/predef/reference/boost_plat_platform_macros.html new file mode 100644 index 0000000..e554c77 --- /dev/null +++ b/doc/html/predef/reference/boost_plat_platform_macros.html @@ -0,0 +1,276 @@ + + + +BOOST_PLAT platform macros + + + + + + + + +
    +PrevUpHomeNext +
    +
    +

    +BOOST_PLAT platform macros +

    +
    + + BOOST_PLAT_MINGW +
    +

    + MinGW platform. Version + number available as major, minor, and patch. +

    +
    ++++ + + + + + + + + + + + + + + + + + + + + + + +
    +

    + Symbol +

    +
    +

    + Version +

    +
    +

    + __MINGW32__ +

    +
    +

    + detection +

    +
    +

    + __MINGW64__ +

    +
    +

    + detection +

    +
    +

    + __MINGW64_VERSION_MAJOR, + __MINGW64_VERSION_MINOR +

    +
    +

    + V.R.0 +

    +
    +

    + __MINGW32_VERSION_MAJOR, + __MINGW32_VERSION_MINOR +

    +
    +

    + V.R.0 +

    +
    +
    + + BOOST_PLAT_WINDOWS_DESKTOP +
    +
    ++++ + + + + + + + + + + + + + + +
    +

    + Symbol +

    +
    +

    + Version +

    +
    +

    + !WINAPI_FAMILY +

    +
    +

    + detection +

    +
    +

    + WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP +

    +
    +

    + detection +

    +
    +
    + + BOOST_PLAT_WINDOWS_PHONE +
    +
    ++++ + + + + + + + + +
    +

    + Symbol +

    +
    +

    + Version +

    +
    +

    + WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP +

    +
    +

    + detection +

    +
    +
    + + BOOST_PLAT_WINDOWS_RUNTIME +
    +
    ++++ + + + + + + + + + + + + + + +
    +

    + Symbol +

    +
    +

    + Version +

    +
    +

    + WINAPI_FAMILY == WINAPI_FAMILY_APP +

    +
    +

    + detection +

    +
    +

    + WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP +

    +
    +

    + detection +

    +
    +
    + + BOOST_PLAT_WINDOWS_STORE +
    +
    ++++ + + + + + + + + +
    +

    + Symbol +

    +
    +

    + Version +

    +
    +

    + WINAPI_FAMILY == WINAPI_FAMILY_APP +

    +
    +

    + detection +

    +
    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/predef/reference/other_macros.html b/doc/html/predef/reference/other_macros.html index f747249..b1e3f6f 100644 --- a/doc/html/predef/reference/other_macros.html +++ b/doc/html/predef/reference/other_macros.html @@ -4,14 +4,14 @@ Other macros - + - +
    -PrevUpHomeNext +PrevUpHomeNext

    @@ -70,7 +70,7 @@

    -

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/predef/reference/version_definition_macros.html b/doc/html/predef/reference/version_definition_macros.html index 3a6a733..c52ae47 100644 --- a/doc/html/predef/reference/version_definition_macros.html +++ b/doc/html/predef/reference/version_definition_macros.html @@ -4,14 +4,14 @@ Version definition macros - + - +
    -PrevUpHomeNext +PrevUpHomeNext

    @@ -170,7 +170,7 @@

    -

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/predef/to_do.html b/doc/html/predef/to_do.html new file mode 100644 index 0000000..200e3ce --- /dev/null +++ b/doc/html/predef/to_do.html @@ -0,0 +1,37 @@ + + + +To Do + + + + + + + + +
    +PrevUpHomeNext +
    +
    +

    +To Do +

    +
    • + Improve reference documentation. +
    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/predef/using_the_predefs.html b/doc/html/predef/using_the_predefs.html index b07a85c..7ce9d04 100644 --- a/doc/html/predef/using_the_predefs.html +++ b/doc/html/predef/using_the_predefs.html @@ -4,8 +4,8 @@ Using the predefs - - + + @@ -51,6 +51,10 @@ 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. @@ -128,7 +132,7 @@ }

    - In addition, for each version macro defined there is a *_AVAILABLE macro defined only when the particular + 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
    @@ -141,6 +145,24 @@
         

    + The + *_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. +

    +

    + Using the BOOST_VERSION_NUMBER macro

    @@ -189,7 +211,7 @@
  • -