mirror of
https://github.com/boostorg/local_function.git
synced 2026-01-25 18:22:25 +00:00
79 lines
4.6 KiB
Plaintext
79 lines
4.6 KiB
Plaintext
|
|
[/ Copyright (C) 2009-2012 Lorenzo Caminiti ]
|
|
[/ Distributed under the Boost Software License, Version 1.0 ]
|
|
[/ (see accompanying file LICENSE_1_0.txt or a copy at ]
|
|
[/ http://www.boost.org/LICENSE_1_0.txt) ]
|
|
[/ Home at http://www.boost.org/libs/local_function ]
|
|
|
|
[section:Getting_Started Getting Started]
|
|
|
|
This section explains how programmers can setup their system to use this library.
|
|
|
|
[section This Documentation]
|
|
|
|
Programmers should have enough knowledge to use this library after reading the __Introduction__, __Getting_Started__, and __Tutorial__ sections.
|
|
The __Advanced_Topics__ and __Reference__ sections can be consulted at a later point to gain a more advanced knowledge of the library.
|
|
All the other sections of this documentation can be considered optional.
|
|
|
|
Some footnotes are marked by the word "*Rationale*".
|
|
They explain reasons behind decisions made during the design and implementation of this library.
|
|
|
|
In some of the examples presented in this documentation, the __Boost_Test__ macro `BOOST_CHECK` is used equivalently to `assert` and the __Boost_Test__ macro `BOOST_AUTO_TEST_CASE` is used equivalently to `main`.
|
|
[footnote
|
|
*Rationale.*
|
|
Using __Boost_Test__ allows to add the documentation examples to the library regression tests so to make sure that the listed examples always compile and run correctly.
|
|
]
|
|
|
|
[endsect]
|
|
|
|
[section Compilers and Platforms]
|
|
|
|
The implementation of this library uses preprocessor and template meta-programming (as supported by __Boost_Preprocessor__ and __Boost_MPL__), templates with partial specializations and function pointers (similarly to __Boost_Function__).
|
|
As a consequence, this library is fairly demanding on compilers' compliance with the __CPP03__ standard.
|
|
At present, this library has been successfully compiled and tested on the following compilers and platforms:
|
|
|
|
# GNU Compiler Collection (GCC) 4.5.1 on Ubuntu Linux 10.
|
|
# GCC 4.3.4 and 4.5.3 (with and without __CPP11__ features enabled `-std=c++0x`) on Cygwin.
|
|
# Miscrosoft Visual Studio Compiler (MSVC) 8.0 on Windows XP and Windows 7.
|
|
|
|
This library has not yet been tested on any other compiler and platform.
|
|
|
|
[endsect]
|
|
|
|
[section Installation]
|
|
|
|
This library is composed of header files only.
|
|
Therefore there is no pre-compiled object file which needs to be installed or linked.
|
|
Programmers can simply instruct the C++ compiler where to find the library header files (`-I` option for GCC, `/I` option for MSVC, etc) and they can start compiling code using this library.
|
|
|
|
This library implementation uses a number of __Boost__ libraries among which: __Boost_Preprocessor__, __Boost_ScopeExit__, __Boost_Typeof__, __Boost_TypeTraits__, and __Boost_MPL__.
|
|
These __Boost__ libraries must be properly installed on your system in order for this library to work.
|
|
|
|
The followings are part of the library private API, they are not documented, and they should not be directly used by programmers:
|
|
[footnote
|
|
*Rationale.*
|
|
This library concatenates symbols specified by the programmers (e.g., the local function name) with other symbols (e.g., special prefixes or preprocessor line numbers) to make internal symbols with unique names to avoid name clashes.
|
|
These symbols are separated by the letter "`X`" when they are concatenated so they read more easily during debugging (the underscore character "`_`" could not be used instead of the letter "`X`" because if the original symbols already contained a leading or trailing underscore, the concatenation could result in a symbol with double underscores "`__`" which is reserved by the C++ standard).
|
|
The "aux" symbols are private to this library while the "detail" symbols can be used within Boost by other libraries but they are still not part of this library public API.
|
|
]
|
|
|
|
* Any symbol defined by files within the =boost/local_function/aux_/= or =boost/local_function/detail/= directory (these header files should not be directly included by programmers).
|
|
* Any symbol within the `boost::local_function::aux` or `boost::local_function::detail` namespace.
|
|
* Any symbol prefixed by `boost_local_function_aux_...` or `boost_local_function_detail_...` (regardless of its namespace).
|
|
* Any symbol prefixed by `BOOST_LOCAL_FUNCTION_AUX_...` or `BOOST_LOCAL_FUNCTION_DETAIL_...` (regardless of its namespace).
|
|
|
|
[endsect]
|
|
|
|
[section Configuration]
|
|
|
|
Some of the library behaviour can be changed at compile-time by defining special /configuration macros/.
|
|
If a configuration macro is left undefined, the library will use an appropriate default value for it.
|
|
|
|
All configuration macros are defined in the header file [headerref boost/local_function/config.hpp].
|
|
It is strongly recommended not to change the library configuration macro definitions unless strictly necessary.
|
|
|
|
[endsect]
|
|
|
|
[endsect]
|
|
|