Compare commits

..

486 Commits

Author SHA1 Message Date
5d285a2d5a Disabled libstdc++ debug mode to work around gcc 10.1 bug.
The debug mode fails to compile in C++11 mode because of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95289.
2020-05-23 19:02:45 +03:00
d3da3ed070 Added a workaround for removed nested typedefs in std::allocator. 2020-05-23 18:45:20 +03:00
4bb5ef3b38 Added a workaround for C++20 ostream having deleted operator<< for wchar_t. 2020-05-23 18:36:02 +03:00
e539c056f6 Added gcc 10 build jobs to Travis CI. 2020-05-22 18:39:16 +03:00
01c1bf1906 Use more up-to-date location of lightweight_test.hpp 2020-05-10 23:27:22 +03:00
be1294c8a8 Converted binary_search_test to lightweight_test.hpp 2020-05-10 23:24:58 +03:00
f26a04df65 Converted allocator_utilities_test to lightweight_test.hpp 2020-05-10 23:20:53 +03:00
5f456ffe33 Converted blank_test to lightweight_test.hpp. 2020-05-10 23:20:22 +03:00
63f2e170cb Removed use of deprecated header boost/detail/iterator.hpp. 2020-05-10 23:14:19 +03:00
c281caa89f Reordered includes. 2020-05-06 20:31:14 +03:00
925c8ba02e Merge pull request #17 from eldiener/develop
Changes for Embarcadero C++ clang-based compilers, targeting Boost 1.74. Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost conf…
2020-05-06 20:29:53 +03:00
f5bb480082 Added boost/config.hpp. 2020-05-06 13:16:18 -04:00
3e36eaf79e Merge branch 'develop' of https://github.com/boostorg/detail into cppbuilder 2020-05-06 11:17:03 -04:00
3b9267be46 Changed because config.hpp is not being included 2020-05-06 11:15:57 -04:00
52b610e32b Added clang-10 jobs to Travis CI. 2020-05-05 23:14:53 +03:00
116cc18560 Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost config for the Embarcadero non-clang-based compilers. 2020-03-23 09:35:45 -04:00
8dbbfe372b Disabled OS X builds because they are slow on Travis CI. 2019-10-22 15:01:40 +03:00
d3c853eb08 Updated CI configs, added compilers. 2019-10-22 00:13:26 +03:00
fc781c8a5a Added a missing include. 2019-05-06 13:24:18 +03:00
7ce5543198 Merge pull request #16 from MarcelRaad/extra_semi
Fix -Wextra-semi clang warnings
2019-02-25 12:31:39 +03:00
1e5a4ad35e Fix -Wextra-semi clang warnings
Remove superfluous semicola.
2019-02-25 10:19:45 +01:00
313bc2a36b Enabled multiple git fetch jobs while executing depinst in CI. 2019-01-15 13:40:40 +03:00
1b778d703b Made git branch selection less obscure and more POSIX shell conforming. 2019-01-03 23:46:36 +03:00
e529fca266 Use the actual number of logical CPUs for the number of CI build/test jobs. 2019-01-03 23:06:59 +03:00
9439ae62d6 Re-added manual checkout of libs/config in CI as Boost.Build depends on it. 2018-12-20 20:49:01 +03:00
4c5f549c6e Use a separate submodule update step with parallel checkouts to speedup CI job startup. 2018-12-18 22:20:40 +03:00
f86480f6eb Added tools/boost_install and libs/headers manual checkout to CI jobs. 2018-12-18 21:55:03 +03:00
d78dd02a90 Added an experimental partial CMakeLists.txt for dependency tracking in CMake projects. 2018-12-18 19:52:41 +03:00
622c7c4ee6 Added gcc 8, clang 6.0 and 7 CI jobs. 2018-11-01 20:43:45 +03:00
b29edf18cb Move ~utf_codecvt_facet to .ipp file to try to fix visibility issues 2018-09-17 21:46:12 +03:00
9b95b29c59 Add more Travis configurations 2018-05-03 16:03:14 +03:00
1a9b7bccc3 Remove typename/template uses outside of templates 2018-05-03 15:52:42 +03:00
83d7ee837d Remove use of BOOST_MPL_AUX_LAMBDA_SUPPORT
It's only need when compilers don't support template template parameters or
partial specialization. I don't think there are any such compilers in use.
2018-04-08 20:57:32 +01:00
3fc08cca25 Stop using mpl::void_ in reference_content 2018-04-08 20:57:31 +01:00
abfaa1443a Use type traits bool type in reference_content 2018-04-08 20:57:31 +01:00
121cbef225 Use true_type/false_type from type traits in is_xxx.hpp 2018-04-08 20:57:31 +01:00
be57f3c000 Remove mpl dependency from allocator_utilities.hpp 2018-04-08 20:57:31 +01:00
941fff4dc0 Stop using mpl binary logic classes in indirect_traits
Was going to use the ice_* classes from type traits, but they're deprecated.
2018-04-08 20:57:07 +01:00
6172f9a30e Use type traits' true type in boost::blank 2018-04-08 20:55:53 +01:00
adaa82e03e Add some tests
Test classes which I'm going to remove the MPL dependency from: blank,
allocator_utilities, is_xxx and reference_content.  I'm also going to change
indirect_traits, but that's tested in the python module.
2018-04-08 20:55:38 +01:00
824721a753 Trim trailing spaces. 2018-01-01 15:52:37 +03:00
bb0840b9c8 Merge pull request #15 from DanielaE/fix/replace-deprecated-allocator-members
Most members of std::allocate are deprecated in C++17
2017-12-30 22:12:21 +03:00
1631ba8134 Most members of std::allocate are deprecated in C++17
Replace them by their cousins from std::allocator_traits.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2017-12-30 18:15:56 +01:00
40b75dae5f Merge branch 'develop' 2017-10-30 01:08:52 +03:00
367c13fd20 Updated utf8_codecvt test to verify that length() detects character boundaries. 2017-10-29 21:29:38 +03:00
ac88c3f24c Updated utf8_codecvt test to verify that length() detects character boundaries. 2017-10-29 21:27:54 +03:00
d6f601b90e Add .travis.yml 2017-10-29 19:06:09 +02:00
cf6808b26f Swapped the standard and non-standard overrides for do_length. 2017-10-29 19:31:28 +03:00
aee87734a8 Fixed do_length virtual override.
Fixed a bug introduced by b47fccb4a4, which
commented the correct virtual function override and thus broke length() result.
2017-10-29 19:27:04 +03:00
b47fccb4a4 adjusted visibility to permit passing of tests on mingw for serialization library 2017-10-22 11:22:45 -07:00
15d8f9a59c Actualized numeric_traits implementation.
1. Ported to Boost.TypeTraits primitives for type inspection and simple
   metaprogramming instead of local implementations. This effectively
   drops any workarounds for compilers without support for partial template
   specializations. Such compilers are long outdated.

2. Include more fine-grained headers from Boost.TypeTraits to optimize
   compilation times.

3. Made numeric_distance function constexpr.

4. Updated the test accordingly (i.e. replaced the use of now removed local
   components with Boost.TypeTraits). Also replaced lexical_cast with
   standard streams to further reduce dependencies.

None of these changes should affect functionality.
2017-09-20 02:01:51 +03:00
9b2065c0ca Enabled numeric_traits test that has been moved from Boost.Utility. 2017-09-20 01:37:06 +03:00
13b49041e1 Move test files to test/ 2017-09-20 01:33:10 +03:00
08bb964247 Replaced left shift of signed integer values with multiplication to keep the expressions constant according to C++11. 2017-09-20 01:33:10 +03:00
4da971f715 Merged from Version_1_33_1
[SVN r31949]
2017-09-20 01:33:10 +03:00
07fe4630f6 Apply typo fixes from Julio M. Merino Vidal
[SVN r27513]
2017-09-20 01:33:10 +03:00
51baccb399 Added new types boost::long_long_type and boost::ulong_long_type in boost/config.hpp and applied these types in place of "long long" throughout. As a result, almost all of boost now compiles cleanly with -ansi -pedantic with gcc. Changes tested with gcc 3.3, 2.95, VC7.1 and Intel 8.
[SVN r24899]
2017-09-20 01:33:10 +03:00
6e36d0d70a Converted to Boost Software License, Version 1.0
[SVN r24055]
2017-09-20 01:33:10 +03:00
c0ced7e14d avoid default parameters for function templates, they confuse SunCC
[SVN r19100]
2017-09-20 01:33:10 +03:00
6adadccbde VC++ fixes
[SVN r14435]
2017-09-20 01:33:10 +03:00
40d73a99e9 Updated preprocessor logic to use BOOST_HAS_LONG_LONG
[SVN r11399]
2017-09-20 01:33:10 +03:00
3db9d2e843 Fixes for ICL
[SVN r10613]
2017-09-20 01:33:10 +03:00
2c7b0fe600 Fixes for Borland
[SVN r9117]
2017-09-20 01:33:10 +03:00
bf772a322f Added test for wchar_t
[SVN r8748]
2017-09-20 01:33:10 +03:00
4b233854aa Now statically selecting a test for signed numbers to avoid warnings with fancy compilers. Added commentary and additional dumping of traits data for tested types.
[SVN r8746]
2017-09-20 01:33:10 +03:00
5d2660f113 minor fix: move "static" storage specifier to the front of a declaration
[SVN r8714]
2017-09-20 01:33:10 +03:00
172a0a1062 Initial checkin
[SVN r8702]
2017-09-20 01:33:10 +03:00
ce79a887c4 Add BOOST_CONSTEXPR where required by C++ Std [bitmark.types].
Add operator! and function bitmask_set as Boost extensions.
2017-08-28 07:32:08 -04:00
782208b04d Revert "adjustment to avoid linking problem: vtable not found found for ~utf8_codecvt_facet.hpp"
This reverts commit 73c12230c3.

Reverted because the change broke GCC/MinGW builds of Filesystem.
2017-08-28 07:27:30 -04:00
73c12230c3 adjustment to avoid linking problem: vtable not found found for ~utf8_codecvt_facet.hpp 2017-08-13 15:11:17 -07:00
6c11197586 Silenced warnings about unused variables. 2016-11-06 21:11:51 +03:00
e88ec2fc6e Replaced std::binary_function with the corresponding typedefs. Improves compatibility with C++17. Also fixed an include for the standard streams. 2016-11-06 21:07:08 +03:00
94f1e6b0c6 Fixed length calculation and added a test. 2016-08-07 23:35:04 +03:00
6abcc6cd09 Merge pull request #12 from danieljames/version-meta-data
Mark library as hidden.
2016-07-05 11:01:55 +03:00
03b1576241 Mark library as hidden. 2016-07-04 23:21:41 +01:00
7368c13108 Merge pull request #11 from danieljames/fix-json
Fix syntax error in libraries.json
2016-06-22 06:53:25 -05:00
3b915c053d Fix syntax error in libraries.json 2016-06-22 08:10:59 +01:00
3224a71ccc Missed some changes for requirements conformance. 2016-06-21 11:03:41 -05:00
1aa7f4d8fc Additions to make Detail library conform to library requirements. 2016-06-20 23:05:43 -05:00
10f1da5034 corrected usage of visibility macro with inline function 2016-06-09 11:00:30 -07:00
4013403c44 skipped test_utf8_codecvt if w?stream not supported 2016-05-02 10:33:05 -07:00
e9c548eeb5 correction in visibility for utf8 facet 2016-04-15 09:42:19 -07:00
11a9234e13 re-correct visibility macro for utf8-codecvt 2016-03-28 14:43:26 -07:00
313c13b263 Added test for utf8_codecvt 2016-03-28 10:29:57 -07:00
99f7f4042f Revert "change visibility setting to import/export from visibility"
This reverts commit bda87dd74e.
2016-03-23 09:34:48 -07:00
bda87dd74e change visibility setting to import/export from visibility 2016-03-20 23:16:13 -07:00
fbf832c900 make utf8 visible 2016-02-26 17:58:54 -08:00
32b98c7586 correct usage of visibility macro for MSVC 2015-10-23 15:12:36 -07:00
9fcf2ae390 update visibility attributes 2015-10-20 12:00:27 -07:00
b0a2809915 Corrected indents, removed trailing spaces. 2015-04-02 18:36:26 +03:00
2fe0e70a94 Merge pull request #8 from eldiener/develop
Remove dependency on deprecated type_trait headers
2015-04-02 18:31:13 +03:00
fbc7c23ab1 Remove dependency on deprecated type_trait headers 2015-04-01 12:16:29 -04:00
678a7ed98b Merge pull request #7 from eldiener/develop
Corrected is_postfix_incrementable implementation
2015-04-01 18:49:11 +03:00
3dde52aaa3 Corrected is_postfix_incrementable implementation 2015-03-31 21:04:47 -04:00
398479e296 Merge pull request #6 from eldiener/develop
Remove unneeded header file inclusion for deprecated type_traits header.
2015-03-30 10:49:28 +03:00
f24860d28c Remove unneeded header file inclusion for deprecated type_traits header. 2015-03-30 02:23:13 -04:00
fcaf168000 Initial commit if lightweight_test_report.hpp, aimed at making it easier for users to supply sample programs in bug reports. First use will be in filesystem. 2014-12-28 09:06:33 -05:00
1fef8494fe eliminated MACRO for do length by providing both const and non-const versions 2014-12-12 21:28:21 -08:00
26cf086520 Fix #10354 from Juan Alday. As he pointed out, the declaration (in detail/utf8_codecvt_facet.hpp) and definition (in detail/utf8_codecvt_facet.ipp) need to use the same signature. Reapply Marshall Clow's [SVN r81616] and [SVN r81877] from November and December, 2012, as these appear to correctly supply const for the msvc/dinkumware library (since fixed) that used a do_length() first argument. Revert the portion of [SVN r86722] that removed BOOST_CODECVT_DO_LENGTH_CONST from the do_length() signature in utf8_codecvt_facet.ipp so that it stays in sync with utf8_codecvt_facet.hpp. For the same reason, copy the __IBMCPP__ workaround from utf8_codecvt_facet.ipp to utf8_codecvt_facet.hpp. Verified all libraries (filesystem, log, program_options, property_tree, serialization) that use utf8_codecvt_facet passed all tests before, and then after, these changes. Also applied minor edits to the use comments embedded in utf8_codecvt_facet.hpp. 2014-09-03 17:43:39 -04:00
5ef03bffe3 Move get_cont_octet_out_count_impl from unnamed namespace to namespace detail. Workaround for unnamed namespace symbols having external linkage prior to C++11, which causes duplicate symbol errors in libraries (for example filesystem) that link in multiple object files (differing only in namespaces) built from the same source file, allowing two versions to exist side-by-side in the same lib or dll. 2014-09-01 07:29:57 -04:00
275643c97b Removed trailing spaces. 2014-06-13 01:14:22 +04:00
509c2421e3 Added a workaround for MinGW-32 so that fenv.h actually gets included. 2014-06-13 00:29:39 +04:00
1318e4a728 Merge branch 'develop' 2014-06-09 20:48:56 +04:00
e87cff715b The header was moved to winapi module. 2014-06-09 20:48:39 +04:00
80d39bd695 Merge branch 'develop' 2014-06-08 01:40:00 +03:00
3e560e9927 Remove obsolete boost/pending/cstddef.hpp. 2014-06-08 01:39:33 +03:00
fb36ac293c Merge branch 'develop' 2014-06-06 04:28:28 +03:00
1dc95cb4cb Remove boost/pending/integer_log2.hpp, moved to integer. 2014-06-06 04:28:06 +03:00
a1a7d328bb Merge branch 'develop' 2014-06-06 03:10:03 +03:00
efc21f5bf4 Remove boost/detail/iterator.hpp, moved to core. 2014-06-06 03:09:40 +03:00
d9d6e09ca9 The files were moved to Boost.WinAPI submodule. 2014-06-05 23:19:16 +04:00
05fecc6e3e The files were moved to Boost.WinAPI submodule. 2014-06-05 23:18:28 +04:00
ec72ca9b03 Remove detail/endian.hpp, moved to predef. 2014-06-05 17:52:53 +03:00
5cdcab8b51 Remove detail/endian.hpp, moved to predef. 2014-06-05 17:51:49 +03:00
231ba60b50 Remove indirect_reference.hpp, it has been moved to iterator. 2014-06-05 01:40:22 +03:00
9663320036 Remove indirect_reference.hpp, it has been moved to iterator. 2014-06-05 01:39:51 +03:00
c9cceb0ce9 Removed executable attribute. 2014-06-04 13:03:10 +04:00
a9cc3926de Removed executable attribute. 2014-06-04 13:02:28 +04:00
678063ef3a The file has been moved to Boost.Core. 2014-06-04 12:58:46 +04:00
83be62c6c1 The file has been moved to Boost.Core. 2014-06-04 12:57:45 +04:00
676d007618 Merge pull request #4 from MSOpenTech/winrt
[winrt support] Changes to update some of the Windows APIs to help support the Windows Runtime
2014-06-03 23:32:20 +04:00
38fc0a4352 Remove headers moved into core. 2014-06-03 20:06:32 +03:00
b4e608fcf2 Updating macro for detecting the Windows Runtime based on accepted changes adding a Boost.Predef. 2014-06-02 12:16:56 -07:00
2644ef67ac Merge pull request #3 from glenfe/develop
Moved lightweight_test.hpp to Boost.Core
2014-06-01 23:04:05 +01:00
099854dece Moved lightweight_test.hpp to Boost.Core 2014-06-01 13:37:29 -07:00
9063b1d1fd Don't run 'correctly_disable' tests by default. 2014-05-31 18:22:42 +01:00
9288a7df75 Merge pull request #2 from danieljames/add-binary-search-test
Move binary_search_test.cpp from utility module.
2014-05-31 18:16:36 +01:00
c75e59f0e1 Move binary_search_test.cpp from utility module.
As it's testing a header in this module.
2014-05-28 15:57:56 +01:00
78b061c1e1 Updating macro for detecting WinRT to BOOST_WINDOWS_RUNTIME based on code review feedback. 2014-05-13 17:11:25 -07:00
a46db5a32e Removing MSOT copyright, replacing with Microsoft. 2014-04-18 16:26:04 -07:00
d436bcd121 detail changes for WinRT support 2014-04-18 16:26:01 -07:00
7312799cc0 Fixed dereferencing rend iterators. 2014-03-26 09:57:33 +04:00
3194681a02 Merge branch 'master' of https://github.com/boostorg/detail 2014-03-02 10:48:07 -08:00
16ee7725f4 Merge branch 'develop' 2014-03-02 10:44:24 -08:00
3d6fdcfda4 changed BOOST_NOEXCEPT to BOOST_NOEXCEPT_OR_NOTHROW 2014-03-01 10:27:44 -08:00
345b3a3b50 Modify to use BOOST_NOEXCEPT 2014-02-28 10:48:19 -08:00
094070e5e4 verified alignment of our custom utf8_codecvt_facet against the base class from which it is derived - std::codecvt. 2014-02-27 08:02:01 -08:00
33bc52789a Moved lightweight_thread.hpp, quick_allocator.hpp into smart_ptr
Conflicts:
	include/boost/detail/lightweight_thread.hpp
	include/boost/detail/quick_allocator.hpp
2014-02-12 17:07:44 +02:00
3dd2674052 Moved lightweight_thread.hpp, quick_allocator.hpp into smart_ptr 2014-02-12 17:05:13 +02:00
d5699c31c9 allocator_utilities: Remove obsolete MSVC version check.
[SVN r85955]
2014-01-14 22:14:32 -08:00
c1b71a6f12 avoid conflict with standard library implementations
[SVN r86722]
2013-11-16 18:49:28 +00:00
55f85a4d1f changed codecvt_utf8 so that serialization uses the standard one if available. If there is no standard one available, it uses the one in boost/utility.
[SVN r86614]
2013-11-11 02:25:58 +00:00
8c689a1533 changed codecvt_utf8 so that serialization uses the standard one if available. If there is no standard one available, it uses the one in boost/utility.
[SVN r86613]
2013-11-11 02:19:46 +00:00
f362e5e72f changed codecvt_utf8 so that serialization uses the standard one if available. If there is no standard one available, it uses the one in boost/utility.
[SVN r86612]
2013-11-11 02:18:51 +00:00
4a5de13017 Fixed INT_PTR_ spelling.
[SVN r86536]
2013-11-01 15:27:08 +00:00
3220177536 Removed RegisterWaitForSingleObjectEx as it is not present in all Windows SDK versions.
[SVN r86474]
2013-10-27 11:56:12 +00:00
1e84644646 Added missing using declarations.
[SVN r86455]
2013-10-26 15:21:25 +00:00
84da532b39 Added missing using declarations.
[SVN r86454]
2013-10-26 15:18:21 +00:00
54822d775b Merged revision(s) 85994 from trunk: Add BOOST_USE_INTRIN_H support; remove #pragma intrinsic, not needed and not supported on Intel. Refs #6646. Refs #7318. Refs #9174.
[SVN r86416]
2013-10-24 14:01:53 +00:00
bae1bebd28 Added Windows 8.1 (aka Blue) version constant.
[SVN r86409]
2013-10-23 21:09:40 +00:00
59ce745040 According to the discussion on the ML, changed the default WinAPI back to XP.
[SVN r86403]
2013-10-23 13:11:31 +00:00
8e3280c8ee Changed the default WinAPI version to Vista.
[SVN r86389]
2013-10-22 13:28:27 +00:00
3319b4ac54 Added support for WinAPI version specification.
[SVN r86307]
2013-10-14 21:06:05 +00:00
3dafb197cc * Reformatted and completed legacy code removal patches from Stephen Kelly (note: this patch treads on changesets [86244] and [82545], will restore later)
* Changed hashed indices internal data structure
* Changed hashed index iterator serialization
* Added reserve to hashed indices
* noexcept specification
* Lazy node allocation in insertion
* Doc typos

[SVN r86264]
2013-10-12 15:30:35 +00:00
0e75aca4dd Remove remaining occurances of BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
These evaded scripting.

[SVN r86249]
2013-10-11 23:22:36 +00:00
d32882cc08 Simplify multi-component ifdefs containing BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
[SVN r86248]
2013-10-11 23:20:59 +00:00
6395ed2f25 Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #ifdef...#else...#endif blocks.

[SVN r86246]
2013-10-11 23:19:17 +00:00
a747594bdd Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #ifndef...#else...#endif blocks.

[SVN r86245]
2013-10-11 23:17:48 +00:00
684ee20edb Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #ifndef...#endif conditions.

[SVN r86244]
2013-10-11 23:15:00 +00:00
5e28401195 Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #ifdef...#endif blocks.

[SVN r86243]
2013-10-11 23:13:10 +00:00
2114a3d026 Remove obsolete files.
[SVN r86242]
2013-10-11 23:11:35 +00:00
0f9b39df3f Fixed WinAPI compilation. Ported timed mutex to waitable timer. Windows time points are now aligned with FILETIME to reduce conversion overhead when used with waitable timers.
[SVN r86192]
2013-10-07 17:41:43 +00:00
933b2c596b Boost.Sync: Added preliminary implementation of a waitable timer for fixed time point waits. Updated WinAPI functions to contain the required APIs.
[SVN r86179]
2013-10-06 17:40:19 +00:00
4dc7897c9f Container: Remove obsolete GCC version check.
[SVN r86109]
2013-10-01 08:43:30 +00:00
41f09db5d6 Exception: Remove obsolete GCC version check.
[SVN r86073]
2013-09-30 16:00:29 +00:00
c8ca7d9788 Detail: Remove obsolete MSVC version checks.
[SVN r86039]
2013-09-30 00:21:39 +00:00
1de858a76f Finished POSIX condition_variable, working on Windows.
[SVN r86007]
2013-09-29 16:42:24 +00:00
275fe9d73b Add BOOST_USE_INTRIN_H support; remove #pragma intrinsic, not needed and not supported on Intel.
[SVN r85994]
2013-09-29 11:04:37 +00:00
8ca67eedb4 Merged latest changes from trunk.
[SVN r85988]
2013-09-28 16:29:40 +00:00
1ec40ed29c allocator_utilities: Remove obsolete MSVC version check.
[SVN r85955]
2013-09-26 13:04:51 +00:00
589631a886 Remove obsolete MSVC check from pragma guard
git grep -h -B1 "^#\s*pragma once" | grep -v pragma | sort | uniq

is now clean.

[SVN r85952]
2013-09-26 13:02:51 +00:00
41e2470d21 Enabled #pragma once for all compilers that support it, not only MSVC.
[SVN r85866]
2013-09-24 12:56:50 +00:00
eb60febe83 Fixed compilation problems with MinGW-w64.
[SVN r85865]
2013-09-24 12:49:46 +00:00
73c18922d1 Merged changes from trunk.
[SVN r85818]
2013-09-22 09:57:15 +00:00
ce5864b47e To avoid name clashes with Boost.Thread, renamed boost::detail::win32 namespace to winapi. Also renamed the directory with headers accordingly. Adjusted Boost.Chrono and Boost.Sync to reflect the changes.
[SVN r85791]
2013-09-19 17:58:24 +00:00
8590e40965 Added GetSystemTimeAsFileTime definition when it is absent in WinAPI. Made constants as enum so that they can be used in switch/case statements. Added Boost.Sync time_units and mutex for Windows.
[SVN r85779]
2013-09-18 21:25:36 +00:00
e1e8b05e02 Moved semaphore implementation to details. Some minor fixes.
[SVN r85679]
2013-09-15 16:58:33 +00:00
79bce0a5f2 sync: add semaphore implementation
[SVN r85673]
2013-09-15 10:46:54 +00:00
2b05049c56 Merge Predef library to release.
[SVN r85618]
2013-09-09 04:06:52 +00:00
6a98633c6c Rewrite content to use Predef endian detection. This removes the non-BSL license use.
[SVN r85230]
2013-08-07 03:03:23 +00:00
06aac2f311 Fix typo.
Fixes #7664.

[SVN r84760]
2013-06-13 15:53:31 +00:00
81cbc142ac Fix typo.
Refs #7664.

[SVN r84758]
2013-06-13 15:50:50 +00:00
8bfa4e2836 Merged BOOST_TEST_THROWS from trunk, as it's been working fine for two months
[SVN r84519]
2013-05-26 21:10:27 +00:00
bd58c2d229 Added BOOST_TEST_THROWS
[SVN r83433]
2013-03-14 23:08:40 +00:00
610e913595 Merge changes from Trunk.
Fixes #6013.
Fixes #7151.
Fixes #7359.
Fixes #7389.
Fixes #7452.
Fixes #7528.
Fixes #7703.
Fixes #7841.
Fixes #7898.
Fixes #7938.
Fixes #8048.

[SVN r83139]
2013-02-24 19:07:59 +00:00
19ca421f24 Apply patch from 7703.
Refs #7703.

[SVN r83005]
2013-02-19 16:09:27 +00:00
538f8f7b3b Apply patch for XBox and Android.
Refs #7528.

[SVN r83004]
2013-02-19 16:06:55 +00:00
ae93c52b75 Apply BSD patch.
Refs #6013.

[SVN r82996]
2013-02-19 11:59:27 +00:00
d50a20412b When I merged the Boost.ScopedEnum changes to release, I missed a file.
[SVN r82055]
2012-12-17 17:54:12 +00:00
eb6208f69a Made codecvt::do_length param constant based on the library used, not the compiler
[SVN r81877]
2012-12-12 15:41:26 +00:00
d5aa8a952a Fixed incorrect 'const' param for utf8_codecvt_facet::do_length
[SVN r81616]
2012-11-28 19:12:42 +00:00
dc1a439ec0 Remove usage of deprecated macros
[SVN r81442]
2012-11-20 19:44:24 +00:00
c77e8e89cf Fix stray whitespace in previous commit.
Refs #7516.

[SVN r81048]
2012-10-22 18:12:51 +00:00
2ea55870e4 Fix up for Arm.
Fixes #7516.

[SVN r81047]
2012-10-22 17:47:41 +00:00
436afec8b3 Merged revision(s) [80935] from trunk: Fix the _WIN32_WCE >= 0x600 case.
[SVN r80960]
2012-10-11 19:51:05 +00:00
112b2471b7 Fix the _WIN32_WCE >= 0x600 case.
[SVN r80935]
2012-10-10 13:11:38 +00:00
2cbdcde368 Fix: intrin.h is available in msvc-9.0 (_MSC_VER 1500)
[SVN r80626]
2012-09-22 15:35:41 +00:00
689df8ea62 Thread: Updated from trunk 1.52
[SVN r80473]
2012-09-09 18:48:52 +00:00
67f78550e5 Detail: Merge some whitespace fixes from release.
[SVN r80349]
2012-09-01 14:47:29 +00:00
5973a2bcef Thread: Try again to fix 5431
[SVN r80127]
2012-08-21 21:36:12 +00:00
d8159674fa Thread: Rollback last modification as it breaks regression test VeecoFTC/msvc-9.0~wm5~stlport5.2
[SVN r80067]
2012-08-17 15:27:56 +00:00
0c7444b84f Thread: Try to fix 5431
[SVN r80042]
2012-08-15 10:02:09 +00:00
804546aacf Chrono: Try to fix issue with WinError.h file
[SVN r79328]
2012-07-07 10:27:13 +00:00
02d2fb38e3 Hash: Merge deprecated header warning + some documentation.
[SVN r78697]
2012-05-27 21:13:49 +00:00
c11c0ef97b Merged boost.thread from trunk
[SVN r78543]
2012-05-22 17:03:15 +00:00
b39e23464b Add warning to deprecated header boost/functional/detail/container_fwd.hpp.
Should have done this years ago, removing this header should make
modularization a tad bit cleaner.


[SVN r78533]
2012-05-21 21:58:18 +00:00
0e2bc0d9f4 ScopedEnum: Fix issue with native function class
[SVN r78437]
2012-05-12 17:29:08 +00:00
9378f3d4f7 ScopedEnum: Rollback last change as there are regressions on Spirit
[SVN r78434]
2012-05-12 11:07:58 +00:00
20332e24e5 Combine scoped enum emulation from thread library into detail/scoped_enum_emulation.hpp
[SVN r78407]
2012-05-10 17:06:15 +00:00
6caa4f2698 Summary: Moved libs/detail/utf8_codecvt_facet.cpp to boost/detail/utf……8_codecvt_facet.ipp
Author: Dave Abrahams <dave@boostpro.com>


[SVN r78119]
2012-04-21 22:36:59 +00:00
2a116b4ea4 Summary: Moved libs/detail/utf8_codecvt_facet.cpp to boost/detail/utf8_codecvt_facet.ipp
Author: Dave Abrahams <dave@boostpro.com>


[SVN r78081]
2012-04-19 18:19:20 +00:00
a017040e81 Detail: Merge macro to force container forwarding.
[SVN r77672]
2012-03-31 19:34:56 +00:00
e0e8ccb712 Detail: Add macro to explicitly enable forward declaration of containers.
[SVN r77067]
2012-02-18 15:48:59 +00:00
de25ca2c03 Detail: Merge disabled gcc container forwardings. Fixes #6323.
[SVN r76529]
2012-01-15 19:56:13 +00:00
17612676b8 Detail: Disable container forward declarations for recent versions of libstdc++, refs #6326.
[SVN r76419]
2012-01-11 23:00:55 +00:00
06c06ee09c Merge Boost.Math changes from Trunk: mostly refactored test cases for shorter compile times.
[SVN r76369]
2012-01-08 13:10:31 +00:00
948271c0ae Fix Clang workaround.
Fixes #6156.

[SVN r76323]
2012-01-05 17:29:22 +00:00
9436535318 Unordered: Fix complex type for gcc's standard library. Fixes #6139.
I haven't had any confirmation, but I assume this fixes the problem.


[SVN r75909]
2011-12-11 21:43:01 +00:00
469b547c88 Merge [75396] to release. Fixes #4678.
[SVN r75757]
2011-11-30 18:08:41 +00:00
609cf3c49f Detail: Fix BOOST_CONTAINER_FWD_COMPLEX_STRUCT. Refs #6139.
My last change was wrong, it isn't struct for Dinkumware. In GCC's
standard library it's declared as a class, but later defined as a
struct. This is so far untested as I'm building the latest trunk version
of clang (the warning doesn't show for the current clang release).

[SVN r75600]
2011-11-21 23:21:32 +00:00
735804d636 Detail: complex is a struct in Dinkumware.
IIRC it's `class` in SGI's STL and most other implementations. The state
for similar warnings for the compilers that I've looked at:

- Visual C++ never warns because I used a pragma to disable the warning.
- GCC never warns with its standard library since it contains a
  `system_header` pragma. It might warn for other libraries.
- Clang respects GCC's pragma so it never warns for GCC's standard
  library. Forward declarations are disabled for libc++ so this isn't an
  issue there. It does warn when using Dinkumware and possibly other
  standard libraries.

I'm tempted to make container forwarding 'opt-in' rather than 'opt-out'.
Or maybe only enable for compiler/library combinations where it's known
to work.

[SVN r75561]
2011-11-19 23:29:24 +00:00
4c711ba972 Detail: Revert [67484] in container_fwd. Refs #6139
[SVN r75544]
2011-11-18 11:32:43 +00:00
0f51c7701d Use <intrin.h> for VS2010+. Refs #4678.
[SVN r75396]
2011-11-07 23:08:53 +00:00
32b452486f Merge to release several changes for 1.48.
[SVN r75293]
2011-11-04 02:31:36 +00:00
7b712685ce Detail: Don't forward declare containers for gcc in profile mode. Refs #6029.
Also a big clear comment about `BOOST_DETAIL_NO_CONTAINER_FWD` and a
fixed typo.

[SVN r75016]
2011-10-17 20:36:56 +00:00
b95901a068 Detail: Merge new version of container_fwd.
And a couple of old failure markups that I hadn't merged yet.


[SVN r73482]
2011-08-01 23:12:19 +00:00
2423aff085 Detail: Turn forward declarations for IBM Visual Age standard library.
[SVN r73453]
2011-07-30 20:24:39 +00:00
8a12de16a4 Detail: Turn off warnings as errors for compile-fail tests.
The test shouldn't succeed because the compile failed because of a warning.


[SVN r73096]
2011-07-14 09:47:51 +00:00
e87588af6a Detail: test container_fwd for debug version of standard library.
[SVN r72996]
2011-07-10 13:15:08 +00:00
bb1f3d690a Detail: More pessimistic container_fwd.hpp
Have a separate config stage, which by default disables forward
declaration of containers. Also add a test to check that if it is
disabled correctly.

Removed forward declaration of std::pair - since it's almost always
included by `<utility>`.

[SVN r72990]
2011-07-09 17:13:39 +00:00
3b2a3d1cfc Merged fix for issue #4849 from trunk (fix boost.thread on mingw64) (authorized by rene)
[SVN r72657]
2011-06-17 21:01:46 +00:00
be8f3b19eb Chrono: inspect update
[SVN r71219]
2011-04-12 20:46:04 +00:00
799953dd55 Detail: Merge tests + disable container_fwd on libc++.
[SVN r70719]
2011-03-29 21:58:48 +00:00
e2ed5892c2 Merged more fixes from trunk; added is_sorted.hpp because that is needed for BGL fixes
[SVN r70704]
2011-03-29 19:07:16 +00:00
860576c740 Chrono: Added detail/win directory
[SVN r70537]
2011-03-25 01:20:55 +00:00
07227dd61d Detail: fully merge lightweight_test.hpp
[SVN r70475]
2011-03-23 13:23:55 +00:00
1d3205b456 Merge [69260] to release. Fixes #5216.
[SVN r70440]
2011-03-22 23:51:10 +00:00
9f938bf39b Applied patch from issue #4849
[SVN r70383]
2011-03-21 23:09:07 +00:00
c42fd431af Add hash_value for shared_ptr; prevents hash_value( bool ) from being used. Refs #5216.
[SVN r69260]
2011-02-24 23:24:54 +00:00
704bb6644b Changes to complete Boost.Chrono support for Windows CE. Closes ticket 5218.
[SVN r69240]
2011-02-24 18:21:52 +00:00
94dcc475a1 Merge trunk
[SVN r68911]
2011-02-15 14:18:42 +00:00
5367f6459d libc++ also has no const on codecvt length
[SVN r68859]
2011-02-14 10:27:38 +00:00
8717cff3c5 Initial commit; bitmask.hpp is needed by upcoming filesystem changes
[SVN r68836]
2011-02-13 14:48:01 +00:00
361414ba84 Disable forward container declarations for libc++
[SVN r68786]
2011-02-11 20:39:25 +00:00
4920859a06 Restore [66804], [66833], and [66834]. (fenv fixes.) I mistakenly reverted them in [68201] because [66804] was mislabeled.
[SVN r68554]
2011-01-30 06:24:30 +00:00
76e55056de Add BOOST_ASSERT_MSG. Add macros to configure output stream.
[SVN r68414]
2011-01-24 15:37:13 +00:00
b98d99bc63 Revert addition of BOOST_NIX, etc and everything tied to it. ([66696], [66783], [66804], [66833], and [66834])
[SVN r68201]
2011-01-17 04:51:54 +00:00
d20069a4d6 Revert [67111] (addition of boost/detail/iomanip.hpp) and all the commits that depend on it. ([68137], [68140], [68141], [68154], and [68165]).
[SVN r68168]
2011-01-15 08:11:51 +00:00
e3049b1480 Make <boost/detail/iomanip.hpp> include <iomanip> and put the <iomanip> functions
in the boost::detail namespace if not on clang- or intel-linux.



[SVN r68165]
2011-01-15 02:23:46 +00:00
74a47fbf05 Fixed issue with iomanip implementation + Apache stdlib.
[SVN r68156]
2011-01-14 17:39:36 +00:00
0693db0847 Fixed ambiguity issues when compiling with C++0x support enabled.
[SVN r68155]
2011-01-14 17:37:59 +00:00
e8060b3ef5 Removed the use of __gnu_cxx::is_sorted from Boost.Graph as it's lolnonportable,
implemented a version of the algorithm as a replacement,



[SVN r68144]
2011-01-14 03:02:47 +00:00
4a1c553f90 Replacing the use of <iomanip> with <boost/detail/iomanip.hpp> across Boost.
On Linux, GNU's libstdc++, which is the default stdlib for icc and clang,
cannot parse the <iomanip> header in version 4.5+ (which thankfully neither
compiler advises the use of yet), as it's original C++98-friendly
implementation has been replaced with a gnu++0x implementation.
<boost/detail/iomanip.hpp> is a portable implementation of <iomanip>, providing
boost::detail::setfill, boost::detail::setbase, boost::detail::setw,
boost::detail::setprecision, boost::detail::setiosflags and
boost::detail::resetiosflags. 



[SVN r68140]
2011-01-14 02:35:58 +00:00
99f3841839 Updating copyright.
[SVN r68137]
2011-01-14 00:23:15 +00:00
91db205d17 Boost.Chrono: try to fix LONGLONG_ definition
[SVN r68128]
2011-01-13 22:07:19 +00:00
bb233de354 Merge STLPort endian detection to release.
[SVN r68091]
2011-01-13 11:28:34 +00:00
455d56887e Spirit: merge from trunk, more to come
[SVN r68069]
2011-01-12 19:22:18 +00:00
17d5ed080b Merge from trunk
[SVN r68054]
2011-01-12 14:57:41 +00:00
7ce0af2bba Add missing fenv.hpp file.
[SVN r67854]
2011-01-09 11:15:02 +00:00
e7f3ca8c2f Boost.Chrono: Added detail/win files used by Boost.Chrono to manage with HEAADER_ONLY libs
[SVN r67749]
2011-01-07 07:51:15 +00:00
475c3310be Move tests for container_fwd.hpp into detail.
[SVN r67667]
2011-01-04 23:30:22 +00:00
d6a77e4054 Added the get_c_string function back in (it dispatches to the get_c_string_impl
CP). Fixed utree::list_type attribute so that only non-list utree nodes are wrapped in lists (this was the original behavior we wanted).



[SVN r67484]
2010-12-29 01:37:28 +00:00
a057517431 Added an iomanip implementation to boost/detail. GNU's libstdc++ version 4.5+
contains an iomanip header which uses C++0x features that only GCC supports,
causing breakage with ICC and Clang. Also added a test, but I'm not sure how to
set it up to be run by the testing machines.



[SVN r67111]
2010-12-08 18:25:07 +00:00
2a7bc8999f fix fumble-fingers
[SVN r66895]
2010-11-30 14:56:03 +00:00
6d861790f7 Rename main.hpp -> lightweight_main.hpp
[SVN r66894]
2010-11-30 14:53:22 +00:00
313008fc31 Add lightweight std::exception catching main, dependent only upon <iostream> and <exception>
[SVN r66893]
2010-11-30 14:48:03 +00:00
1d911d3784 Added *nix identification macros to Boost.Config; BOOST_NIX, BOOST_GENETIC_NIX,
BOOST_TRADEMARK_NIX and BOOST_FUNCTIONAL_NIX.



[SVN r66804]
2010-11-27 21:43:52 +00:00
2c1f83de56 Added BOOST_HAS_FENV_H detection to Boost.Config (if this macro is defined, then
the standard library/platform provide a POSIX compliant implementation of fenv.h).



[SVN r66693]
2010-11-23 03:34:05 +00:00
9261171c6f Added a detail header for fenv. Please use boost/detail/fenv.hpp in Boost code
to avoid problems with Clang/glibc.



[SVN r66458]
2010-11-08 17:10:25 +00:00
d1a4c127eb Pick STLPort endian options when available.
This should be a fix for embedded Visual C++ used with STLPort.

[SVN r65089]
2010-08-28 17:34:12 +00:00
0aa7afd1d8 Add BOOST_ASSERT that report_errors() has been called.
[SVN r64987]
2010-08-24 18:57:38 +00:00
4f2d881cb1 Revert change committed in error
[SVN r64929]
2010-08-19 17:09:22 +00:00
cd4810a2e7 Remove path array optimization; problematic when array contains a string shorter than the array length. Reported by Adam Badura.
[SVN r64928]
2010-08-19 17:03:38 +00:00
e4ac9a7c8e Rename 'check' in detail/is_incrementable.
Merged [63763] and mark other merged changes.


[SVN r64868]
2010-08-17 19:19:59 +00:00
af85a27b12 Rename 'check' in detail/is_incrementable.
To avoid clashing with Apple testing macros.

[SVN r63763]
2010-07-08 20:49:27 +00:00
a4eef8ff7d Applied patch from issue #3377
[SVN r62509]
2010-06-07 15:44:32 +00:00
d8dc59f6cb Merge fix for #2762 from trunk.
[SVN r62260]
2010-05-27 14:12:42 +00:00
c5dc10b3c4 Add detection of __LITTLE/BIG_ENDIAN__ for GCC versions that define them. I.e. the Apple builds of Xcode/gcc. (fixes #2762)
[SVN r62252]
2010-05-26 21:10:41 +00:00
c5eac8e96c Merge some detail changes.
- [53670] Avoid C style casts.
 - [55604] Fix #3346 boost/detail/scoped_enum_emulation.hpp enum_t conflict
   with Unix rpc/types.h
 - Don't foward declare containers when using gcc's parallel library and add a
   macro to disable forward declaration. Fixes #3866.


[SVN r59679]
2010-02-14 16:31:21 +00:00
00e723fba0 Don't foward declare containers when using gcc's parallel library and
add a macro to disable forward declaration. Fixes #3866.

[SVN r59282]
2010-01-27 19:32:39 +00:00
134c915cbf Merged changes from trunk that are going into 1.42.0
[SVN r58554]
2009-12-29 03:50:53 +00:00
3c935aaf8f Merge [57958] to release. Fixes #3378.
[SVN r58069]
2009-11-30 20:38:31 +00:00
c2192c4caf Fix interlocked.hpp to compile under /clr:pure. Refs #3378.
[SVN r57958]
2009-11-26 21:40:50 +00:00
097a256c16 Removed obsolete file
[SVN r57901]
2009-11-24 19:43:16 +00:00
726c4a7182 Merge to release, fix for fix in r35591:
sometimes __hppa is on PA-RISC but __hpux isn't
(e.g. on linux)

Fixes ticket #3537





[SVN r57049]
2009-10-21 18:07:45 +00:00
badf2c8a79 fix for fix in r35591: sometimes __hppa is on PA-RISC but __hpux isn't
Fixes ticket #3537




[SVN r57048]
2009-10-21 18:05:33 +00:00
91672171a6 rm cmake from trunk. I'm not entirely sure this is necessary to satisfy the inspect script, but I'm not taking any chances, and it is easy to put back
[SVN r56942]
2009-10-17 02:07:38 +00:00
1ede593bc2 rm cmake from the release branch before it goes out broken. Policy dictates that you never commit to release, you commit to trunk and merge to release.
[SVN r56941]
2009-10-17 01:10:45 +00:00
812c32a5a1 Fix #3346 boost/detail/scoped_enum_emulation.hpp enum_t conflict with Unix rpc/types.h
[SVN r55604]
2009-08-15 14:20:28 +00:00
7dbb57bc82 Copyrights on CMakeLists.txt to keep them from clogging up the inspect
reports.  This is essentially the same commit as r55095 on the release
branch.



[SVN r55159]
2009-07-26 00:49:56 +00:00
debb7ae2de Merge from trunk
[SVN r55125]
2009-07-23 15:20:53 +00:00
4a28e5d5a1 Add basic copyright/license to keep cmake out of the inspection report
[SVN r55095]
2009-07-22 21:51:01 +00:00
fc561bdc77 Merge latest hash developments:
* Avoid float to int warning.
 * Work around 'using namespace' bug in Visual C++.
 * Make `<boost/functional/hash/extensions.hpp> self contained.
 * Move some of the extension implementation from the main hash header
   into the exensions header.
 * Remove BOOST_HASH_CHAR_TRAITS from `container_fwd.hpp`.
 * Other minor changes.

Merged revisions 53828,53924,54024-54025,54033-54034,54139-54145,54399 via svnmerge from 
https://svn.boost.org/svn/boost/trunk

........
  r53828 | danieljames | 2009-06-12 19:24:47 +0100 (Fri, 12 Jun 2009) | 1 line
  
  Try to avoid float to int warning when a float function doesn't exist.
........
  r53924 | danieljames | 2009-06-15 08:37:42 +0100 (Mon, 15 Jun 2009) | 4 lines
  
  Remove hash_complex_test's dependency on Boost.Random.
  
  Only test for a few values, but that should be okay as there isn't much
  to test.
........
  r54024 | danieljames | 2009-06-17 22:22:49 +0100 (Wed, 17 Jun 2009) | 1 line
  
  Put the minimum amount of implementation in the same namespace as the 'using namespace' directives in order to avoid Visual C++ 8 bug.
........
  r54025 | danieljames | 2009-06-17 22:23:42 +0100 (Wed, 17 Jun 2009) | 1 line
  
  Try to avoid using special macro handling code.
........
  r54033 | danieljames | 2009-06-18 00:24:28 +0100 (Thu, 18 Jun 2009) | 1 line
  
  Add copyright to namespace_fail_test.cpp
........
  r54034 | danieljames | 2009-06-18 00:25:12 +0100 (Thu, 18 Jun 2009) | 1 line
  
  A couple of missing newlines.
........
  r54139 | danieljames | 2009-06-21 10:41:11 +0100 (Sun, 21 Jun 2009) | 1 line
  
  A few more comments in boost::hash.
........
  r54140 | danieljames | 2009-06-21 10:41:30 +0100 (Sun, 21 Jun 2009) | 1 line
  
  Move includes to the header which they're used in.
........
  r54141 | danieljames | 2009-06-21 10:41:46 +0100 (Sun, 21 Jun 2009) | 1 line
  
  Revert [54025] "Try to avoid using special macro handling code."
........
  r54142 | danieljames | 2009-06-21 10:42:05 +0100 (Sun, 21 Jun 2009) | 1 line
  
  Get <boost/functional/hash/extensions.hpp> to work.
........
  r54143 | danieljames | 2009-06-21 10:42:20 +0100 (Sun, 21 Jun 2009) | 1 line
  
  Move BOOST_HASH_CHAR_TRAITS from container_fwd into the hash headers, and undefine it.
........
  r54144 | danieljames | 2009-06-21 10:42:40 +0100 (Sun, 21 Jun 2009) | 1 line
  
  Move the support for hashing containers into the extension header, and improve the standard tests.
........
  r54145 | danieljames | 2009-06-21 10:51:59 +0100 (Sun, 21 Jun 2009) | 1 line
  
  I didn't mean to comment this out.
........
  r54399 | danieljames | 2009-06-27 08:39:12 +0100 (Sat, 27 Jun 2009) | 1 line
  
  Add am implementation note about the Visual C++ problems.
........


[SVN r54402]
2009-06-27 08:12:20 +00:00
2438dc56f1 Support BOOST_NO_TYPEID and BOOST_NO_IOSTREAM in Boost.Variant. Fixes #3051.
Merged revisions 53682 via svnmerge from 
https://svn.boost.org/svn/boost/trunk

........
  r53682 | danieljames | 2009-06-06 12:46:24 +0100 (Sat, 06 Jun 2009) | 1 line
  
  Support BOOST_NO_TYPEID and BOOST_NO_IOSTREAM in Boost.Variant. Fixes #3051.
........


[SVN r54398]
2009-06-27 07:34:42 +00:00
7247d512f8 Move BOOST_HASH_CHAR_TRAITS from container_fwd into the hash headers, and undefine it.
[SVN r54143]
2009-06-21 09:42:20 +00:00
6a458a381b Fix ticket #2986 patch for VC++ 7.1 and earlier; workaround WCHAR_MAX bug
[SVN r54031]
2009-06-17 22:40:14 +00:00
c888037399 Support BOOST_NO_TYPEID and BOOST_NO_IOSTREAM in Boost.Variant. Fixes #3051.
[SVN r53682]
2009-06-06 11:46:24 +00:00
8c3a497ec8 detail/utf8_codecvt_facet.cpp: apply patch from ticket #2986 to quiet warnings when wchar_t is 16-bits.
[SVN r53459]
2009-05-30 14:57:49 +00:00
cad13ace57 Remove unnecessary operator.
Fixes #2166.


[SVN r53435]
2009-05-30 09:44:00 +00:00
fbc029e131 merged [49289] and [52371] from trunk
[SVN r52944]
2009-05-12 20:01:46 +00:00
ca7ccbfa77 Merge from trunk
[SVN r52935]
2009-05-12 11:27:19 +00:00
3911d7a669 Add acknowledgments
[SVN r52934]
2009-05-12 11:05:39 +00:00
23850d984a Yet another attempt to fix #2687
[SVN r52411]
2009-04-16 02:12:14 +00:00
da8fe765fd suppressed spurious MSVC warning
[SVN r52371]
2009-04-13 15:32:42 +00:00
65a58553fb Merge quickbook and hash changelogs. Tweak gcc detection in container_fwd.hpp
Merged revisions 52084,52245-52246,52304,52320,52323 via svnmerge from 
https://svn.boost.org/svn/boost/trunk

........
  r52084 | danieljames | 2009-03-31 20:43:58 +0100 (Tue, 31 Mar 2009) | 1 line
  
  Changelog for unordered and hash.
........
  r52245 | danieljames | 2009-04-08 06:51:31 +0100 (Wed, 08 Apr 2009) | 5 lines
  
  Detect gcc stdlib for gcc 4.0.1.
  
  For some reason the normal macros aren't defined for the standard
  library that comes with gcc 4.0.1 (although maybe just on BSDs?). So try
  to detect the library for that compiler.
........
  r52246 | danieljames | 2009-04-08 11:56:22 +0100 (Wed, 08 Apr 2009) | 7 lines
  
  Include <utility> for some versions of gcc's library.
  
  Sometimes gcc's <cstddef> doesn't define the C++ macros, so check for it
  and include <utility> in that case. Also remove a workaround from
  container_fwd.hpp
  
  Fixes #2924.
........
  r52304 | danieljames | 2009-04-10 20:25:32 +0100 (Fri, 10 Apr 2009) | 4 lines
  
  Don't use debug containers on darwin.
  
  I'm getting errors from the darwin 4.2 debug containers which appear to
  a problem with its implementation.
........
  r52320 | danieljames | 2009-04-11 08:53:59 +0100 (Sat, 11 Apr 2009) | 1 line
  
  Don't need to include utility now that select_stdlib has been fixed.
........
  r52323 | danieljames | 2009-04-11 09:26:20 +0100 (Sat, 11 Apr 2009) | 1 line
  
  Also don't need to check for _GLIBCXX_CSTDDEF.
........


[SVN r52324]
2009-04-11 08:49:33 +00:00
d425f1e5bf Include <utility> for some versions of gcc's library.
Sometimes gcc's <cstddef> doesn't define the C++ macros, so check for it
and include <utility> in that case. Also remove a workaround from
container_fwd.hpp

Fixes #2924.

[SVN r52246]
2009-04-08 10:56:22 +00:00
3178938f98 Detect gcc stdlib for gcc 4.0.1.
For some reason the normal macros aren't defined for the standard
library that comes with gcc 4.0.1 (although maybe just on BSDs?). So try
to detect the library for that compiler.

[SVN r52245]
2009-04-08 05:51:31 +00:00
0d006f2718 Merge [51976] to release.
[SVN r52015]
2009-03-27 13:04:22 +00:00
de4c1b2e9d Add BOOST_TEST_EQ.
[SVN r51976]
2009-03-26 00:03:45 +00:00
770e33343a System, Filesystem: remove boost/detail/test_framework.hpp; use boost/detail/lightweight_test.hpp instead (Thanks to Peter Dimov for pointing this out)
[SVN r51966]
2009-03-25 12:11:47 +00:00
a63bc49cfb Initial commit
[SVN r51958]
2009-03-24 15:28:27 +00:00
472ca5d636 Initial commit.
[SVN r51715]
2009-03-11 20:19:27 +00:00
1df6d3e0e2 Merge [51509], [51519] to release. Closes #2239.
[SVN r51531]
2009-03-02 16:22:16 +00:00
1588a4a05f Move smart_ptr into boost/smart_ptr/*.hpp (refs #2239).
[SVN r51509]
2009-03-01 16:00:42 +00:00
aaf3c4ac98 Add missing semicolon
[SVN r50920]
2009-01-31 02:47:48 +00:00
816cad7bd8 Fix BOOST_NO_STDC_NAMESPACE problem; see ticket 2687
[SVN r50844]
2009-01-28 14:38:48 +00:00
9d2dd3f219 merge of cmake build files from trunk per beman
[SVN r50756]
2009-01-24 18:57:20 +00:00
c0fb2515b0 Merge from trunk
[SVN r50676]
2009-01-19 18:56:42 +00:00
d2ce3c5791 Add Blackfin support to fix #2663
[SVN r50675]
2009-01-19 18:52:23 +00:00
f8ffc48c7e Merged revisions 49661-49662,49666,49669,49735,49756,49770,49811 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r49661 | danieljames | 2008-11-09 12:03:45 +0000 (Sun, 09 Nov 2008) | 1 line
  
  Move hash detail headers out of boost/functional/detail.
........
  r49662 | danieljames | 2008-11-09 12:11:50 +0000 (Sun, 09 Nov 2008) | 1 line
  
  Add a forwarding header for container_fwd.hpp
........
  r49666 | danieljames | 2008-11-09 19:12:05 +0000 (Sun, 09 Nov 2008) | 1 line
  
  Avoid comparing default initialised iterators in position_iterator.
........
  r49669 | danieljames | 2008-11-09 21:57:38 +0000 (Sun, 09 Nov 2008) | 2 lines
  
  Add link to the header to the synopsis in reference documentation.
  Refs #2214
........
  r49735 | danieljames | 2008-11-14 12:51:00 +0000 (Fri, 14 Nov 2008) | 1 line
  
  Explicitly specify the template parameters in the unordered container friend, in order to avoid some warnings.
........
  r49756 | danieljames | 2008-11-14 16:11:16 +0000 (Fri, 14 Nov 2008) | 1 line
  
  Use pragmas to suppress a Visual C++ warning.
........
  r49770 | danieljames | 2008-11-15 13:07:29 +0000 (Sat, 15 Nov 2008) | 1 line
  
  Use the new swap library.
........
  r49811 | danieljames | 2008-11-16 23:10:00 +0000 (Sun, 16 Nov 2008) | 1 line
  
  Fix a typo.
........


[SVN r49855]
2008-11-20 22:53:20 +00:00
120abc637c Add a forwarding header for container_fwd.hpp
[SVN r49662]
2008-11-09 12:11:50 +00:00
34684d4df2 Move hash detail headers out of boost/functional/detail.
[SVN r49661]
2008-11-09 12:03:45 +00:00
20ab8a4e7d Continuing merge of CMake build system files into trunk with the encouragement of Doug Gregor
[SVN r49510]
2008-11-01 13:15:41 +00:00
c6024a4ac4 include header which includes "size_t"
[SVN r49298]
2008-10-12 19:49:05 +00:00
da0f568852 added workaround for http://bugs.sun.com/view_bug.do?bug_id=6757317 , also discussed at http://lists.boost.org/boost-users/2008/10/41154.php
[SVN r49289]
2008-10-12 13:06:22 +00:00
20c35502cb Merged revisions 43283,43992,44388 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r43283 | bemandawes | 2008-02-16 18:01:32 -0800 (Sat, 16 Feb 2008) | 1 line
  
  Show output of example program
........
  r43992 | marshall | 2008-04-01 18:42:32 -0700 (Tue, 01 Apr 2008) | 1 line
  
  Replaced all occurrences of non-ASCII copyright symbol with '(c)' for people using non-ASCII code pages
........
  r44388 | grafik | 2008-04-13 16:55:58 -0700 (Sun, 13 Apr 2008) | 1 line
  
  Move tokenizer tests into canonical test subdir structure.
........


[SVN r49216]
2008-10-09 18:05:35 +00:00
4ae97fa5cb boost/pending/: ported revision 48251 ("integer_log2.hpp and lowest_bit.hpp, in boost/pending/: little comment cleanup (svn anchors, etc.); added a static_cast<> to silence (harmless) MSVC++ warnings") from trunk
[SVN r48353]
2008-08-24 18:16:24 +00:00
18dbae4700 integer_log2.hpp and lowest_bit.hpp, in boost/pending/: little comment cleanup (svn anchors, etc.); added a static_cast<> to silence (harmless) MSVC++ warnings
[SVN r48251]
2008-08-20 11:06:23 +00:00
b328080dbb Merged 44595, 44638, 44707, 44711, 44728 from trunk to release
[SVN r47341]
2008-07-12 10:41:24 +00:00
a6af6ca66f Merged 43316, 43317, 43318, 43733, 43782, 43873, 43888, 43916, 43950, 44055, 44056, 44058, 44073, 44074, 44132, 44137, 44138, 44140, 44344 from trunk to release
[SVN r47339]
2008-07-12 09:55:08 +00:00
df8aaff6da merged up to rev. 47041 from trunk
[SVN r47045]
2008-07-03 16:51:53 +00:00
06946f6607 Boost 1.36 version of Boost.MultiIndex
passim: supressed non-ASCII chars in C++ code
bidir_node_iterator.hpp: deleted unused template parameter
bucket_array.hpp: avoided allocator<void> instantiations
hash_index_iterator.hpp: avoided allocator<void> instantiations
hash_index_node.hpp: avoided allocator<void> instantiations, renamed var
ord_index_node.hpp: avoided allocator<void> instantiations
rnd_index_loader.hpp: avoided allocator<void> instantiations
rnd_index_node.hpp: avoided allocator<void> instantiations
rnd_index_ptr_array.hpp: avoided allocator<void> instantiations
rnd_node_iterator.hpp: deleted unused template parameter
seq_index_node.hpp: avoided allocator<void> instantiations
hashed_index.hpp: rewritten modify_ so that elements with unmodified key do not change position
multi_index_container.hpp: added allocator ctor
acknowledgements.html: added acknowledgements for Boost 1.36
compiler_specifics.html: typo
hash_indices.html: documented updating functions behavior wrt unmodified keys, formatting typos
key_extraction.html: formatting typos
multi_index_container.html: added allocator ctor, formatting typos
ord_indices.html: documented updating functions behavior wrt unmodified keys, formatting typos
rnd_indices.html: formatting typos
seq_indices.html: formatting typos
release_notes.html: added release notes for Boost 1.36
hashed.cpp: blocked Boost inspect tool check for ASCII only chars
non_std_allocator.hpp: removed void specialization to verify that no allocator<void> instantiations are generated
test_copy_assignment.cpp: added test for multi_index_container allocator ctor
test_update.cpp: added test for stability of update functions wrt to unmodified keys

[SVN r46770]
2008-06-27 13:32:24 +00:00
3c2c779258 simplified namespace issue with mbstate_t
[SVN r46408]
2008-06-15 17:01:43 +00:00
7c911e570f modification to correct error detected on stdxxx tests
[SVN r46392]
2008-06-14 17:46:41 +00:00
96b53f28a8 silenced warning about comma operator (C4913) for VC 8-9 with warning level 4
[SVN r45754]
2008-05-25 23:36:55 +00:00
7e259580c1 Apply NetBSD fix from issue #1922.
[SVN r45608]
2008-05-21 15:39:41 +00:00
3d539b76df Factored out boost/detail/lightweight_thread.hpp.
[SVN r44638]
2008-04-20 15:37:08 +00:00
e4054d843a spinlock_nt.hpp added, Cygwin fixes.
[SVN r44055]
2008-04-05 15:06:31 +00:00
9dcdea9efc Replaced all occurrences of non-ASCII copyright symbol with '(c)' for people using non-ASCII code pages
[SVN r43992]
2008-04-02 01:42:32 +00:00
680e819cf3 Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41370]
2007-11-25 18:38:02 +00:00
22520394e4 Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41369]
2007-11-25 18:07:19 +00:00
9469ab6c88 config, detail, filesystem, system, tools, at 41278.
[SVN r41316]
2007-11-23 17:03:14 +00:00
715c05005f Added changes from David Deakins to enable compilation on Windows CE
[SVN r40679]
2007-11-02 09:17:02 +00:00
6443246b4b Boost 1.35 version of Boost.MultiIndex
allocator_utilities.hpp: added partial_std_allocator_wrapper::value_type
composite_key.hpp: used hash_fwd.hpp
auto_space.hpp: added support for non-standard allocators
bidir_node_iterator.hpp: moved friend-injected operators out of class
copy_map.hpp: added support for non-standard allocators
hash_index_args.hpp: removed deprecated use of <boost/functional/hash/hash.hpp>
hash_index_iterator.hpp: moved friend-injected operators our of class
hash_index_node.hpp: added support for non-standard allocators
header_holder.hpp:added support for non-standard allocators
index_base.hpp: added support for non-standard allocators, added modify_rollback, added small improvement to modify
index_loader.hpp: added support for non-standard allocators
index_matcher.hpp: added support for non-standard allocators
index_node_base.hpp: added support for non-standard allocators
iter_adaptor.hpp: added some out-of-class operators to alleviate a MSVC++ 6.0 problem
modify_key_adaptor.hpp: renamed some vars to accomudate broader usage scope
node_type.hpp: added support for non-standard allocators
ord_index_node.hpp: added support for non-standard allocators
ord_index_ops.hpp: implemented a more efficient equal_range
rnd_index_loader.hpp: added support for non-standard allocators
rnd_index_node.hpp: added support for non-standard allocators
rnd_index_ops.hpp: added support for non-standard allocators
rnd_index_ptr_array.hpp: added support for non-standard allocators
rnd_node_iterator.hpp: moved friend-injected operators out of class
seq_index_node.hpp: added support for non-standard allocators
seq_index_ops.hpp: added support for non-standard allocators
uintptr_type.hpp: added support for __int64
unbounded.hpp: fixed ODR problem
value_compare.hpp: fixed a small unefficiency
global_fun: initial commit
hashed_index.hpp: added support for non-standard allocators, added c[r]{begin|end}, [local_]iterator_to, rollback modify
identity_fwd.hpp: fixed wrong include guard name
key_extractors.hpp: added global_fun
mem_fun.hpp: removed superfluous =0's
ordered_index.hpp: added support for non-standard allocators, added c[r]{begin|end}, iterator_to, rollback modify, improved equal_range and range, added conformance to DR 233
random_access_index.hpp: added support for non-standard allocators, added c[r]{begin|end}, iterator_to, rollback modify, added conformance to 23.1.1/9
sequenced_index.hpp: added support for non-standard allocators, added c[r]{begin|end}, iterator_to, rollback modify, added conformance to 23.1.1/9, improved resize
multi_index_container.hpp: added support for non-standard allocators, improved ctor_args_list, rollback modify
acknowledgements.html: added entry for Boost 1.35
examples.html: renamed example 2, added B.IP example/composite_keys.cpp
future_work.html: removed entry on bimap
hash_indices.html: added c[r]{begin|end}, [local_]iterator_to, rollback modify
reference/index.html: added global_fun
reference/key_extraction.html: added global_fun, added technical correction
multi_index_container.html: added support for non-standard allocators
ord_indices.html: added c[r]{begin|end}, iterator_to, rollback modify
rnd_indices.html: added c[r]{begin|end}, iterator_to, rollback modify
seq_indices.html: added c[r]{begin|end}, iterator_to, rollback modify
release_notes.html: added entry for Boost 1.35
tests.html: added new serialization test file
basics.html: added rollback modify
creation.html: added support for non-standard allocators
tutorial/indices.html: added iterator_to
tutorial/key_extraction.html: added global_fun
composite_keys.cpp: fixed technicality
fun_key.cpp: was memfun_key.cpp, added global_fun
ip_allocator.cpp: initial commit
example/Jamfile.v2: renamed memfun_key, added ip_allocator
test_perf.cpp: fixed technicality
employee.hpp: used a non-standard allocator
test/Jamfile.v2: added new test file
non_std_allocator.hpp: initial commit
pair_of_ints.hpp: added decrement facilities
test_capacity.cpp: added extra check on resize
test_copy_assignment.cpp: added test for 23.1.1/9
test_iterators.cpp: added tests for c[r]{begin|end} and [local_]iterator_to, fixed technicality
test_key_extractors.cpp: added tests for global_fun
test_modifiers.cpp: added tests dor DR 233, fixed technicality
test_range.cpp: added extra checks to secure range refactoring
test_rearrange.cpp: fixed technicality
test_serialization.cpp: added new test file
test_serialization1.cpp: corrected include, used a non-standard allocator
test_serialization2.cpp: corrected include, used a non-standard allocator, split some stuff ro test_serialization3.cpp
test_serialization3.cpp: initial commit
test_serialization3.hpp: initial commit
test_serialization_template.hpp: removed some reliance on ADL
test_update.cpp: addes tests for rollback modify, fixed technicality

[SVN r39922]
2007-10-11 10:57:30 +00:00
8da5b03c03 Starting point for releases
[SVN r39706]
2007-10-05 14:25:06 +00:00
82bda71faa Clear compiler warnings
[SVN r39520]
2007-09-25 13:45:52 +00:00
49858c1ac4 This commit was manufactured by cvs2svn to create tag
'Version_1_34_1'.

[SVN r38286]
2007-07-24 19:28:14 +00:00
1da5dd89a8 Corrected wrong order in copyright notices.
[SVN r36240]
2006-12-02 10:04:37 +00:00
ec6dfefa6e Corrected wrong order in copyright notices.
[SVN r36240]
2006-12-02 10:04:37 +00:00
1df1d181c0 Merged a copyright addition from trunk to branch.
[SVN r36231]
2006-12-01 14:28:43 +00:00
57fd51f8f4 Added Caleb as copyright owner.
[SVN r36230]
2006-12-01 14:27:03 +00:00
dc34adabef Merged L & C issue fixes from trunk to branch.
[SVN r36225]
2006-12-01 11:34:43 +00:00
60e5d575c0 Fixed license & copyright issues.
[SVN r36224]
2006-12-01 10:29:49 +00:00
87ff652a07 move to namespace detail
[SVN r36027]
2006-11-13 22:10:57 +00:00
a548ecc968 Replaced the implementation of ct_if with a facade implementation that
defers to Boost.MPL.


[SVN r36022]
2006-11-13 15:35:54 +00:00
4e009de1ec Bring into compliance with N2066, TR2 Diagnostics Enhancements. Tests passing on Win32, Linux, on most modern compilers.
[SVN r35823]
2006-11-03 16:57:30 +00:00
8aebcc4fbd Updated patch from Boris Gubenko.
[SVN r35672]
2006-10-20 10:08:21 +00:00
751e863564 Updated patch from Boris Gubenko.
[SVN r35672]
2006-10-20 10:08:21 +00:00
2551c9baf0 Fix for HP-UX on Itanium.
[SVN r35591]
2006-10-13 17:08:47 +00:00
62b7d277f2 Fix for HP-UX on Itanium.
[SVN r35591]
2006-10-13 17:08:47 +00:00
71ec49242e Added 64-bit Intel processor support.
[SVN r35587]
2006-10-13 12:40:40 +00:00
7106b3c8b1 Added 64-bit Intel processor support.
[SVN r35587]
2006-10-13 12:40:40 +00:00
0dc54e7b18 Kill off stray 'y' character.
[SVN r35530]
2006-10-09 12:29:34 +00:00
cd03e4d537 Fix typos.
[SVN r35505]
2006-10-06 15:45:41 +00:00
4039b44fce Fix typos.
[SVN r35503]
2006-10-06 15:22:30 +00:00
afbb75b3cb Make is_reference_to_pointer work properly with an abstract class
[SVN r35498]
2006-10-05 13:51:07 +00:00
2f7218cdc4 Make is_reference_to_pointer work properly with an abstract class
[SVN r35498]
2006-10-05 13:51:07 +00:00
e2bea194a3 use <assert.h>; include <climits> for Borland only
[SVN r34906]
2006-08-19 11:05:56 +00:00
72a38b9137 identification
[SVN r34905]
2006-08-19 11:04:25 +00:00
37cd3c6dd2 Windows CE patch by Michael Fink
[SVN r33986]
2006-05-17 22:33:47 +00:00
e71cca99a6 Windows CE patch by Michael Fink
[SVN r33986]
2006-05-17 22:33:47 +00:00
d2e2b59111 *** empty log message ***
[SVN r33878]
2006-04-30 23:56:35 +00:00
71a268689d merged from trunk
[SVN r33868]
2006-04-30 03:05:01 +00:00
7d61e78d56 Keep bool_trait_def.hpp as the last #include; add bool_trait_undef.hpp at the end.
[SVN r33867]
2006-04-30 03:04:18 +00:00
4dda81e93a This commit was manufactured by cvs2svn to create branch 'RC_1_34_0'.
[SVN r33417]
2006-03-21 02:26:31 +00:00
c749e63ff2 Win32 implementation of boost::timed_mutex
[SVN r33272]
2006-03-08 22:24:52 +00:00
bbd4cb3de1 Patch for Borland 2006 compiler, using Dinkumware libraries
[SVN r33094]
2006-02-23 21:04:21 +00:00
3417f92b35 trivial adjustments to enable warning-free compilation with gcc -Wall -W -Werror
[SVN r32364]
2006-01-20 16:53:30 +00:00
5f033da80e Fixed a couple of syntax errors (reported by Juergen Hunold)
[SVN r31946]
2005-12-07 20:41:11 +00:00
6dd212ccf7 Fixed bug #1370716, static shared_ptr instances not working w/ quick_allocator
[SVN r31931]
2005-12-06 12:24:40 +00:00
9d5b0d7c0c Added more relational operators, see Bug #1191356.
[SVN r31783]
2005-11-26 05:50:55 +00:00
83ada0473d GCC 4.0.2 workarounds
[SVN r31295]
2005-10-11 23:43:44 +00:00
36be4e716a Martin Wille pointed out some missing header dependencies; fixed.
Also moved boost/python/detail/is_xxx.hpp functionality into
boost/detail/is_xxx.hpp to decouple library dependencies between
python and parameter.


[SVN r31290]
2005-10-11 21:20:06 +00:00
3f8f91f7c7 reverted recent changes
[SVN r31255]
2005-10-10 00:18:38 +00:00
ae07663830 first try at fixing is_incrementable for gcc 4.0.2
[SVN r31240]
2005-10-08 16:04:39 +00:00
d63b0de6f9 Moved BOOST_INTERLOCKED_READ stuff into its own header
[SVN r31098]
2005-09-23 17:24:29 +00:00
480b611fd2 Removed :: qualification on _Interlocked functions
[SVN r31097]
2005-09-23 16:56:09 +00:00
c07f135aa9 Added BOOST_INTERLOCKED_EXCHANGE_POINTER in all branches of the #if
[SVN r31012]
2005-09-16 14:05:33 +00:00
0244c5a647 Added InterlockedExchangePointer
[SVN r31010]
2005-09-16 13:57:44 +00:00
33ff8d33be InterlockedCompareExchangePointer is only intrinsic on 64 bit platforms, otherwise it's just a synonym for
InterlockedCompareExchange


[SVN r30951]
2005-09-13 14:19:46 +00:00
ae50e20366 Added interlocked compare/exchange for pointers, and interlocked_read for values and pointers
[SVN r30941]
2005-09-13 09:37:02 +00:00
be9a4c47d4 New version of call_once for win32
[SVN r30847]
2005-09-07 15:02:16 +00:00
eb8fdcdc91 Add detection for macros used by VC:
_M_IX86; little-endian.
_M_IA64; little-endian, as this is the default on I64 and AMD64 is only little endian.
_M_ALPHA; little-endian, as again it's the default and Windows doesn't run on big-endian Alpha anyway AFAIK.


[SVN r30185]
2005-07-19 23:44:52 +00:00
0fee73977c Fix max
[SVN r30051]
2005-07-13 15:39:56 +00:00
2fc38490db Make some of these things into true metafunctions.
[SVN r29776]
2005-06-24 15:04:30 +00:00
09f98c5132 Machine endianness detection taken from <boost/detail/limits.hpp>
[SVN r29573]
2005-06-14 22:19:20 +00:00
e6ddc5ae0f Workarounds for vc6 and 7.
[SVN r28958]
2005-05-16 14:54:12 +00:00
1a9a83f0fb Link to documentation added.
[SVN r27745]
2005-03-20 14:53:58 +00:00
17dcac2940 <intrin.h> appears broken.
[SVN r27737]
2005-03-18 18:23:59 +00:00
17df7b5b7e Split sp_counted_base into no threads (nt), win32 lock-free (w32) and pthreads (pt)
[SVN r27729]
2005-03-18 01:27:11 +00:00
30f03c5423 modifications to accomodate stlport and dinkumware
[SVN r27451]
2005-02-20 22:19:09 +00:00
24b07509e6 use utf8_codecvt_facet.hpp in detail directory
[SVN r27445]
2005-02-20 22:09:16 +00:00
1b622c7926 Previous VC6 fix broke Borland 5.5.1, using fully qualified names fixes the problem.
[SVN r27308]
2005-02-10 12:54:30 +00:00
c986fa4341 fixes for VC6
[SVN r27124]
2005-02-04 22:08:38 +00:00
95b138ec61 Bring type traits into line with TR1
[SVN r26937]
2005-01-30 15:47:46 +00:00
a210e0e5c5 missing partial_std_allocator_wrapper ctor, fix by Daniel James
[SVN r26831]
2005-01-24 07:36:47 +00:00
63a3c4ccf5 Merge the utf8 workaround in program_options and serialization and
put the result to boost/detail and libs/detail.


[SVN r26758]
2005-01-20 08:49:13 +00:00
fa65f4e34c Removed an instance of metafunction forwarding for Borland 5.x
[SVN r26489]
2004-12-13 04:58:28 +00:00
fd06013885 added copyrights
[SVN r25809]
2004-10-20 13:07:46 +00:00
5fcbfdf2f8 Changed files to BSL based on permissions in blanket-permission.txt
[SVN r25451]
2004-09-28 12:55:45 +00:00
4ce66b8475 Move indirect_traits to boost/detail
[SVN r25117]
2004-09-15 15:00:12 +00:00
c2286bbe08 Partial conversion to the BSL
[SVN r25080]
2004-09-14 11:55:22 +00:00
d67afd0e09 Bug fix from Marvin H. Sielenkemper - sielenk-at-sf.net
[SVN r24891]
2004-09-03 15:41:08 +00:00
b2deb5ac68 merge new MPL version from 'mplbook' branch
[SVN r24874]
2004-09-02 15:41:37 +00:00
badda17c31 adjustment for some stlports
[SVN r24715]
2004-08-24 15:12:29 +00:00
d29b455f5f Converted files to the BSL.
[SVN r24614]
2004-08-20 11:10:24 +00:00
63f45069bf fix to accomodate non-standard libraries
[SVN r24485]
2004-08-15 14:57:50 +00:00
aacb844c52 Moved to BSL
[SVN r24446]
2004-08-12 17:13:07 +00:00
7549efc2d2 adjustment for CW
[SVN r24439]
2004-08-12 16:07:34 +00:00
da6391feb5 Name lookup fix for CW
[SVN r24300]
2004-08-05 10:52:25 +00:00
6a549bcd7f Change the signature of codecvt do_length to match standard. This removes hiden virtual warnings.
[SVN r24243]
2004-08-02 03:38:04 +00:00
5f4cc5ca82 Converted to Boost Software License, Version 1.0
[SVN r24055]
2004-07-26 00:32:12 +00:00
3290f6e5fe Remove tabs in file.
[SVN r24043]
2004-07-25 17:12:17 +00:00
c8c6bddd62 Licence update
[SVN r24031]
2004-07-25 12:01:00 +00:00
76670d1ce3 License update
[SVN r24030]
2004-07-25 11:59:12 +00:00
5f27fcac04 Doug Gregor -> Douglas Gregor
[SVN r24016]
2004-07-25 02:29:29 +00:00
7034cf32d1 platform adjustments
[SVN r24003]
2004-07-23 20:53:37 +00:00
3945fb176a tab fix
[SVN r23961]
2004-07-22 15:53:41 +00:00
df9d96054c correct error for intel compiler
[SVN r23960]
2004-07-22 15:50:16 +00:00
40a44d6810 cleanup and improved portability
[SVN r23850]
2004-07-20 20:41:19 +00:00
b6dee6532e Fixed postfix increment for incrementable and single-pass iterator facade
[SVN r23456]
2004-07-12 03:18:49 +00:00
700efc2873 initial checkin
[SVN r23434]
2004-07-11 01:26:33 +00:00
ec1d526862 stricter check in is_partial_std_allocator
[SVN r23067]
2004-06-09 13:58:56 +00:00
f20d50a741 renamed to allocator_utilities.hpp
[SVN r23061]
2004-06-09 10:18:28 +00:00
165c7e29fa was allocator.hpp
[SVN r23060]
2004-06-09 10:17:41 +00:00
acea9bf9fa fixed include guard clash with boost/regex/config/allocator.hpp
[SVN r23006]
2004-06-02 15:54:10 +00:00
fc82a4b926 moved from boost/multi_index/detail
[SVN r23004]
2004-06-02 14:35:30 +00:00
fefc312df8 Moved detail/allocator.hpp into regex directory.
[SVN r22967]
2004-05-28 12:21:44 +00:00
42bfb20e4b new license reference
[SVN r22834]
2004-05-16 09:17:55 +00:00
19cd8815b6 added Borland workaround
[SVN r22770]
2004-05-09 08:58:03 +00:00
a00196977f initial commit
[SVN r22759]
2004-05-07 10:44:23 +00:00
5f07eb294f new file (needed by dynamic_bitset)
[SVN r22651]
2004-04-18 09:15:08 +00:00
2fe7fd95d2 Kill off outer cv-stripping of Dereferenceable
[SVN r21696]
2004-01-13 19:18:42 +00:00
0096bf2291 Updated pointee and indirect_reference so that pointee represents the
immutability of the pointed-to type via const qualification.  The
pointee of a proxy-based iterator will be const qualified unless a
mutable reference to the value_type can be bound to the returned
proxy.

Added a test for pointee

Fixed iterator_facade so operator[] result type computation didn't
cause a problem with abstract types.

Updated iterator_facade operator[] docs for accuracy.

Allowed Borland to simply fail the indirect_iterator_member_types test
because of its lame const-dropping, instead of trying to work around
it.


[SVN r21579]
2004-01-11 00:03:09 +00:00
9ab05a600a Added traits:
is_incrementable.hpp: checks whether ++x is well-formed

   pointee.hpp: value_type of iterators or smart pointers

   indirect_reference.hpp: reference type of iterators or smart pointers

indirect_iterator.hpp
indirect_iterator_member_types.cpp

   Use pointee/indirect_reference to select value/reference type.

iterator_concepts.hpp: Fixed interoperable test.  Hardly tests enough, but it's a start

minimum_category.hpp: Better error messages for vc6

indirect_iterator_test.cpp: Workarounds for compilers without SFINAE

static_assert_same.hpp: Informative error reports; added a macro.

zip_iterator_test.hpp: Added missing #include

Jamfile: made zip_iterator test pass with vc6/stlport


[SVN r21514]
2004-01-06 17:35:36 +00:00
1fbad0fe2c Added missing <assert.h> include.
[SVN r21417]
2003-12-29 13:42:25 +00:00
1fa91744d4 _MSC_VER use clarified.
[SVN r20992]
2003-11-28 15:35:21 +00:00
8715141657 Renamed boost::empty to boost::blank.
[SVN r20676]
2003-11-05 02:35:12 +00:00
d562044910 Handle non-lvalue iterators properly
[SVN r20585]
2003-11-02 05:37:38 +00:00
187c393d0c Updated licence
[SVN r20321]
2003-10-09 10:18:17 +00:00
61ab827c49 Boost.Signals now uses the official Boost license
[SVN r20236]
2003-10-01 04:34:38 +00:00
9223a385a6 Bugfix from Thorsten Ottosen <nesotto-at-cs.auc.dk>
[SVN r20187]
2003-09-25 19:30:53 +00:00
f7d6abb21e Removed unnecessary workaround.
[SVN r20055]
2003-09-14 20:39:21 +00:00
b2de7f6888 Minor fix.
[SVN r20043]
2003-09-13 21:01:44 +00:00
5d116e0057 Change license message to reference Boost Software License
[SVN r20038]
2003-09-12 17:09:29 +00:00
d536934458 Added nested typedefs in iterator_traits<int> for ETI cutoff
[SVN r19920]
2003-09-04 21:14:27 +00:00
4cbe12240a Removed inappropriate has_nothrow_constructor specialization.
[SVN r19895]
2003-09-01 07:52:51 +00:00
190b0bf58b Added type_traits specializations.
[SVN r19894]
2003-09-01 07:51:13 +00:00
463f382482 Moved reference_content to boost/detail from variant/detail.
[SVN r19884]
2003-08-31 01:59:15 +00:00
b3edcaebb3 Remove flotsam #includes
[SVN r19855]
2003-08-29 12:12:08 +00:00
665f18d2b7 Removed code-breaking change from boost/detail/iterator.hpp and
corresponding workarounds from tests.

Added permutation_iterator_test to the suite after fixing it up -- it
was riddled with bugs!


[SVN r19841]
2003-08-28 20:18:51 +00:00
092c5f5b52 Moved to much cleaner system of using BOOST_TT_BROKEN_COMPILER_SPEC
for handling vc6/7 deficiencies with iterator_traits.

Fixed a bug in iterator_facade which was causing incomplete types to
be passed through is_convertible.

Reinstated libs/utility/iterator_traits_test.cpp


[SVN r19840]
2003-08-28 16:52:02 +00:00
f980329354 Use BOOST_NO_STD_LOCALE to detect when needed.
[SVN r19331]
2003-07-28 14:22:47 +00:00
ac460707c9 Added BOOST_TEMPLATED_STREAM_* helper macros.
[SVN r19312]
2003-07-26 04:26:58 +00:00
7e4ad9c654 added needed include of <new>
[SVN r18949]
2003-07-06 10:52:06 +00:00
11adf72ff6 -Wundef fixes.
[SVN r18788]
2003-06-12 17:09:24 +00:00
7a092ba5f9 Added tentative fix for sunpro
[SVN r18595]
2003-05-29 11:18:35 +00:00
ab34b61206 removed superfluous spaces
[SVN r18271]
2003-04-16 22:55:23 +00:00
b0b37ef724 "envelope" for non-type template parameters (useful to workaround compiler bugs)
[SVN r18270]
2003-04-16 22:51:39 +00:00
69c7068028 Small changes to support new iterator adaptors in sandbox
[SVN r18212]
2003-04-09 11:57:59 +00:00
124be84389 Fixes for Comeau with Borland as backend.
[SVN r17588]
2003-02-22 13:40:23 +00:00
0caf4bb53e Made the default page size 512 (g++ 2.96 on Red Hat 7.2 dislikes 496.)
[SVN r17272]
2003-02-07 19:06:28 +00:00
7f668adbcd Added BOOST_QA_PAGE_SIZE.
[SVN r17270]
2003-02-07 18:43:48 +00:00
d6fbac9ba7 Quick_allocator updates.
[SVN r17267]
2003-02-07 15:08:52 +00:00
8f71074339 Dave's quick_allocator added, #define BOOST_SP_USE_QUICK_ALLOCATOR to make shared_ptr use it.
[SVN r17087]
2003-01-30 14:20:22 +00:00
1f52127735 Fixed macro usage
[SVN r16752]
2003-01-05 12:12:39 +00:00
48507564a9 add or update See www.boost.org comments
[SVN r16708]
2002-12-27 16:51:53 +00:00
8d549f45fd Workarounds for broken RogueWave lib that comes with Sun
[SVN r16509]
2002-12-04 15:52:33 +00:00
c1f144e5d4 Major changes to shared_ptr and weak_ptr
[SVN r16314]
2002-11-18 14:37:02 +00:00
53ba30e0c9 add missing #include
[SVN r16171]
2002-11-09 02:39:38 +00:00
9aead1823b More fixes, better error messages, etc.
[SVN r16170]
2002-11-09 02:37:54 +00:00
c14ee17601 Final patches for MSVC6
[SVN r16166]
2002-11-08 17:23:06 +00:00
2bca71488b Works with MSVC and Intel5 now. Thanks, Aleksey!!
[SVN r16165]
2002-11-08 17:08:17 +00:00
1f335d30ba Cleanups on boost::iterator_traits<>
Broke MSVC though :(


[SVN r16157]
2002-11-08 06:57:31 +00:00
a38297a6cc Borland fix
[SVN r15360]
2002-09-16 04:10:29 +00:00
72ca3d7d9f Switched to <boost/detail/lightweight_test.hpp> for testing.
[SVN r14932]
2002-08-16 16:41:16 +00:00
88 changed files with 5129 additions and 982 deletions

386
.travis.yml Normal file
View File

@ -0,0 +1,386 @@
# Copyright 2016, 2017, 2018 Peter Dimov
# Copyright 2019 Andrey Semashev
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
language: cpp
sudo: false
branches:
only:
- master
- develop
- /feature\/.*/
env:
matrix:
- BOGUS_JOB=true
matrix:
exclude:
- env: BOGUS_JOB=true
include:
# gcc, Linux
- os: linux
dist: trusty
compiler: gcc-4.4
env: TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98,0x
addons:
apt:
packages:
- g++-4.4
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: trusty
compiler: gcc-4.6
env: TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x
addons:
apt:
packages:
- g++-4.6
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: trusty
compiler: gcc-4.7
env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11
addons:
apt:
packages:
- g++-4.7
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: xenial
compiler: gcc-4.8
env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11
addons:
apt:
packages:
- g++-4.8
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: xenial
compiler: gcc-4.9
env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11
addons:
apt:
packages:
- g++-4.9
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: xenial
compiler: gcc-5
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- g++-5
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: xenial
compiler: gcc-6
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: xenial
compiler: gcc-7
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17
addons:
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: xenial
compiler: gcc-8
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17
addons:
apt:
packages:
- g++-8
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: bionic
compiler: gcc-9
env: TOOLSET=gcc COMPILER=g++-9 CXXSTD=03,11,14,17
addons:
apt:
packages:
- g++-9
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
- os: linux
dist: bionic
compiler: gcc-10
env: TOOLSET=gcc COMPILER=g++-10 CXXSTD=03,11,14,17,20
addons:
apt:
packages:
- g++-10
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
# clang, Linux
- os: linux
dist: trusty
compiler: clang-3.4
env: TOOLSET=clang COMPILER=clang++-3.4 CXXSTD=03,11
addons:
apt:
packages:
- clang-3.4
- libstdc++-4.9-dev
sources:
- ubuntu-toolchain-r-test
- sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.4 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
- os: linux
dist: trusty
compiler: clang-3.5
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- clang-3.5
- libstdc++-4.9-dev
sources:
- ubuntu-toolchain-r-test
- sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.5 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
- os: linux
dist: trusty
compiler: clang-3.6
env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- clang-3.6
- libstdc++-5-dev
sources:
- ubuntu-toolchain-r-test
- sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.6 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
- os: linux
dist: trusty
compiler: clang-3.7
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- clang-3.7
- libstdc++-5-dev
sources:
- ubuntu-toolchain-r-test
- sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.7 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
- os: linux
dist: xenial
compiler: clang-3.8
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- clang-3.8
- libstdc++-6-dev
sources:
- ubuntu-toolchain-r-test
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.8 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
- os: linux
dist: xenial
compiler: clang-3.9
env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- clang-3.9
- libstdc++-6-dev
sources:
- ubuntu-toolchain-r-test
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.9 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
- os: linux
dist: xenial
compiler: clang-4
env: TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- clang-4.0
- libstdc++-6-dev
sources:
- ubuntu-toolchain-r-test
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-4.0 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
- os: linux
dist: xenial
compiler: clang-5
env: TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- clang-5.0
- libstdc++-7-dev
sources:
- ubuntu-toolchain-r-test
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
- os: linux
dist: xenial
compiler: clang-6
env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,17
addons:
apt:
packages:
- clang-6.0
- libstdc++-8-dev
sources:
- ubuntu-toolchain-r-test
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
- os: linux
dist: xenial
compiler: clang-7
env: TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11,14,17
addons:
apt:
packages:
- clang-7
- libstdc++-8-dev
sources:
- ubuntu-toolchain-r-test
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
- os: linux
dist: xenial
compiler: clang-8
env: TOOLSET=clang COMPILER=clang++-8 CXXSTD=03,11,14,17
addons:
apt:
packages:
- clang-8
- libstdc++-8-dev
sources:
- ubuntu-toolchain-r-test
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
- os: linux
dist: xenial
compiler: clang-9
env: TOOLSET=clang COMPILER=clang++-9 CXXSTD=03,11,14,17
addons:
apt:
packages:
- clang-9
- libstdc++-9-dev
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
- os: linux
dist: xenial
compiler: clang-10
env: TOOLSET=clang COMPILER=clang++-10 CXXSTD=03,11,14,17,20
addons:
apt:
packages:
- clang-10
- libstdc++-9-dev
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
- os: linux
dist: xenial
compiler: clang-libc++
env: TOOLSET=clang COMPILER=clang++-10 CXXSTD=03,11,14,17,20 CXXFLAGS="-stdlib=libc++" LINKFLAGS="-stdlib=libc++"
addons:
apt:
packages:
- clang-10
- libc++-10-dev
- libc++abi-10-dev
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
# clang, OS X
# Disabled because OS X builds are slow on Travis CI
# - os: osx
# env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
# osx_image: xcode9.4
#
# - os: osx
# env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
# osx_image: xcode10.3
#
# - os: osx
# env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,17
# osx_image: xcode11.2
install:
- GIT_FETCH_JOBS=8
- BOOST_BRANCH=develop
- if [ "$TRAVIS_BRANCH" = "master" ]; then BOOST_BRANCH=master; fi
- cd ..
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule init tools/build
- git submodule init tools/boostdep
- git submodule init tools/boost_install
- git submodule init libs/headers
- git submodule init libs/config
- git submodule update --jobs $GIT_FETCH_JOBS
- cp -r $TRAVIS_BUILD_DIR/* libs/detail
- python tools/boostdep/depinst/depinst.py --git_args "--jobs $GIT_FETCH_JOBS" detail
- ./bootstrap.sh
- ./b2 headers
script:
- |-
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
- BUILD_JOBS=`(nproc || sysctl -n hw.ncpu) 2> /dev/null`
- ./b2 -j $BUILD_JOBS libs/detail/test toolset=$TOOLSET cxxstd=$CXXSTD ${CXXFLAGS:+cxxflags="$CXXFLAGS"} ${LINKFLAGS:+linkflags="$LINKFLAGS"}
notifications:
email:
on_success: always

25
CMakeLists.txt Normal file
View File

@ -0,0 +1,25 @@
# Copyright 2018 Peter Dimov
# Copyright 2018 Andrey Semashev
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
# Partial (add_subdirectory only) and experimental CMake support
# Subject to change; please do not rely on the contents of this file yet.
cmake_minimum_required(VERSION 3.5)
project(BoostDetail LANGUAGES CXX)
add_library(boost_detail INTERFACE)
add_library(Boost::detail ALIAS boost_detail)
target_include_directories(boost_detail INTERFACE include)
target_link_libraries(boost_detail
INTERFACE
Boost::config
Boost::core
Boost::preprocessor
Boost::static_assert
Boost::type_traits
)

36
doc/build.jam Normal file
View File

@ -0,0 +1,36 @@
# Copyright Rene Rivera 2016
# 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 ;
xml detail : detail.qbk ;
install images : [ glob $(BOOST_ROOT)/doc/src/images/*.png ] : <location>html/images ;
explicit images ;
install callouts : [ glob $(BOOST_ROOT)/doc/src/images/callouts/*.png ] : <location>html/images/callouts ;
explicit callouts ;
install css : [ glob $(BOOST_ROOT)/doc/src/*.css ] : <location>html ;
explicit css ;
boostbook standalone
:
detail
:
<xsl:param>boost.root=../../../..
<xsl:param>generate.section.toc.level=3
<xsl:param>chunk.section.depth=2
#<xsl:param>chunk.first.sections=1
<dependency>images
<dependency>callouts
<dependency>css
;
alias boostdoc ;
explicit boostdoc ;
alias boostrelease : standalone ;
explicit boostrelease ;

19
doc/detail.qbk Normal file
View File

@ -0,0 +1,19 @@
[article Detail
[quickbook 1.7]
[version 1.0]
[copyright 2016 Rene Rivera]
[purpose Internal support utilities for Boost C++ Libraries.]
[license
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])
]
[source-mode c++]
]
[section Introduction]
This library contains a set of header only utilities used internally by
Boost C++ Libraries to facilitate their implementation.
[endsect]

716
doc/html/boostbook.css Normal file
View File

@ -0,0 +1,716 @@
/*=============================================================================
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 */

275
doc/html/docutils.css Normal file
View File

@ -0,0 +1,275 @@
/*
:Author: David Goodger
:Contact: goodger@python.org
:Date: $Date$
:Revision: $Revision$
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin-left: 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left {
clear: left }
img.align-right {
clear: right }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font-family: serif ;
font-size: 100% }
pre.literal-block, pre.doctest-block {
margin-left: 2em ;
margin-right: 2em }
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }

BIN
doc/html/images/alert.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

BIN
doc/html/images/blank.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

BIN
doc/html/images/caution.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
doc/html/images/draft.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
doc/html/images/home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

BIN
doc/html/images/next.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
doc/html/images/note.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

BIN
doc/html/images/prev.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
doc/html/images/smiley.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 867 B

BIN
doc/html/images/tip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

BIN
doc/html/images/up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
doc/html/images/warning.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

56
doc/html/index.html Normal file
View File

@ -0,0 +1,56 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Detail 1.0</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Detail 1.0">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav"></div>
<div class="article">
<div class="titlepage">
<div>
<div><h2 class="title">
<a name="detail"></a>Detail 1.0</h2></div>
<div><p class="copyright">Copyright &#169; 2016 Rene Rivera</p></div>
<div><div class="legalnotice">
<a name="detail.legal"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></div>
</div>
<hr>
</div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl class="toc"><dt><span class="section"><a href="index.html#detail.introduction">Introduction</a></span></dt></dl>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="detail.introduction"></a><a class="link" href="index.html#detail.introduction" title="Introduction">Introduction</a>
</h2></div></div></div>
<p>
This library contains a set of header only utilities used internally by Boost
C++ Libraries to facilitate their implementation.
</p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: June 21, 2016 at 03:48:00 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
<div class="spirit-nav"></div>
</body>
</html>

23
doc/html/minimal.css Normal file
View File

@ -0,0 +1,23 @@
/*
<20> Copyright Beman Dawes, 2007
Distributed under the Boost Software License, Version 1.0.
See www.boost.org/LICENSE_1_0.txt
*/
body {
font-family: sans-serif;
margin: 1em;
max-width : 8.5in;
}
table { margin: 0.5em; }
pre { background-color:#D7EEFF }
ins { background-color:#A0FFA0 }
del { background-color:#FFA0A0 }
/*** end ***/

11
doc/html/reference.css Normal file
View File

@ -0,0 +1,11 @@
/*============================================================================
Copyright 2003-2004 Douglas Gregor
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)
============================================================================*/
PRE.synopsis {
background-color: #e0ffff;
border: thin solid blue;
padding: 1em
}

106
include/boost/blank.hpp Normal file
View File

@ -0,0 +1,106 @@
//-----------------------------------------------------------------------------
// boost blank.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003
// Eric Friedman
//
// 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_BLANK_HPP
#define BOOST_BLANK_HPP
#include "boost/blank_fwd.hpp"
#if !defined(BOOST_NO_IOSTREAM)
#include <iosfwd> // for std::basic_ostream forward declare
#include "boost/detail/templated_streams.hpp"
#endif // BOOST_NO_IOSTREAM
#include "boost/type_traits/integral_constant.hpp"
#include "boost/type_traits/is_empty.hpp"
#include "boost/type_traits/is_pod.hpp"
#include "boost/type_traits/is_stateless.hpp"
namespace boost {
struct blank
{
};
// type traits specializations
//
template <>
struct is_pod< blank >
: boost::true_type
{
};
template <>
struct is_empty< blank >
: boost::true_type
{
};
template <>
struct is_stateless< blank >
: boost::true_type
{
};
// relational operators
//
inline bool operator==(const blank&, const blank&)
{
return true;
}
inline bool operator<=(const blank&, const blank&)
{
return true;
}
inline bool operator>=(const blank&, const blank&)
{
return true;
}
inline bool operator!=(const blank&, const blank&)
{
return false;
}
inline bool operator<(const blank&, const blank&)
{
return false;
}
inline bool operator>(const blank&, const blank&)
{
return false;
}
// streaming support
//
#if !defined(BOOST_NO_IOSTREAM)
BOOST_TEMPLATED_STREAM_TEMPLATE(E,T)
inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<(
BOOST_TEMPLATED_STREAM(ostream, E,T)& out
, const blank&
)
{
// (output nothing)
return out;
}
#endif // BOOST_NO_IOSTREAM
} // namespace boost
#endif // BOOST_BLANK_HPP

View File

@ -0,0 +1,22 @@
//-----------------------------------------------------------------------------
// boost blank_fwd.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003
// Eric Friedman
//
// 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_BLANK_FWD_HPP
#define BOOST_BLANK_FWD_HPP
namespace boost {
struct blank;
} // namespace boost
#endif // BOOST_BLANK_FWD_HPP

View File

@ -1,11 +1,10 @@
// boost/cstdlib.hpp header ------------------------------------------------//
// (C) Copyright Beman Dawes 2001. Permission to copy, use, modify, sell
// and distribute this software is granted provided this copyright notice
// appears in all copies. This software is provided "as is" without express or
// implied warranty, and with no claim as to its suitability for any purpose.
// Copyright Beman Dawes 2001. 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)
// See http://www.boost.org for updates and documentation.
// See http://www.boost.org/libs/utility/cstdlib.html for documentation.
// Revision History
// 26 Feb 01 Initial version (Beman Dawes)

View File

@ -1,280 +0,0 @@
/*
*
* Copyright (c) 2001
* Dr John Maddock
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Dr John Maddock makes no representations
* about the suitability of this software for any purpose.
* It is provided "as is" without express or implied warranty.
*
*/
#ifndef BOOST_DETAIL_ALLOCATOR_HPP
#define BOOST_DETAIL_ALLOCATOR_HPP
#include <boost/config.hpp>
#include <cstdlib>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::ptrdiff_t;
using ::size_t;
}
#endif
// see if we have SGI alloc class:
#if defined(BOOST_NO_STD_ALLOCATOR) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) || defined(__GLIBCPP__) || defined(__STL_CONFIG_H))
# define BOOST_HAVE_SGI_ALLOCATOR
# include <memory>
# if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
namespace boost{ namespace detail{
typedef std::__sgi_alloc alloc_type;
}}
# else
namespace boost{ namespace detail{
typedef std::alloc alloc_type;
}}
# endif
#endif
namespace boost{ namespace detail{
template <class T>
void allocator_construct(T* p, const T& t)
{ new (p) T(t); }
template <class T>
void allocator_destroy(T* p)
{ p->~T(); }
} }
#if !defined(BOOST_NO_STD_ALLOCATOR)
#include <memory>
#define BOOST_DEFAULT_ALLOCATOR(T) std::allocator<T>
namespace boost{ namespace detail{
template <class T, class A>
struct rebind_allocator
{
typedef typename A::template rebind<T> binder;
typedef typename binder::other type;
};
} // namespace detail
} // namespace boost
#elif !defined(BOOST_NO_MEMBER_TEMPLATES)
// no std::allocator, but the compiler supports the necessary syntax,
// write our own allocator instead:
#define BOOST_DEFAULT_ALLOCATOR(T) ::boost::detail::allocator<T>
namespace boost{ namespace detail{
template <class T>
class allocator
{
public:
typedef T value_type;
typedef value_type * pointer;
typedef const T* const_pointer;
typedef T& reference;
typedef const T& const_reference;
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
template <class U>
struct rebind
{
typedef allocator<U> other;
};
allocator(){}
template <class U>
allocator(const allocator<U>&){}
allocator(const allocator&){}
template <class U>
allocator& operator=(const allocator<U>&)
{ return *this; }
~allocator(){}
pointer address(reference x) { return &x; }
const_pointer address(const_reference x) const { return &x; }
pointer allocate(size_type n, const void* = 0)
{
#ifdef BOOST_HAVE_SGI_ALLOCATOR
return n != 0 ?
reinterpret_cast<pointer>(alloc_type::allocate(n * sizeof(value_type)))
: 0;
#else
return n != 0 ?
reinterpret_cast<pointer>(::operator new(n * sizeof(value_type)))
: 0;
#endif
}
void deallocate(pointer p, size_type n)
{
#ifdef BOOST_HAVE_SGI_ALLOCATOR
assert( (p == 0) == (n == 0) );
if (p != 0)
alloc_type::deallocate((void*)p, n);
#else
assert( (p == 0) == (n == 0) );
if (p != 0)
::operator delete((void*)p);
#endif
}
size_type max_size() const
{ return size_t(-1) / sizeof(value_type); }
void construct(pointer p, const T& val) const
{ allocator_construct(p, val); }
void destroy(pointer p) const
{ allocator_destroy(p); }
};
template <class T, class A>
struct rebind_allocator
{
typedef typename A::template rebind<T> binder;
typedef typename binder::other type;
};
} // namespace detail
} // namespace boost
#else
// no std::allocator, use workaround version instead,
// each allocator class must derive from a base class
// that allocates blocks of bytes:
#define BOOST_DEFAULT_ALLOCATOR(T) ::boost::detail::allocator_adapter<T, ::boost::detail::simple_alloc>
namespace boost{ namespace detail{
class simple_alloc
{
public:
typedef void value_type;
typedef value_type * pointer;
typedef const void* const_pointer;
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
simple_alloc(){}
simple_alloc(const simple_alloc&){}
~simple_alloc(){}
pointer allocate(size_type n, const void* = 0)
{
#ifdef BOOST_HAVE_SGI_ALLOCATOR
return n != 0 ?
reinterpret_cast<pointer>(alloc_type::allocate(n))
: 0;
#else
return n != 0 ?
reinterpret_cast<pointer>(::operator new(n))
: 0;
#endif
}
void deallocate(pointer p, size_type n)
{
#ifdef BOOST_HAVE_SGI_ALLOCATOR
assert( (p == 0) == (n == 0) );
if (p != 0)
alloc_type::deallocate((void*)p, n);
#else
assert( (p == 0) == (n == 0) );
if (p != 0)
::operator delete((void*)p);
#endif
}
};
template <class T, class Base>
class allocator_adapter : public Base
{
public:
typedef T value_type;
typedef value_type * pointer;
typedef const T* const_pointer;
typedef T& reference;
typedef const T& const_reference;
typedef size_t size_type;
typedef std::ptrdiff_t difference_type;
typedef Base base_type;
allocator_adapter(){}
allocator_adapter(const base_type& x) : Base(x){}
allocator_adapter& operator=(const base_type& x)
{
*(static_cast<base_type*>(this)) = x;
return *this;
}
~allocator_adapter(){}
pointer address(reference x) { return &x; }
const_pointer address(const_reference x) const { return &x; }
pointer allocate(size_type n, const void* = 0)
{
return n != 0 ?
reinterpret_cast<pointer>(base_type::allocate(n * sizeof(value_type)))
: 0;
}
void deallocate(pointer p, size_type n)
{
assert( (p == 0) == (n == 0) );
if (p != 0)
static_cast<base_type*>(this)->deallocate((void*)p, n * sizeof(value_type));
}
size_type max_size() const
{ return size_t(-1) / sizeof(value_type); }
void construct(pointer p, const T& val) const
{ allocator_construct(p, val); }
void destroy(pointer p) const
{ allocator_destroy(p); }
};
template <class T, class A>
struct rebind_allocator
{
typedef allocator_adapter<T, typename A::base_type> type;
};
} // namespace detail
} // namespace boost
#endif
#endif // include guard

View File

@ -0,0 +1,193 @@
/* Copyright 2003-2013 Joaquin M Lopez Munoz.
* 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)
*
* See Boost website at http://www.boost.org/
*/
#ifndef BOOST_DETAIL_ALLOCATOR_UTILITIES_HPP
#define BOOST_DETAIL_ALLOCATOR_UTILITIES_HPP
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
#include <boost/detail/workaround.hpp>
#include <boost/detail/select_type.hpp>
#include <boost/type_traits/is_same.hpp>
#include <cstddef>
#include <memory>
#include <new>
namespace boost{
namespace detail{
/* Allocator adaption layer. Some stdlibs provide allocators without rebind
* and template ctors. These facilities are simulated with the external
* template class rebind_to and the aid of partial_std_allocator_wrapper.
*/
namespace allocator{
/* partial_std_allocator_wrapper inherits the functionality of a std
* allocator while providing a templatized ctor and other bits missing
* in some stdlib implementation or another.
*/
template<typename Type>
class partial_std_allocator_wrapper:public std::allocator<Type>
{
public:
/* Oddly enough, STLport does not define std::allocator<void>::value_type
* when configured to work without partial template specialization.
* No harm in supplying the definition here unconditionally.
*/
typedef Type value_type;
partial_std_allocator_wrapper(){}
template<typename Other>
partial_std_allocator_wrapper(const partial_std_allocator_wrapper<Other>&){}
partial_std_allocator_wrapper(const std::allocator<Type>& x):
std::allocator<Type>(x)
{
}
#if defined(BOOST_DINKUMWARE_STDLIB)
/* Dinkumware guys didn't provide a means to call allocate() without
* supplying a hint, in disagreement with the standard.
*/
Type* allocate(std::size_t n,const void* hint=0)
{
std::allocator<Type>& a=*this;
return a.allocate(n,hint);
}
#endif
};
/* Detects whether a given allocator belongs to a defective stdlib not
* having the required member templates.
* Note that it does not suffice to check the Boost.Config stdlib
* macros, as the user might have passed a custom, compliant allocator.
* The checks also considers partial_std_allocator_wrapper to be
* a standard defective allocator.
*/
#if defined(BOOST_NO_STD_ALLOCATOR)&&\
(defined(BOOST_HAS_PARTIAL_STD_ALLOCATOR)||defined(BOOST_DINKUMWARE_STDLIB))
template<typename Allocator>
struct is_partial_std_allocator
{
BOOST_STATIC_CONSTANT(bool,
value=
(is_same<
std::allocator<BOOST_DEDUCED_TYPENAME Allocator::value_type>,
Allocator
>::value)||
(is_same<
partial_std_allocator_wrapper<
BOOST_DEDUCED_TYPENAME Allocator::value_type>,
Allocator
>::value));
};
#else
template<typename Allocator>
struct is_partial_std_allocator
{
BOOST_STATIC_CONSTANT(bool,value=false);
};
#endif
/* rebind operations for defective std allocators */
template<typename Allocator,typename Type>
struct partial_std_allocator_rebind_to
{
typedef partial_std_allocator_wrapper<Type> type;
};
/* rebind operation in all other cases */
template<typename Allocator>
struct rebinder
{
template<typename Type>
struct result
{
#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef typename Allocator::BOOST_NESTED_TEMPLATE
rebind<Type>::other other;
#else
typedef typename std::allocator_traits<Allocator>::BOOST_NESTED_TEMPLATE
rebind_alloc<Type> other;
#endif
};
};
template<typename Allocator,typename Type>
struct compliant_allocator_rebind_to
{
typedef typename rebinder<Allocator>::
BOOST_NESTED_TEMPLATE result<Type>::other type;
};
/* rebind front-end */
template<typename Allocator,typename Type>
struct rebind_to:
boost::detail::if_true<
is_partial_std_allocator<Allocator>::value
>::template then<
partial_std_allocator_rebind_to<Allocator,Type>,
compliant_allocator_rebind_to<Allocator,Type>
>::type
{
};
/* allocator-independent versions of construct and destroy */
template<typename Type>
void construct(void* p,const Type& t)
{
new (p) Type(t);
}
#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500))
/* MSVC++ issues spurious warnings about unreferencend formal parameters
* in destroy<Type> when Type is a class with trivial dtor.
*/
#pragma warning(push)
#pragma warning(disable:4100)
#endif
template<typename Type>
void destroy(const Type* p)
{
#if BOOST_WORKAROUND(__SUNPRO_CC,BOOST_TESTED_AT(0x590))
const_cast<Type*>(p)->~Type();
#else
p->~Type();
#endif
}
#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500))
#pragma warning(pop)
#endif
} /* namespace boost::detail::allocator */
} /* namespace boost::detail */
} /* namespace boost */
#endif

View File

@ -1,12 +1,11 @@
// Copyright (c) 2000 David Abrahams. Permission to copy, use, modify,
// sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
//
// Copyright (c) 2000 David Abrahams.
// 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)
//
// Copyright (c) 1994
// Hewlett-Packard Company
//
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appear in all copies and
@ -14,10 +13,10 @@
// in supporting documentation. Hewlett-Packard Company makes no
// representations about the suitability of this software for any
// purpose. It is provided "as is" without express or implied warranty.
//
//
// Copyright (c) 1996
// Silicon Graphics Computer Systems, Inc.
//
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appear in all copies and
@ -25,22 +24,22 @@
// in supporting documentation. Silicon Graphics makes no
// representations about the suitability of this software for any
// purpose. It is provided "as is" without express or implied warranty.
//
//
#ifndef BINARY_SEARCH_DWA_122600_H_
# define BINARY_SEARCH_DWA_122600_H_
# include <boost/detail/iterator.hpp>
# include <utility>
# include <iterator>
namespace boost { namespace detail {
template <class ForwardIter, class Tp>
ForwardIter lower_bound(ForwardIter first, ForwardIter last,
const Tp& val)
const Tp& val)
{
typedef detail::iterator_traits<ForwardIter> traits;
typename traits::difference_type len = boost::detail::distance(first, last);
typedef std::iterator_traits<ForwardIter> traits;
typename traits::difference_type len = std::distance(first, last);
typename traits::difference_type half;
ForwardIter middle;
@ -63,9 +62,9 @@ template <class ForwardIter, class Tp, class Compare>
ForwardIter lower_bound(ForwardIter first, ForwardIter last,
const Tp& val, Compare comp)
{
typedef detail::iterator_traits<ForwardIter> traits;
typedef std::iterator_traits<ForwardIter> traits;
typename traits::difference_type len = boost::detail::distance(first, last);
typename traits::difference_type len = std::distance(first, last);
typename traits::difference_type half;
ForwardIter middle;
@ -88,9 +87,9 @@ template <class ForwardIter, class Tp>
ForwardIter upper_bound(ForwardIter first, ForwardIter last,
const Tp& val)
{
typedef detail::iterator_traits<ForwardIter> traits;
typedef std::iterator_traits<ForwardIter> traits;
typename traits::difference_type len = boost::detail::distance(first, last);
typename traits::difference_type len = std::distance(first, last);
typename traits::difference_type half;
ForwardIter middle;
@ -113,9 +112,9 @@ template <class ForwardIter, class Tp, class Compare>
ForwardIter upper_bound(ForwardIter first, ForwardIter last,
const Tp& val, Compare comp)
{
typedef detail::iterator_traits<ForwardIter> traits;
typedef std::iterator_traits<ForwardIter> traits;
typename traits::difference_type len = boost::detail::distance(first, last);
typename traits::difference_type len = std::distance(first, last);
typename traits::difference_type half;
ForwardIter middle;
@ -138,9 +137,9 @@ template <class ForwardIter, class Tp>
std::pair<ForwardIter, ForwardIter>
equal_range(ForwardIter first, ForwardIter last, const Tp& val)
{
typedef detail::iterator_traits<ForwardIter> traits;
typedef std::iterator_traits<ForwardIter> traits;
typename traits::difference_type len = boost::detail::distance(first, last);
typename traits::difference_type len = std::distance(first, last);
typename traits::difference_type half;
ForwardIter middle, left, right;
@ -170,9 +169,9 @@ std::pair<ForwardIter, ForwardIter>
equal_range(ForwardIter first, ForwardIter last, const Tp& val,
Compare comp)
{
typedef detail::iterator_traits<ForwardIter> traits;
typedef std::iterator_traits<ForwardIter> traits;
typename traits::difference_type len = boost::detail::distance(first, last);
typename traits::difference_type len = std::distance(first, last);
typename traits::difference_type half;
ForwardIter middle, left, right;
@ -195,7 +194,7 @@ equal_range(ForwardIter first, ForwardIter last, const Tp& val,
}
}
return std::pair<ForwardIter, ForwardIter>(first, first);
}
}
template <class ForwardIter, class Tp>
bool binary_search(ForwardIter first, ForwardIter last,

View File

@ -0,0 +1,58 @@
// boost/detail/bitmask.hpp ------------------------------------------------//
// Copyright Beman Dawes 2006
// Distributed under the Boost Software License, Version 1.0
// http://www.boost.org/LICENSE_1_0.txt
// Usage: enum foo { a=1, b=2, c=4 };
// BOOST_BITMASK( foo )
//
// void f( foo arg );
// ...
// f( a | c );
//
// See [bitmask.types] in the C++ standard for the formal specification
#ifndef BOOST_BITMASK_HPP
#define BOOST_BITMASK_HPP
#include <boost/config.hpp>
#include <boost/cstdint.hpp>
#define BOOST_BITMASK(Bitmask) \
\
inline BOOST_CONSTEXPR Bitmask operator| (Bitmask x , Bitmask y ) \
{ return static_cast<Bitmask>( static_cast<boost::int_least32_t>(x) \
| static_cast<boost::int_least32_t>(y)); } \
\
inline BOOST_CONSTEXPR Bitmask operator& (Bitmask x , Bitmask y ) \
{ return static_cast<Bitmask>( static_cast<boost::int_least32_t>(x) \
& static_cast<boost::int_least32_t>(y)); } \
\
inline BOOST_CONSTEXPR Bitmask operator^ (Bitmask x , Bitmask y ) \
{ return static_cast<Bitmask>( static_cast<boost::int_least32_t>(x) \
^ static_cast<boost::int_least32_t>(y)); } \
\
inline BOOST_CONSTEXPR Bitmask operator~ (Bitmask x ) \
{ return static_cast<Bitmask>(~static_cast<boost::int_least32_t>(x)); } \
\
inline Bitmask & operator&=(Bitmask& x , Bitmask y) \
{ x = x & y ; return x ; } \
\
inline Bitmask & operator|=(Bitmask& x , Bitmask y) \
{ x = x | y ; return x ; } \
\
inline Bitmask & operator^=(Bitmask& x , Bitmask y) \
{ x = x ^ y ; return x ; } \
\
/* Boost extensions to [bitmask.types] */ \
\
inline BOOST_CONSTEXPR bool operator!(Bitmask x) \
{ return !static_cast<int>(x); } \
\
inline BOOST_CONSTEXPR bool bitmask_set(Bitmask x) \
{ return !!x; }
#endif // BOOST_BITMASK_HPP

View File

@ -1,11 +1,10 @@
// boost/catch_exceptions.hpp -----------------------------------------------//
// (C) Copyright Beman Dawes 1995-2001. Permission to copy, use, modify, sell
// and distribute this software is granted provided this copyright notice
// appears in all copies. This software is provided "as is" without express or
// implied warranty, and with no claim as to its suitability for any purpose.
// Copyright Beman Dawes 1995-2001. 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)
// See http://www.boost.org for updates, documentation, and revision history.
// See http://www.boost.org/libs/test for documentation.
// Revision History
// 13 Jun 01 report_exception() made inline. (John Maddock, Jesse Jones)
@ -21,17 +20,14 @@
// to reduce coupling to other boost libraries.
#include <string> // for string
#include <new> // for bad_alloc
#include <ostream> // for ostream
#include <typeinfo> // for bad_cast, bad_typeid
#include <exception> // for exception, bad_exception
#include <stdexcept> // for std exception hierarchy
#include <boost/config.hpp>
#include <boost/cstdlib.hpp> // for exit codes
# if __GNUC__ != 2 || __GNUC_MINOR__ > 96
# include <ostream> // for ostream
# else
# include <iostream> // workaround GNU missing ostream header
# endif
# if defined(__BORLANDC__) && (__BORLANDC__ <= 0x0551)
# if defined(BOOST_BORLANDC) && (__BORLANDC__ <= 0x0551)
# define BOOST_BUILT_IN_EXCEPTIONS_MISSING_WHAT
# endif

View File

@ -0,0 +1,157 @@
// Copyright 2005-2011 Daniel James.
// 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)
// Note: if you change this include guard, you also need to change
// container_fwd_compile_fail.cpp
#if !defined(BOOST_DETAIL_CONTAINER_FWD_HPP)
#define BOOST_DETAIL_CONTAINER_FWD_HPP
#if defined(_MSC_VER) && \
!defined(BOOST_DETAIL_TEST_CONFIG_ONLY)
# pragma once
#endif
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
////////////////////////////////////////////////////////////////////////////////
// //
// Define BOOST_DETAIL_NO_CONTAINER_FWD if you don't want this header to //
// forward declare standard containers. //
// //
// BOOST_DETAIL_CONTAINER_FWD to make it foward declare containers even if it //
// normally doesn't. //
// //
// BOOST_DETAIL_NO_CONTAINER_FWD overrides BOOST_DETAIL_CONTAINER_FWD. //
// //
////////////////////////////////////////////////////////////////////////////////
#if !defined(BOOST_DETAIL_NO_CONTAINER_FWD)
# if defined(BOOST_DETAIL_CONTAINER_FWD)
// Force forward declarations.
# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
// STLport
# define BOOST_DETAIL_NO_CONTAINER_FWD
# elif defined(__LIBCOMO__)
// Comeau STL:
# define BOOST_DETAIL_NO_CONTAINER_FWD
# elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
// Rogue Wave library:
# define BOOST_DETAIL_NO_CONTAINER_FWD
# elif defined(_LIBCPP_VERSION)
// libc++
# define BOOST_DETAIL_NO_CONTAINER_FWD
# elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
// GNU libstdc++ 3
//
// Disable forwarding for all recent versions, as the library has a
// versioned namespace mode, and I don't know how to detect it.
# if __GLIBCXX__ >= 20070513 \
|| defined(_GLIBCXX_DEBUG) \
|| defined(_GLIBCXX_PARALLEL) \
|| defined(_GLIBCXX_PROFILE)
# define BOOST_DETAIL_NO_CONTAINER_FWD
# else
# if defined(__GLIBCXX__) && __GLIBCXX__ >= 20040530
# define BOOST_CONTAINER_FWD_COMPLEX_STRUCT
# endif
# endif
# elif defined(__STL_CONFIG_H)
// generic SGI STL
//
// Forward declaration seems to be okay, but it has a couple of odd
// implementations.
# define BOOST_CONTAINER_FWD_BAD_BITSET
# if !defined(__STL_NON_TYPE_TMPL_PARAM_BUG)
# define BOOST_CONTAINER_FWD_BAD_DEQUE
# endif
# elif defined(__MSL_CPP__)
// MSL standard lib:
# define BOOST_DETAIL_NO_CONTAINER_FWD
# elif defined(__IBMCPP__)
// The default VACPP std lib, forward declaration seems to be fine.
# elif defined(MSIPL_COMPILE_H)
// Modena C++ standard library
# define BOOST_DETAIL_NO_CONTAINER_FWD
# elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
// Dinkumware Library (this has to appear after any possible replacement
// libraries)
# else
# define BOOST_DETAIL_NO_CONTAINER_FWD
# endif
#endif
#if !defined(BOOST_DETAIL_TEST_CONFIG_ONLY)
#if defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \
!defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD)
#include <deque>
#include <list>
#include <vector>
#include <map>
#include <set>
#include <bitset>
#include <string>
#include <complex>
#else
#include <cstddef>
#if defined(BOOST_CONTAINER_FWD_BAD_DEQUE)
#include <deque>
#endif
#if defined(BOOST_CONTAINER_FWD_BAD_BITSET)
#include <bitset>
#endif
#if defined(BOOST_MSVC)
#pragma warning(push)
#pragma warning(disable:4099) // struct/class mismatch in fwd declarations
#endif
namespace std
{
template <class T> class allocator;
template <class charT, class traits, class Allocator> class basic_string;
template <class charT> struct char_traits;
#if defined(BOOST_CONTAINER_FWD_COMPLEX_STRUCT)
template <class T> struct complex;
#else
template <class T> class complex;
#endif
#if !defined(BOOST_CONTAINER_FWD_BAD_DEQUE)
template <class T, class Allocator> class deque;
#endif
template <class T, class Allocator> class list;
template <class T, class Allocator> class vector;
template <class Key, class T, class Compare, class Allocator> class map;
template <class Key, class T, class Compare, class Allocator>
class multimap;
template <class Key, class Compare, class Allocator> class set;
template <class Key, class Compare, class Allocator> class multiset;
#if !defined(BOOST_CONTAINER_FWD_BAD_BITSET)
template <size_t N> class bitset;
#endif
template <class T1, class T2> struct pair;
}
#if defined(BOOST_MSVC)
#pragma warning(pop)
#endif
#endif // BOOST_DETAIL_NO_CONTAINER_FWD &&
// !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD)
#endif // BOOST_DETAIL_TEST_CONFIG_ONLY
#endif

View File

@ -0,0 +1,101 @@
/*=============================================================================
Copyright (c) 2010 Bryce Lelbach
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)
=============================================================================*/
#include <boost/config.hpp>
#if defined(BOOST_NO_FENV_H)
#error This platform does not have a floating point environment
#endif
#if !defined(BOOST_DETAIL_FENV_HPP)
#define BOOST_DETAIL_FENV_HPP
/* If we're using clang + glibc, we have to get hacky.
* See http://llvm.org/bugs/show_bug.cgi?id=6907 */
#if defined(__clang__) && (__clang_major__ < 3) && \
defined(__GNU_LIBRARY__) && /* up to version 5 */ \
defined(__GLIBC__) && /* version 6 + */ \
!defined(_FENV_H)
#define _FENV_H
#include <features.h>
#include <bits/fenv.h>
extern "C" {
extern int fegetexceptflag (fexcept_t*, int) __THROW;
extern int fesetexceptflag (__const fexcept_t*, int) __THROW;
extern int feclearexcept (int) __THROW;
extern int feraiseexcept (int) __THROW;
extern int fetestexcept (int) __THROW;
extern int fegetround (void) __THROW;
extern int fesetround (int) __THROW;
extern int fegetenv (fenv_t*) __THROW;
extern int fesetenv (__const fenv_t*) __THROW;
extern int feupdateenv (__const fenv_t*) __THROW;
extern int feholdexcept (fenv_t*) __THROW;
#ifdef __USE_GNU
extern int feenableexcept (int) __THROW;
extern int fedisableexcept (int) __THROW;
extern int fegetexcept (void) __THROW;
#endif
}
namespace std { namespace tr1 {
using ::fenv_t;
using ::fexcept_t;
using ::fegetexceptflag;
using ::fesetexceptflag;
using ::feclearexcept;
using ::feraiseexcept;
using ::fetestexcept;
using ::fegetround;
using ::fesetround;
using ::fegetenv;
using ::fesetenv;
using ::feupdateenv;
using ::feholdexcept;
} }
#elif defined(__MINGW32__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408
// MinGW (32-bit) has a bug in mingw32/bits/c++config.h, it does not define _GLIBCXX_HAVE_FENV_H,
// which prevents the C fenv.h header contents to be included in the C++ wrapper header fenv.h. This is at least
// the case with gcc 4.8.1 packages tested so far, up to 4.8.1-4. Note that there is no issue with
// MinGW-w64.
// To work around the bug we avoid including the C++ wrapper header and include the C header directly
// and import all relevant symbols into std:: ourselves.
#include <../include/fenv.h>
namespace std {
using ::fenv_t;
using ::fexcept_t;
using ::fegetexceptflag;
using ::fesetexceptflag;
using ::feclearexcept;
using ::feraiseexcept;
using ::fetestexcept;
using ::fegetround;
using ::fesetround;
using ::fegetenv;
using ::fesetenv;
using ::feupdateenv;
using ::feholdexcept;
}
#else /* if we're not using GNU's C stdlib, fenv.h should work with clang */
#if defined(__SUNPRO_CC) /* lol suncc */
#include <stdio.h>
#endif
#include <fenv.h>
#endif
#endif /* BOOST_DETAIL_FENV_HPP */

View File

@ -0,0 +1,29 @@
// (C) Copyright Matthias Troyerk 2006.
// Use, modification and distribution are subject to 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).
//
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
#ifndef BOOST_DETAIL_HAS_DEFAULT_CONSTRUCTOR_HPP_INCLUDED
#define BOOST_DETAIL_HAS_DEFAULT_CONSTRUCTOR_HPP_INCLUDED
#include <boost/type_traits/has_trivial_constructor.hpp>
namespace boost { namespace detail {
/// type trait to check for a default constructor
///
/// The default implementation just checks for a trivial constructor.
/// Using some compiler magic it might be possible to provide a better default
template <class T>
struct has_default_constructor
: public has_trivial_constructor<T>
{};
} } // namespace boost::detail
#endif // BOOST_DETAIL_HAS_DEFAULT_CONSTRUCTOR_HPP_INCLUDED

View File

@ -0,0 +1,87 @@
// boost/identifier.hpp ----------------------------------------------------//
// Copyright Beman Dawes 2006
// 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)
// See documentation at http://www.boost.org/libs/utility
#ifndef BOOST_IDENTIFIER_HPP
#define BOOST_IDENTIFIER_HPP
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_base_of.hpp>
#include <iosfwd>
namespace boost
{
namespace detail
{
// class template identifier ---------------------------------------------//
// Always used as a base class so that different instantiations result in
// different class types even if instantiated with the same value type T.
// Expected usage is that T is often an integer type, best passed by
// value. There is no reason why T can't be a possibly larger class such as
// std::string, best passed by const reference.
// This implementation uses pass by value, based on expected common uses.
template <typename T, typename D>
class identifier
{
public:
typedef T value_type;
const value_type value() const { return m_value; }
void assign( value_type v ) { m_value = v; }
bool operator==( const D & rhs ) const { return m_value == rhs.m_value; }
bool operator!=( const D & rhs ) const { return m_value != rhs.m_value; }
bool operator< ( const D & rhs ) const { return m_value < rhs.m_value; }
bool operator<=( const D & rhs ) const { return m_value <= rhs.m_value; }
bool operator> ( const D & rhs ) const { return m_value > rhs.m_value; }
bool operator>=( const D & rhs ) const { return m_value >= rhs.m_value; }
typedef void (*unspecified_bool_type)(D); // without the D, unspecified_bool_type
static void unspecified_bool_true(D){} // conversion allows relational operators
// between different identifier types
operator unspecified_bool_type() const { return m_value == value_type() ? 0 : unspecified_bool_true; }
bool operator!() const { return m_value == value_type(); }
// constructors are protected so that class can only be used as a base class
protected:
identifier() {}
explicit identifier( value_type v ) : m_value(v) {}
private:
T m_value;
};
//#ifndef BOOST_NO_SFINAE
// template <class Ostream, class Id>
// typename enable_if< is_base_of< identifier< typename Id::value_type, Id >, Id >,
// Ostream & >::type operator<<( Ostream & os, const Id & id )
// {
// return os << id.value();
// }
// template <class Istream, class Id>
// typename enable_if< is_base_of< identifier< typename Id::value_type, Id >, Id >,
// Istream & >::type operator>>( Istream & is, Id & id )
// {
// typename Id::value_type v;
// is >> v;
// id.value( v );
// return is;
// }
//#endif
} // namespace detail
} // namespace boost
#endif // BOOST_IDENTIFIER_HPP

View File

@ -0,0 +1,195 @@
// Copyright David Abrahams 2002.
// 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 INDIRECT_TRAITS_DWA2002131_HPP
# define INDIRECT_TRAITS_DWA2002131_HPP
# include <boost/type_traits/integral_constant.hpp>
# include <boost/type_traits/is_function.hpp>
# include <boost/type_traits/is_reference.hpp>
# include <boost/type_traits/is_pointer.hpp>
# include <boost/type_traits/is_class.hpp>
# include <boost/type_traits/is_const.hpp>
# include <boost/type_traits/is_volatile.hpp>
# include <boost/type_traits/is_member_function_pointer.hpp>
# include <boost/type_traits/is_member_pointer.hpp>
# include <boost/type_traits/remove_cv.hpp>
# include <boost/type_traits/remove_reference.hpp>
# include <boost/type_traits/remove_pointer.hpp>
# include <boost/detail/workaround.hpp>
# include <boost/detail/select_type.hpp>
namespace boost { namespace detail {
namespace indirect_traits {
template <class T>
struct is_reference_to_const : boost::false_type
{
};
template <class T>
struct is_reference_to_const<T const&> : boost::true_type
{
};
# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround
template<class T>
struct is_reference_to_const<T const volatile&> : boost::true_type
{
};
# endif
template <class T>
struct is_reference_to_function : boost::false_type
{
};
template <class T>
struct is_reference_to_function<T&> : is_function<T>
{
};
template <class T>
struct is_pointer_to_function : boost::false_type
{
};
// There's no such thing as a pointer-to-cv-function, so we don't need
// specializations for those
template <class T>
struct is_pointer_to_function<T*> : is_function<T>
{
};
template <class T>
struct is_reference_to_member_function_pointer_impl : boost::false_type
{
};
template <class T>
struct is_reference_to_member_function_pointer_impl<T&>
: is_member_function_pointer<typename remove_cv<T>::type>
{
};
template <class T>
struct is_reference_to_member_function_pointer
: is_reference_to_member_function_pointer_impl<T>
{
};
template <class T>
struct is_reference_to_function_pointer_aux
: boost::integral_constant<bool,
is_reference<T>::value &&
is_pointer_to_function<
typename remove_cv<
typename remove_reference<T>::type
>::type
>::value
>
{
// There's no such thing as a pointer-to-cv-function, so we don't need specializations for those
};
template <class T>
struct is_reference_to_function_pointer
: boost::detail::if_true<
is_reference_to_function<T>::value
>::template then<
boost::false_type
, is_reference_to_function_pointer_aux<T>
>::type
{
};
template <class T>
struct is_reference_to_non_const
: boost::integral_constant<bool,
is_reference<T>::value &&
!is_reference_to_const<T>::value
>
{
};
template <class T>
struct is_reference_to_volatile : boost::false_type
{
};
template <class T>
struct is_reference_to_volatile<T volatile&> : boost::true_type
{
};
# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround
template <class T>
struct is_reference_to_volatile<T const volatile&> : boost::true_type
{
};
# endif
template <class T>
struct is_reference_to_pointer : boost::false_type
{
};
template <class T>
struct is_reference_to_pointer<T*&> : boost::true_type
{
};
template <class T>
struct is_reference_to_pointer<T* const&> : boost::true_type
{
};
template <class T>
struct is_reference_to_pointer<T* volatile&> : boost::true_type
{
};
template <class T>
struct is_reference_to_pointer<T* const volatile&> : boost::true_type
{
};
template <class T>
struct is_reference_to_class
: boost::integral_constant<bool,
is_reference<T>::value &&
is_class<
typename remove_cv<
typename remove_reference<T>::type
>::type
>::value
>
{
};
template <class T>
struct is_pointer_to_class
: boost::integral_constant<bool,
is_pointer<T>::value &&
is_class<
typename remove_cv<
typename remove_pointer<T>::type
>::type
>::value
>
{
};
}
using namespace indirect_traits;
}} // namespace boost::python::detail
#endif // INDIRECT_TRAITS_DWA2002131_HPP

View File

@ -0,0 +1,121 @@
// Copyright David Abrahams 2004. Use, modification and distribution is
// subject to 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 IS_INCREMENTABLE_DWA200415_HPP
# define IS_INCREMENTABLE_DWA200415_HPP
# include <boost/type_traits/integral_constant.hpp>
# include <boost/type_traits/remove_cv.hpp>
# include <boost/detail/workaround.hpp>
namespace boost { namespace detail {
// is_incrementable<T> metafunction
//
// Requires: Given x of type T&, if the expression ++x is well-formed
// it must have complete type; otherwise, it must neither be ambiguous
// nor violate access.
// This namespace ensures that ADL doesn't mess things up.
namespace is_incrementable_
{
// a type returned from operator++ when no increment is found in the
// type's own namespace
struct tag {};
// any soaks up implicit conversions and makes the following
// operator++ less-preferred than any other such operator that
// might be found via ADL.
struct any { template <class T> any(T const&); };
// This is a last-resort operator++ for when none other is found
# if BOOST_WORKAROUND(__GNUC__, == 4) && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 2
}
namespace is_incrementable_2
{
is_incrementable_::tag operator++(is_incrementable_::any const&);
is_incrementable_::tag operator++(is_incrementable_::any const&,int);
}
using namespace is_incrementable_2;
namespace is_incrementable_
{
# else
tag operator++(any const&);
tag operator++(any const&,int);
# endif
# if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202))
# define BOOST_comma(a,b) (a)
# else
// In case an operator++ is found that returns void, we'll use ++x,0
tag operator,(tag,int);
# define BOOST_comma(a,b) (a,b)
# endif
# if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable:4913) // Warning about operator,
# endif
// two check overloads help us identify which operator++ was picked
char (& check_(tag) )[2];
template <class T>
char check_(T const&);
template <class T>
struct impl
{
static typename boost::remove_cv<T>::type& x;
BOOST_STATIC_CONSTANT(
bool
, value = sizeof(is_incrementable_::check_(BOOST_comma(++x,0))) == 1
);
};
template <class T>
struct postfix_impl
{
static typename boost::remove_cv<T>::type& x;
BOOST_STATIC_CONSTANT(
bool
, value = sizeof(is_incrementable_::check_(BOOST_comma(x++,0))) == 1
);
};
# if defined(BOOST_MSVC)
# pragma warning(pop)
# endif
}
# undef BOOST_comma
template<typename T>
struct is_incrementable :
public boost::integral_constant<bool, boost::detail::is_incrementable_::impl<T>::value>
{
};
template<typename T>
struct is_postfix_incrementable :
public boost::integral_constant<bool, boost::detail::is_incrementable_::postfix_impl<T>::value>
{
};
} // namespace detail
} // namespace boost
# include <boost/type_traits/detail/bool_trait_undef.hpp>
#endif // IS_INCREMENTABLE_DWA200415_HPP

View File

@ -0,0 +1,55 @@
/*==============================================================================
Copyright (c) 2010-2011 Bryce Lelbach
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_DETAIL_SORTED_HPP
#define BOOST_DETAIL_SORTED_HPP
#include <iterator>
#include <functional>
namespace boost {
namespace detail {
template<class Iterator, class Comp>
inline Iterator is_sorted_until (Iterator first, Iterator last, Comp c) {
if (first == last)
return last;
Iterator it = first; ++it;
for (; it != last; first = it, ++it)
if (c(*it, *first))
return it;
return it;
}
template<class Iterator>
inline Iterator is_sorted_until (Iterator first, Iterator last) {
typedef typename std::iterator_traits<Iterator>::value_type
value_type;
typedef std::less<value_type> c;
return ::boost::detail::is_sorted_until(first, last, c());
}
template<class Iterator, class Comp>
inline bool is_sorted (Iterator first, Iterator last, Comp c) {
return ::boost::detail::is_sorted_until(first, last, c) == last;
}
template<class Iterator>
inline bool is_sorted (Iterator first, Iterator last) {
return ::boost::detail::is_sorted_until(first, last) == last;
}
} // detail
} // boost
#endif // BOOST_DETAIL_SORTED_HPP

View File

@ -0,0 +1,27 @@
// Copyright David Abrahams 2005. 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_DETAIL_IS_XXX_DWA20051011_HPP
# define BOOST_DETAIL_IS_XXX_DWA20051011_HPP
# include <boost/config.hpp>
# include <boost/type_traits/integral_constant.hpp>
# include <boost/preprocessor/enum_params.hpp>
# define BOOST_DETAIL_IS_XXX_DEF(name, qualified_name, nargs) \
template <class T> \
struct is_##name : boost::false_type \
{ \
}; \
\
template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class T) > \
struct is_##name< \
qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, T) > \
> \
: boost::true_type \
{ \
};
#endif // BOOST_DETAIL_IS_XXX_DWA20051011_HPP

View File

@ -1,385 +0,0 @@
// (C) Copyright David Abrahams 2001. Permission to copy, use, modify,
// sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
// Boost versions of
//
// std::iterator_traits<>::iterator_category
// std::iterator_traits<>::difference_type
// std::distance()
//
// ...for all compilers and iterators
//
// Additionally, if X is a pointer
// std::iterator_traits<X>::pointer
// Otherwise, if partial specialization is supported or X is not a pointer
// std::iterator_traits<X>::value_type
// std::iterator_traits<X>::pointer
// std::iterator_traits<X>::reference
//
// CAVEAT: When using the VC6 standard library, an iterator derived from
// std::iterator but not boost::iterator or from one supplied by the standard
// will always have pointer == const value_type* and reference == const
// value_type&, whether that's correct or not.
// See http://www.boost.org for most recent version including documentation.
// Revision History
// 04 Mar 2001 - More attempted fixes for Intel C++ (David Abrahams)
// 03 Mar 2001 - Put all implementation into namespace
// boost::detail::iterator_traits_. Some progress made on fixes
// for Intel compiler. (David Abrahams)
// 02 Mar 2001 - Changed BOOST_MSVC to BOOST_MSVC_STD_ITERATOR in a few
// places. (Jeremy Siek)
// 19 Feb 2001 - Improved workarounds for stock MSVC6; use yes_type and
// no_type from type_traits.hpp; stopped trying to remove_cv
// before detecting is_pointer, in honor of the new type_traits
// semantics. (David Abrahams)
// 13 Feb 2001 - Make it work with nearly all standard-conforming iterators
// under raw VC6. The one category remaining which will fail is
// that of iterators derived from std::iterator but not
// boost::iterator and which redefine difference_type.
// 11 Feb 2001 - Clean away code which can never be used (David Abrahams)
// 09 Feb 2001 - Always have a definition for each traits member, even if it
// can't be properly deduced. These will be incomplete types in
// some cases (undefined<void>), but it helps suppress MSVC errors
// elsewhere (David Abrahams)
// 07 Feb 2001 - Support for more of the traits members where possible, making
// this useful as a replacement for std::iterator_traits<T> when
// used as a default template parameter.
// 06 Feb 2001 - Removed useless #includes of standard library headers
// (David Abrahams)
#ifndef ITERATOR_DWA122600_HPP_
# define ITERATOR_DWA122600_HPP_
# include <boost/config.hpp>
# include <boost/type_traits.hpp>
# include <boost/iterator.hpp>
# include <iterator>
# include <cstddef>
# if defined(BOOST_MSVC_STD_ITERATOR) && !defined(__SGI_STL_PORT)
# include <xtree>
# include <deque>
# include <list>
# endif
// STLPort 4.0 and betas have a bug when debugging is enabled and there is no
// partial specialization: instead of an iterator_category typedef, the standard
// container iterators have _Iterator_category.
//
// Also, whether debugging is enabled or not, there is a broken specialization
// of std::iterator<output_iterator_tag,void,void,void,void> which has no
// typedefs but iterator_category.
# if defined(__SGI_STL_PORT) && (__SGI_STL_PORT <= 0x410) && !defined(__STL_CLASS_PARTIAL_SPECIALIZATION)
# ifdef __STL_DEBUG
# define BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF
# endif
# define BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION
# endif // STLPort <= 4.1b4 && no partial specialization
namespace boost { namespace detail {
# if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR)
using std::iterator_traits;
using std::distance;
# else
namespace iterator_traits_ {
// Workarounds for less-capable implementations
template <bool is_ptr> struct iterator_traits_select;
template <class T> struct undefined;
template <> struct iterator_traits_select<true>
{
template <class Ptr>
struct traits
{
typedef std::ptrdiff_t difference_type;
typedef std::random_access_iterator_tag iterator_category;
typedef Ptr pointer;
#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
// Keeps MSVC happy under certain circumstances. It seems class template default
// arguments are partly instantiated even when not used when the class template
// is the return type of a function template.
typedef undefined<void> value_type;
typedef undefined<void> reference;
#endif
};
};
typedef char yes_type;
typedef double no_type;
# ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF
no_type bad_category_helper(...);
template <class C, class T> yes_type bad_category_helper(std::_DBG_iter<C,T>*);
template <bool has_bad_category_typedef> struct bad_category_select;
template <>
struct bad_category_select<true>
{
template <class Iterator>
struct category { typedef typename Iterator::_Iterator_category type; };
};
template <>
struct bad_category_select<false>
{
template <class Iterator>
struct category { typedef typename Iterator::iterator_category type; };
};
template <class Iterator>
struct iterator_category_select
{
private:
static Iterator p;
enum { has_bad_category
= sizeof(bad_category_helper(&p)) == sizeof(yes_type) };
typedef bad_category_select<has_bad_category> category_select;
public:
typedef typename category_select::template category<Iterator>::type type;
};
# endif
# ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION
template <bool is_bad_output_iterator> struct bad_output_iterator_select;
template <>
struct bad_output_iterator_select<true>
{
template <class Iterator>
struct non_category_traits {
typedef void value_type;
typedef void difference_type;
typedef void pointer;
typedef void reference;
};
};
template <>
struct bad_output_iterator_select<false>
{
template <class Iterator>
struct non_category_traits {
typedef typename Iterator::value_type value_type;
typedef typename Iterator::difference_type difference_type;
typedef typename Iterator::pointer pointer;
typedef typename Iterator::reference reference;
};
};
# endif
# if defined(BOOST_MSVC_STD_ITERATOR) && !defined(__SGI_STL_PORT)
// We'll sort iterator types into one of these classifications, from which we
// can determine the difference_type, pointer, reference, and value_type
enum {
not_msvc_stdlib_iterator,
msvc_stdlib_const_iterator,
msvc_stdlib_mutable_iterator,
msvc_stdlib_ostream_iterator
};
template <unsigned> struct msvc_traits_select;
template <> struct msvc_traits_select<not_msvc_stdlib_iterator>
{
template <class Iterator>
struct traits_ // calling this "traits" will confuse VC.
{
typedef typename Iterator::difference_type difference_type;
typedef typename Iterator::value_type value_type;
typedef typename Iterator::pointer pointer;
typedef typename Iterator::reference reference;
};
};
template <> struct msvc_traits_select<msvc_stdlib_mutable_iterator>
{
template <class Iterator>
struct traits_
{
typedef typename Iterator::distance_type difference_type;
typedef typename Iterator::value_type value_type;
typedef value_type* pointer;
typedef value_type& reference;
};
};
template <> struct msvc_traits_select<msvc_stdlib_const_iterator>
{
template <class Iterator>
struct traits_
{
typedef typename Iterator::distance_type difference_type;
typedef typename Iterator::value_type value_type;
typedef const value_type* pointer;
typedef const value_type& reference;
};
};
template <> struct msvc_traits_select<msvc_stdlib_ostream_iterator>
{
template <class Iterator>
struct traits_
{
typedef typename Iterator::distance_type difference_type;
typedef typename Iterator::value_type value_type;
typedef void pointer;
typedef void reference;
};
};
// These functions allow us to detect which classification a given iterator type
// falls into.
// Is the iterator derived from std::iterator?
no_type is_std_iterator_helper(...);
template <class V, class D, class C>
yes_type is_std_iterator_helper(const volatile std::iterator<V,D,C>*);
// Is the iterator derived from boost::iterator?
template <class C, class T, class D, class P, class R>
yes_type is_boost_iterator_helper(const volatile boost::iterator<C,T,D,P,R>*);
no_type is_boost_iterator_helper(...);
// Is the iterator one of the known mutable container iterators?
template<class K, class Ty, class Kfn, class Pr, class A>
yes_type is_mutable_iterator_helper(const volatile typename std::_Tree<K,Ty,Kfn,Pr,A>::iterator*);
template<class Ty, class A>
yes_type is_mutable_iterator_helper(const volatile typename std::list<Ty,A>::iterator*);
template<class Ty, class A>
yes_type is_mutable_iterator_helper(const volatile typename std::deque<Ty,A>::iterator*);
no_type is_mutable_iterator_helper(...);
// Is the iterator an ostream_iterator?
template<class T, class CharT, class Traits>
yes_type is_ostream_iterator_helper(const volatile std::ostream_iterator<T,CharT,Traits>*);
no_type is_ostream_iterator_helper(...);
template <class T>
struct msvc_iterator_classification {
BOOST_STATIC_CONSTANT(unsigned,
value = (sizeof(is_ostream_iterator_helper((T*)0)) == sizeof(yes_type))
? msvc_stdlib_ostream_iterator
: (sizeof(is_mutable_iterator_helper((T*)0)) == sizeof(yes_type))
? msvc_stdlib_mutable_iterator
: (sizeof(is_std_iterator_helper((T*)0)) == sizeof(yes_type)
&& sizeof(is_boost_iterator_helper((T*)0)) == sizeof(no_type))
? msvc_stdlib_const_iterator
: not_msvc_stdlib_iterator
);
};
# endif
template <> struct iterator_traits_select<false>
{
template <class Iterator>
struct traits
{
# if defined(BOOST_MSVC_STD_ITERATOR) && !defined(__SGI_STL_PORT)
typedef msvc_traits_select<(
msvc_iterator_classification<Iterator>::value
)>::template traits_<Iterator> inner_traits;
typedef typename inner_traits::difference_type difference_type;
typedef typename inner_traits::value_type value_type;
typedef typename inner_traits::pointer pointer;
typedef typename inner_traits::reference reference;
# elif !defined(BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION)
typedef typename Iterator::difference_type difference_type;
typedef typename Iterator::value_type value_type;
typedef typename Iterator::pointer pointer;
typedef typename Iterator::reference reference;
# else
typedef bad_output_iterator_select<
is_convertible<const volatile Iterator*,
const volatile std::iterator<std::output_iterator_tag,void,void,void,void>*
>::value> non_category_traits_select;
typedef non_category_traits_select::template non_category_traits<Iterator> non_category_traits;
public:
typedef typename non_category_traits::value_type value_type;
typedef typename non_category_traits::difference_type difference_type;
typedef typename non_category_traits::pointer pointer;
typedef typename non_category_traits::reference reference;
# endif
# if !defined(BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF)
typedef typename Iterator::iterator_category iterator_category;
# else
typedef typename iterator_category_select<Iterator>::type iterator_category;
# endif
};
};
} // namespace boost::detail::iterator_traits_
template <class Iterator>
struct iterator_traits
: iterator_traits_::iterator_traits_select<is_pointer<Iterator>::value>::template traits<Iterator>
{
private:
typedef typename iterator_traits_::iterator_traits_select<
is_pointer<remove_cv<Iterator>::type>::value>::template traits<Iterator> traits;
public:
// Why do I need to define these typedefs? It keeps MSVC happy somehow.
// Why don't I need to define the other typedefs? Who knows?!?
typedef typename traits::difference_type difference_type;
typedef typename traits::iterator_category iterator_category;
};
namespace iterator_traits_ {
template <class Category>
struct distance_select {
template <class Iterator>
static typename ::boost::detail::iterator_traits<Iterator>::difference_type
distance(Iterator i1, const Iterator i2)
{
typename ::boost::detail::iterator_traits<Iterator>::difference_type result = 0;
while (i1 != i2)
{
++i1;
++result;
}
return result;
}
};
template <>
struct distance_select<std::random_access_iterator_tag> {
template <class Iterator>
static typename ::boost::detail::iterator_traits<Iterator>::difference_type
distance(const Iterator i1, const Iterator i2)
{
return i2 - i1;
}
};
} // namespace boost::detail::iterator_traits_
template <class Iterator>
inline typename ::boost::detail::iterator_traits<Iterator>::difference_type
distance(const Iterator& first, const Iterator& last)
{
typedef typename ::boost::detail::iterator_traits<Iterator>::iterator_category iterator_category;
return iterator_traits_::distance_select<iterator_category>::distance(first, last);
}
# endif // workarounds
}} // namespace boost::detail
# undef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF
# undef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION
#endif // ITERATOR_DWA122600_HPP_

View File

@ -0,0 +1,36 @@
// boost/detail/lightweight_main.hpp -------------------------------------------------//
// Copyright Beman Dawes 2010
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#include <iostream>
#include <exception>
//--------------------------------------------------------------------------------------//
// //
// exception reporting main() that calls cpp_main() //
// //
//--------------------------------------------------------------------------------------//
int cpp_main(int argc, char* argv[]);
int main(int argc, char* argv[])
{
try
{
return cpp_main(argc, argv);
}
catch (const std::exception& ex)
{
std::cout
<< "\nERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR\n"
<< "\n****************************** std::exception *****************************\n"
<< ex.what()
<< "\n***************************************************************************\n"
<< std::endl;
}
return 1;
}

View File

@ -0,0 +1,56 @@
// boost/detail/lightweight_test_reporter.hpp ----------------------------------------//
// Copyright Beman Dawes 2014
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
//--------------------------------------------------------------------------------------//
// //
// Configuration reporting cpp_main() //
// //
// Displays configuration information, then returns test_main(argc, argv), which //
// must be supplied by the user. //
// //
// Note: cpp_main(argc, argv) is called from a try block in main(), which is //
// supplied by <boost/detail/lightweight_main.hpp> as is a catch block that reports //
// std::exception what(). //
// //
//--------------------------------------------------------------------------------------//
#include <boost/config.hpp>
#include <boost/version.hpp>
#include <boost/detail/lightweight_test.hpp>
#include <boost/detail/lightweight_main.hpp>
#include <iostream>
int test_main(int argc, char* argv[]);
int cpp_main(int argc, char* argv[])
{
std::cout << BOOST_COMPILER
#ifdef __GNUC__
<< ", __GXX_EXPERIMENTAL_CXX0X__ "
# ifdef __GXX_EXPERIMENTAL_CXX0X__
"defined"
# else
"not defined"
# endif
#endif
<< "\n"
<< BOOST_STDLIB << "\n"
<< BOOST_PLATFORM << "\n"
<< "Boost version " << BOOST_VERSION / 100000 << '.'
<< BOOST_VERSION / 100 % 1000 << '.' << BOOST_VERSION % 100 << "\n";
std::cout << "Command line: ";
for (int a = 0; a < argc; ++a)
{
std::cout << argv[a];
if (a != argc - 1)
std::cout << ' ';
}
std::cout << std::endl;
return test_main(argc, argv);
}

View File

@ -1,8 +1,7 @@
// (C) Copyright Jeremy Siek 2001. Permission to copy, use, modify,
// sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
// (C) Copyright Jeremy Siek 2001.
// 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)
// Revision History:
@ -12,9 +11,10 @@
#ifndef BOOST_DETAIL_NAMED_TEMPLATE_PARAMS_HPP
#define BOOST_DETAIL_NAMED_TEMPLATE_PARAMS_HPP
#include <boost/config.hpp>
#include <boost/type_traits/conversion_traits.hpp>
#include <boost/type_traits/composite_traits.hpp> // for is_reference
#if defined(__BORLANDC__)
#if defined(BOOST_BORLANDC)
#include <boost/type_traits/ice.hpp>
#endif
@ -58,7 +58,7 @@ namespace boost {
};
};
#if defined(__BORLANDC__)
#if defined(BOOST_BORLANDC)
template <class UseDefault>
struct choose_arg_or_default { typedef choose_arg type; };
template <>
@ -76,7 +76,7 @@ namespace boost {
template <class Arg, class DefaultGen, class Base, class Traits>
class resolve_default {
#if defined(__BORLANDC__)
#if defined(BOOST_BORLANDC)
typedef typename choose_arg_or_default<typename is_default<Arg>::type>::type Selector;
#else
// This usually works for Borland, but I'm seeing weird errors in

View File

@ -1,15 +1,8 @@
// (C) Copyright David Abrahams 2001. Permission to copy, use, modify,
// sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
// (C) Copyright David Abrahams 2001, Howard Hinnant 2001.
//
// Template class is_signed and its documentation is:
// (C) Copyright Howard Hinnant 2001. Permission to copy, use, modify,
// sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
// 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)
//
// Template class numeric_traits<Number> --
//
@ -63,65 +56,39 @@
// 21 Jan 2001 - Created (David Abrahams)
#ifndef BOOST_NUMERIC_TRAITS_HPP_DWA20001901
# define BOOST_NUMERIC_TRAITS_HPP_DWA20001901
#define BOOST_NUMERIC_TRAITS_HPP_DWA20001901
# include <boost/config.hpp>
# include <boost/cstdint.hpp>
# include <boost/static_assert.hpp>
# include <boost/type_traits.hpp>
# include <boost/detail/select_type.hpp>
# include <boost/limits.hpp>
#include <cstddef>
#include <boost/config.hpp>
#include <boost/limits.hpp>
#include <boost/cstdint.hpp>
#include <boost/type_traits/is_signed.hpp>
#include <boost/type_traits/conditional.hpp>
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_integral.hpp>
#endif
namespace boost { namespace detail {
// Template class is_signed -- determine whether a numeric type is signed
// Requires that T is constructable from the literals -1 and 0. Compile-time
// error results if that requirement is not met (and thus signedness is not
// likely to have meaning for that type).
template <class Number>
struct is_signed
{
#if defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) || defined(BOOST_MSVC) && BOOST_MSVC <= 1300
BOOST_STATIC_CONSTANT(bool, value = (Number(-1) < Number(0)));
#else
BOOST_STATIC_CONSTANT(bool, value = std::numeric_limits<Number>::is_signed);
#endif
};
# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
// digit_traits - compute the number of digits in a built-in integer
// type. Needed for implementations on which numeric_limits is not specialized
// for intmax_t (e.g. VC6).
template <bool is_specialized> struct digit_traits_select;
// numeric_limits is specialized; just select that version of digits
template <> struct digit_traits_select<true>
// for some integer types, like __int128 in libstdc++ (gcc).
template <class T, bool IsSpecialized = std::numeric_limits<T>::is_specialized>
struct digit_traits
{
template <class T> struct traits
{
BOOST_STATIC_CONSTANT(int, digits = std::numeric_limits<T>::digits);
};
BOOST_STATIC_CONSTANT(int, digits = std::numeric_limits<T>::digits);
};
// numeric_limits is not specialized; compute digits from sizeof(T)
template <> struct digit_traits_select<false>
template <class T>
struct digit_traits<T, false>
{
template <class T> struct traits
{
BOOST_STATIC_CONSTANT(int, digits = (
sizeof(T) * std::numeric_limits<unsigned char>::digits
- (is_signed<T>::value ? 1 : 0))
);
};
};
// here's the "usable" template
template <class T> struct digit_traits
{
typedef digit_traits_select<
::std::numeric_limits<T>::is_specialized> selector;
typedef typename selector::template traits<T> traits;
BOOST_STATIC_CONSTANT(int, digits = traits::digits);
BOOST_STATIC_CONSTANT(int, digits = (
sizeof(T) * std::numeric_limits<unsigned char>::digits
- (boost::is_signed<T>::value ? 1 : 0))
);
};
#endif
@ -131,53 +98,48 @@ namespace boost { namespace detail {
template <class Integer>
struct integer_traits
{
# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
private:
typedef Integer integer_type;
typedef std::numeric_limits<integer_type> x;
# if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
// for some reason, MSVC asserts when it shouldn't unless we make these
// local definitions
BOOST_STATIC_CONSTANT(bool, is_integer = x::is_integer);
BOOST_STATIC_CONSTANT(bool, is_specialized = x::is_specialized);
BOOST_STATIC_ASSERT(is_integer);
BOOST_STATIC_ASSERT(is_specialized);
# endif
public:
typedef typename
if_true<(int(x::is_signed)
&& (!int(x::is_bounded)
// digits is the number of no-sign bits
|| (int(x::digits) + 1 >= digit_traits<boost::intmax_t>::digits)))>::template then<
typedef typename boost::conditional<
(int(x::is_signed)
&& (!int(x::is_bounded)
// digits is the number of no-sign bits
|| (int(x::digits) + 1 >= digit_traits<boost::intmax_t>::digits))),
Integer,
typename if_true<(int(x::digits) + 1 < digit_traits<signed int>::digits)>::template then<
signed int,
typename if_true<(int(x::digits) + 1 < digit_traits<signed long>::digits)>::template then<
signed long,
typename boost::conditional<
(int(x::digits) + 1 < digit_traits<signed int>::digits),
signed int,
// else
intmax_t
>::type>::type>::type difference_type;
typename boost::conditional<
(int(x::digits) + 1 < digit_traits<signed long>::digits),
signed long,
boost::intmax_t
>::type
>::type
>::type difference_type;
#else
BOOST_STATIC_ASSERT(boost::is_integral<Integer>::value);
typedef typename
if_true<(sizeof(Integer) >= sizeof(intmax_t))>::template then<
typename if_true<(is_signed<Integer>::value)>::template then<
Integer,
intmax_t
>::type,
typedef typename boost::conditional<
(sizeof(Integer) >= sizeof(intmax_t)),
typename if_true<(sizeof(Integer) < sizeof(std::ptrdiff_t))>::template then<
boost::conditional<
(boost::is_signed<Integer>::value),
Integer,
boost::intmax_t
>,
boost::conditional<
(sizeof(Integer) < sizeof(std::ptrdiff_t)),
std::ptrdiff_t,
intmax_t
>::type
>::type difference_type;
# endif
boost::intmax_t
>
>::type::type difference_type;
#endif
};
// Right now, only supports integers, but should be expanded.
@ -188,7 +150,7 @@ namespace boost { namespace detail {
};
template <class Number>
typename numeric_traits<Number>::difference_type numeric_distance(Number x, Number y)
inline BOOST_CONSTEXPR typename numeric_traits<Number>::difference_type numeric_distance(Number x, Number y)
{
typedef typename numeric_traits<Number>::difference_type difference_type;
return difference_type(y) - difference_type(x);

View File

@ -0,0 +1,120 @@
//-----------------------------------------------------------------------------
// boost detail/reference_content.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003
// Eric Friedman
//
// 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_DETAIL_REFERENCE_CONTENT_HPP
#define BOOST_DETAIL_REFERENCE_CONTENT_HPP
#include "boost/config.hpp"
# include "boost/type_traits/integral_constant.hpp"
# include "boost/type_traits/has_nothrow_copy.hpp"
namespace boost {
namespace detail {
struct void_type {};
///////////////////////////////////////////////////////////////////////////////
// (detail) class template reference_content
//
// Non-Assignable wrapper for references.
//
template <typename RefT>
class reference_content
{
private: // representation
RefT content_;
public: // structors
~reference_content()
{
}
reference_content(RefT r)
: content_( r )
{
}
reference_content(const reference_content& operand)
: content_( operand.content_ )
{
}
private: // non-Assignable
reference_content& operator=(const reference_content&);
public: // queries
RefT get() const
{
return content_;
}
};
///////////////////////////////////////////////////////////////////////////////
// (detail) metafunction make_reference_content
//
// Wraps with reference_content if specified type is reference.
//
template <typename T = void_type> struct make_reference_content;
template <typename T>
struct make_reference_content
{
typedef T type;
};
template <typename T>
struct make_reference_content< T& >
{
typedef reference_content<T&> type;
};
template <>
struct make_reference_content< void_type >
{
template <typename T>
struct apply
: make_reference_content<T>
{
};
typedef void_type type;
};
} // namespace detail
///////////////////////////////////////////////////////////////////////////////
// reference_content<T&> type traits specializations
//
template <typename T>
struct has_nothrow_copy<
::boost::detail::reference_content< T& >
>
: boost::true_type
{
};
} // namespace boost
#endif // BOOST_DETAIL_REFERENCE_CONTENT_HPP

View File

@ -1,8 +1,7 @@
// (C) Copyright David Abrahams 2001. Permission to copy, use, modify,
// sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
// (C) Copyright David Abrahams 2001.
// 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)
//
// See http://www.boost.org for most recent version including documentation.

View File

@ -0,0 +1,74 @@
//-----------------------------------------------------------------------------
// boost detail/templated_streams.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003
// Eric Friedman
//
// 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_DETAIL_TEMPLATED_STREAMS_HPP
#define BOOST_DETAIL_TEMPLATED_STREAMS_HPP
#include "boost/config.hpp"
///////////////////////////////////////////////////////////////////////////////
// (detail) BOOST_TEMPLATED_STREAM_* macros
//
// Provides workaround platforms without stream class templates.
//
#if !defined(BOOST_NO_STD_LOCALE)
#define BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) \
template < typename E , typename T >
#define BOOST_TEMPLATED_STREAM_TEMPLATE_ALLOC(E,T,A) \
template < typename E , typename T , typename A >
#define BOOST_TEMPLATED_STREAM_ARGS(E,T) \
typename E , typename T
#define BOOST_TEMPLATED_STREAM_ARGS_ALLOC(E,T,A) \
typename E , typename T , typename A
#define BOOST_TEMPLATED_STREAM_COMMA ,
#define BOOST_TEMPLATED_STREAM_ELEM(E) E
#define BOOST_TEMPLATED_STREAM_TRAITS(T) T
#define BOOST_TEMPLATED_STREAM_ALLOC(A) A
#define BOOST_TEMPLATED_STREAM(X,E,T) \
BOOST_JOIN(std::basic_,X)< E , T >
#define BOOST_TEMPLATED_STREAM_WITH_ALLOC(X,E,T,A) \
BOOST_JOIN(std::basic_,X)< E , T , A >
#else // defined(BOOST_NO_STD_LOCALE)
#define BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) /**/
#define BOOST_TEMPLATED_STREAM_TEMPLATE_ALLOC(E,T,A) /**/
#define BOOST_TEMPLATED_STREAM_ARGS(E,T) /**/
#define BOOST_TEMPLATED_STREAM_ARGS_ALLOC(E,T,A) /**/
#define BOOST_TEMPLATED_STREAM_COMMA /**/
#define BOOST_TEMPLATED_STREAM_ELEM(E) char
#define BOOST_TEMPLATED_STREAM_TRAITS(T) std::char_traits<char>
#define BOOST_TEMPLATED_STREAM_ALLOC(A) std::allocator<char>
#define BOOST_TEMPLATED_STREAM(X,E,T) \
std::X
#define BOOST_TEMPLATED_STREAM_WITH_ALLOC(X,E,T,A) \
std::X
#endif // BOOST_NO_STD_LOCALE
#endif // BOOST_DETAIL_TEMPLATED_STREAMS_HPP

View File

@ -0,0 +1,219 @@
// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu)
// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu).
// 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)
#ifndef BOOST_UTF8_CODECVT_FACET_HPP
#define BOOST_UTF8_CODECVT_FACET_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// utf8_codecvt_facet.hpp
// This header defines class utf8_codecvt_facet, derived from
// std::codecvt<wchar_t, char>, which can be used to convert utf8 data in
// files into wchar_t strings in the application.
//
// The header is NOT STANDALONE, and is not to be included by the USER.
// There are at least two libraries which want to use this functionality, and
// we want to avoid code duplication. It would be possible to create utf8
// library, but:
// - this requires review process first
// - in the case, when linking the a library which uses utf8
// (say 'program_options'), user should also link to the utf8 library.
// This seems inconvenient, and asking a user to link to an unrevieved
// library is strange.
// Until the above points are fixed, a library which wants to use utf8 must:
// - include this header in one of it's headers or sources
// - include the corresponding boost/detail/utf8_codecvt_facet.ipp file in one
// of its sources
// - before including either file, the library must define
// - BOOST_UTF8_BEGIN_NAMESPACE to the namespace declaration that must be used
// - BOOST_UTF8_END_NAMESPACE to the code to close the previous namespace
// declaration.
// - BOOST_UTF8_DECL -- to the code which must be used for all 'exportable'
// symbols.
//
// For example, program_options library might contain:
// #define BOOST_UTF8_BEGIN_NAMESPACE <backslash character>
// namespace boost { namespace program_options {
// #define BOOST_UTF8_END_NAMESPACE }}
// #define BOOST_UTF8_DECL BOOST_PROGRAM_OPTIONS_DECL
// #include <boost/detail/utf8_codecvt_facet.ipp>
//
// Essentially, each library will have its own copy of utf8 code, in
// different namespaces.
// Note:(Robert Ramey). I have made the following alterations in the original
// code.
// a) Rendered utf8_codecvt<wchar_t, char> with using templates
// b) Move longer functions outside class definition to prevent inlining
// and make code smaller
// c) added on a derived class to permit translation to/from current
// locale to utf8
// See http://www.boost.org for updates, documentation, and revision history.
// archives stored as text - note these ar templated on the basic
// stream templates to accommodate wide (and other?) kind of characters
//
// note the fact that on libraries without wide characters, ostream is
// is not a specialization of basic_ostream which in fact is not defined
// in such cases. So we can't use basic_ostream<OStream::char_type> but rather
// use two template parameters
//
// utf8_codecvt_facet
// This is an implementation of a std::codecvt facet for translating
// from UTF-8 externally to UCS-4. Note that this is not tied to
// any specific types in order to allow customization on platforms
// where wchar_t is not big enough.
//
// NOTES: The current implementation jumps through some unpleasant hoops in
// order to deal with signed character types. As a std::codecvt_base::result,
// it is necessary for the ExternType to be convertible to unsigned char.
// I chose not to tie the extern_type explicitly to char. But if any combination
// of types other than <wchar_t,char_t> is used, then std::codecvt must be
// specialized on those types for this to work.
#include <locale>
#include <cwchar> // for mbstate_t
#include <cstddef> // for std::size_t
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std {
using ::mbstate_t;
using ::size_t;
}
#endif
// maximum lenght of a multibyte string
#define MB_LENGTH_MAX 8
BOOST_UTF8_BEGIN_NAMESPACE
//----------------------------------------------------------------------------//
// //
// utf8_codecvt_facet //
// //
// See utf8_codecvt_facet.ipp for the implementation. //
//----------------------------------------------------------------------------//
#ifndef BOOST_UTF8_DECL
#define BOOST_UTF8_DECL
#endif
struct BOOST_UTF8_DECL utf8_codecvt_facet :
public std::codecvt<wchar_t, char, std::mbstate_t>
{
public:
explicit utf8_codecvt_facet(std::size_t no_locale_manage=0);
virtual ~utf8_codecvt_facet();
protected:
virtual std::codecvt_base::result do_in(
std::mbstate_t& state,
const char * from,
const char * from_end,
const char * & from_next,
wchar_t * to,
wchar_t * to_end,
wchar_t*& to_next
) const;
virtual std::codecvt_base::result do_out(
std::mbstate_t & state,
const wchar_t * from,
const wchar_t * from_end,
const wchar_t* & from_next,
char * to,
char * to_end,
char * & to_next
) const;
bool invalid_continuing_octet(unsigned char octet_1) const {
return (octet_1 < 0x80|| 0xbf< octet_1);
}
bool invalid_leading_octet(unsigned char octet_1) const {
return (0x7f < octet_1 && octet_1 < 0xc0) ||
(octet_1 > 0xfd);
}
// continuing octets = octets except for the leading octet
static unsigned int get_cont_octet_count(unsigned char lead_octet) {
return get_octet_count(lead_octet) - 1;
}
static unsigned int get_octet_count(unsigned char lead_octet);
// How many "continuing octets" will be needed for this word
// == total octets - 1.
int get_cont_octet_out_count(wchar_t word) const ;
virtual bool do_always_noconv() const BOOST_NOEXCEPT_OR_NOTHROW {
return false;
}
// UTF-8 isn't really stateful since we rewind on partial conversions
virtual std::codecvt_base::result do_unshift(
std::mbstate_t&,
char * from,
char * /*to*/,
char * & next
) const {
next = from;
return ok;
}
virtual int do_encoding() const BOOST_NOEXCEPT_OR_NOTHROW {
const int variable_byte_external_encoding=0;
return variable_byte_external_encoding;
}
// How many char objects can I process to get <= max_limit
// wchar_t objects?
virtual int do_length(
std::mbstate_t &,
const char * from,
const char * from_end,
std::size_t max_limit
) const
#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
throw()
#endif
;
// Nonstandard override
virtual int do_length(
const std::mbstate_t & s,
const char * from,
const char * from_end,
std::size_t max_limit
) const
#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
throw()
#endif
{
return do_length(
const_cast<std::mbstate_t &>(s),
from,
from_end,
max_limit
);
}
// Largest possible value do_length(state,from,from_end,1) could return.
virtual int do_max_length() const BOOST_NOEXCEPT_OR_NOTHROW {
return 6; // largest UTF-8 encoding of a UCS-4 character
}
};
BOOST_UTF8_END_NAMESPACE
#endif // BOOST_UTF8_CODECVT_FACET_HPP

View File

@ -0,0 +1,292 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// utf8_codecvt_facet.ipp
// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu)
// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu).
// Use, modification and distribution is subject to 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)
// Please see the comments in <boost/detail/utf8_codecvt_facet.hpp> to
// learn how this file should be used.
#include <boost/detail/utf8_codecvt_facet.hpp>
#include <cstdlib> // for multi-byte converson routines
#include <cassert>
#include <boost/limits.hpp>
#include <boost/config.hpp>
// If we don't have wstring, then Unicode support
// is not available anyway, so we don't need to even
// compiler this file. This also fixes the problem
// with mingw, which can compile this file, but will
// generate link error when building DLL.
#ifndef BOOST_NO_STD_WSTRING
BOOST_UTF8_BEGIN_NAMESPACE
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// implementation for wchar_t
utf8_codecvt_facet::utf8_codecvt_facet(
std::size_t no_locale_manage
) :
std::codecvt<wchar_t, char, std::mbstate_t>(no_locale_manage)
{}
utf8_codecvt_facet::~utf8_codecvt_facet()
{}
// Translate incoming UTF-8 into UCS-4
std::codecvt_base::result utf8_codecvt_facet::do_in(
std::mbstate_t& /*state*/,
const char * from,
const char * from_end,
const char * & from_next,
wchar_t * to,
wchar_t * to_end,
wchar_t * & to_next
) const {
// Basic algorithm: The first octet determines how many
// octets total make up the UCS-4 character. The remaining
// "continuing octets" all begin with "10". To convert, subtract
// the amount that specifies the number of octets from the first
// octet. Subtract 0x80 (1000 0000) from each continuing octet,
// then mash the whole lot together. Note that each continuing
// octet only uses 6 bits as unique values, so only shift by
// multiples of 6 to combine.
while (from != from_end && to != to_end) {
// Error checking on the first octet
if (invalid_leading_octet(*from)){
from_next = from;
to_next = to;
return std::codecvt_base::error;
}
// The first octet is adjusted by a value dependent upon
// the number of "continuing octets" encoding the character
const int cont_octet_count = get_cont_octet_count(*from);
const wchar_t octet1_modifier_table[] = {
0x00, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc
};
// The unsigned char conversion is necessary in case char is
// signed (I learned this the hard way)
wchar_t ucs_result =
(unsigned char)(*from++) - octet1_modifier_table[cont_octet_count];
// Invariants :
// 1) At the start of the loop, 'i' continuing characters have been
// processed
// 2) *from points to the next continuing character to be processed.
int i = 0;
while(i != cont_octet_count && from != from_end) {
// Error checking on continuing characters
if (invalid_continuing_octet(*from)) {
from_next = from;
to_next = to;
return std::codecvt_base::error;
}
ucs_result *= (1 << 6);
// each continuing character has an extra (10xxxxxx)b attached to
// it that must be removed.
ucs_result += (unsigned char)(*from++) - 0x80;
++i;
}
// If the buffer ends with an incomplete unicode character...
if (from == from_end && i != cont_octet_count) {
// rewind "from" to before the current character translation
from_next = from - (i+1);
to_next = to;
return std::codecvt_base::partial;
}
*to++ = ucs_result;
}
from_next = from;
to_next = to;
// Were we done converting or did we run out of destination space?
if(from == from_end) return std::codecvt_base::ok;
else return std::codecvt_base::partial;
}
std::codecvt_base::result utf8_codecvt_facet::do_out(
std::mbstate_t& /*state*/,
const wchar_t * from,
const wchar_t * from_end,
const wchar_t * & from_next,
char * to,
char * to_end,
char * & to_next
) const
{
// RG - consider merging this table with the other one
const wchar_t octet1_modifier_table[] = {
0x00, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc
};
wchar_t max_wchar = (std::numeric_limits<wchar_t>::max)();
while (from != from_end && to != to_end) {
// Check for invalid UCS-4 character
if (*from > max_wchar) {
from_next = from;
to_next = to;
return std::codecvt_base::error;
}
int cont_octet_count = get_cont_octet_out_count(*from);
// RG - comment this formula better
int shift_exponent = (cont_octet_count) * 6;
// Process the first character
*to++ = static_cast<char>(octet1_modifier_table[cont_octet_count] +
(unsigned char)(*from / (1 << shift_exponent)));
// Process the continuation characters
// Invariants: At the start of the loop:
// 1) 'i' continuing octets have been generated
// 2) '*to' points to the next location to place an octet
// 3) shift_exponent is 6 more than needed for the next octet
int i = 0;
while (i != cont_octet_count && to != to_end) {
shift_exponent -= 6;
*to++ = static_cast<char>(0x80 + ((*from / (1 << shift_exponent)) % (1 << 6)));
++i;
}
// If we filled up the out buffer before encoding the character
if(to == to_end && i != cont_octet_count) {
from_next = from;
to_next = to - (i+1);
return std::codecvt_base::partial;
}
++from;
}
from_next = from;
to_next = to;
// Were we done or did we run out of destination space
if(from == from_end) return std::codecvt_base::ok;
else return std::codecvt_base::partial;
}
// How many char objects can I process to get <= max_limit
// wchar_t objects?
int utf8_codecvt_facet::do_length(
std::mbstate_t &,
const char * from,
const char * from_end,
std::size_t max_limit
) const
#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
throw()
#endif
{
// RG - this code is confusing! I need a better way to express it.
// and test cases.
// Invariants:
// 1) last_octet_count has the size of the last measured character
// 2) char_count holds the number of characters shown to fit
// within the bounds so far (no greater than max_limit)
// 3) from_next points to the octet 'last_octet_count' before the
// last measured character.
int last_octet_count=0;
std::size_t char_count = 0;
const char* from_next = from;
// Use "<" because the buffer may represent incomplete characters
while (from_next+last_octet_count <= from_end && char_count <= max_limit) {
from_next += last_octet_count;
last_octet_count = (get_octet_count(*from_next));
++char_count;
}
return static_cast<int>(from_next-from);
}
unsigned int utf8_codecvt_facet::get_octet_count(
unsigned char lead_octet
){
// if the 0-bit (MSB) is 0, then 1 character
if (lead_octet <= 0x7f) return 1;
// Otherwise the count number of consecutive 1 bits starting at MSB
// assert(0xc0 <= lead_octet && lead_octet <= 0xfd);
if (0xc0 <= lead_octet && lead_octet <= 0xdf) return 2;
else if (0xe0 <= lead_octet && lead_octet <= 0xef) return 3;
else if (0xf0 <= lead_octet && lead_octet <= 0xf7) return 4;
else if (0xf8 <= lead_octet && lead_octet <= 0xfb) return 5;
else return 6;
}
namespace detail {
template<std::size_t s>
int get_cont_octet_out_count_impl(wchar_t word){
if (word < 0x80) {
return 0;
}
if (word < 0x800) {
return 1;
}
return 2;
}
template<>
int get_cont_octet_out_count_impl<4>(wchar_t word){
if (word < 0x80) {
return 0;
}
if (word < 0x800) {
return 1;
}
// Note that the following code will generate warnings on some platforms
// where wchar_t is defined as UCS2. The warnings are superfluous as the
// specialization is never instantitiated with such compilers, but this
// can cause problems if warnings are being treated as errors, so we guard
// against that. Including <boost/detail/utf8_codecvt_facet.hpp> as we do
// should be enough to get WCHAR_MAX defined.
#if !defined(WCHAR_MAX)
# error WCHAR_MAX not defined!
#endif
// cope with VC++ 7.1 or earlier having invalid WCHAR_MAX
#if defined(_MSC_VER) && _MSC_VER <= 1310 // 7.1 or earlier
return 2;
#elif WCHAR_MAX > 0x10000
if (word < 0x10000) {
return 2;
}
if (word < 0x200000) {
return 3;
}
if (word < 0x4000000) {
return 4;
}
return 5;
#else
return 2;
#endif
}
} // namespace detail
// How many "continuing octets" will be needed for this word
// == total octets - 1.
int utf8_codecvt_facet::get_cont_octet_out_count(
wchar_t word
) const {
return detail::get_cont_octet_out_count_impl<sizeof(wchar_t)>(word);
}
BOOST_UTF8_END_NAMESPACE
#endif

View File

@ -1,12 +0,0 @@
// -*- C++ -*- forwarding header.
#ifndef BOOST_CSTDDEF_HPP
#define BOOST_CSTDDEF_HPP
#if defined(__sgi) && !defined(__GNUC__)
# include <stddef.h>
#else
# include <cstddef>
#endif
#endif

View File

@ -1,101 +0,0 @@
// (C) Copyright Jeremy Siek 2000. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
// The ct_if implementation that avoids partial specialization is
// based on the IF class by Ulrich W. Eisenecker and Krzysztof
// Czarnecki.
#ifndef BOOST_CT_IF_HPP
#define BOOST_CT_IF_HPP
#include <boost/config.hpp>
/*
There is a bug in the Borland compiler with regards to using
integers to specialize templates. This made it hard to use ct_if in
the graph library. Changing from 'ct_if' to 'ct_if_t' fixed the
problem.
*/
namespace boost {
struct ct_if_error { };
struct true_type { enum { value = true }; };
struct false_type { enum { value = false }; };
template <class A, class B>
struct ct_and { typedef false_type type; };
template <> struct ct_and<true_type,true_type> { typedef true_type type; };
template <class A> struct ct_not { typedef ct_if_error type; };
template <> struct ct_not<true_type> { typedef false_type type; };
template <> struct ct_not<false_type> { typedef true_type type; };
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <int cond, class A, class B>
struct ct_if { typedef ct_if_error type; };
template <class A, class B>
struct ct_if<1, A, B> { typedef A type; };
template <class A, class B>
struct ct_if<0, A, B> { typedef B type; };
template <class cond, class A, class B>
struct ct_if_t { typedef ct_if_error type; };
template <class A, class B>
struct ct_if_t<true_type, A, B> { typedef A type; };
template <class A, class B>
struct ct_if_t<false_type, A, B> { typedef B type; };
#else
namespace detail {
template <int condition, class A, class B> struct IF;
template <int condition> struct SlectSelector;
struct SelectFirstType;
struct SelectSecondType;
struct SelectFirstType {
template<class A, class B>
struct Template { typedef A type; };
};
struct SelectSecondType {
template<class A, class B>
struct Template { typedef B type; };
};
template<int condition>
struct SlectSelector {
typedef SelectFirstType type;
};
template <>
struct SlectSelector<0> {
typedef SelectSecondType type;
};
} // namespace detail
template<int condition, class A, class B>
struct ct_if
{
typedef typename detail::SlectSelector<condition>::type Selector;
typedef typename Selector::template Template<A, B>::type type;
};
template <class cond, class A, class B>
struct ct_if_t {
typedef typename ct_if<cond::value, A, B>::type type;
};
#endif
} // namespace boost
#endif // BOOST_CT_IF_HPP

View File

@ -1,19 +0,0 @@
// (C) Copyright David Abrahams 2001. Permission to copy, use,
// modify, sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
#ifndef BOOST_TYPE_DWA20010120_HPP
# define BOOST_TYPE_DWA20010120_HPP
namespace boost {
// Just a simple "type envelope". Useful in various contexts, mostly to work
// around some MSVC deficiencies.
template <class T>
struct type {};
}
#endif // BOOST_TYPE_DWA20010120_HPP

View File

@ -1,35 +0,0 @@
// Boost.Signals library
//
// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies.
// Permission to modify the code and to distribute modified code is granted
// provided this copyright notice appears in all copies, and a notice
// that the code was modified is included with the copyright notice.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
// For more information, see http://www.boost.org
#ifndef BOOST_VISIT_EACH_HPP
#define BOOST_VISIT_EACH_HPP
#include <boost/config.hpp>
namespace boost {
template<typename Visitor, typename T>
inline void visit_each(Visitor& visitor, const T& t, long)
{
visitor(t);
}
template<typename Visitor, typename T>
inline void visit_each(Visitor& visitor, const T& t)
{
visit_each(visitor, t, 0);
}
}
#endif // BOOST_VISIT_EACH_HPP

14
index.html Normal file
View File

@ -0,0 +1,14 @@
<!--
Copyright 2016 Rene Rivera
Distributed under the Boost Software License, Version 1.0. (See the accompanying
file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
-->
<html>
<head>
<meta http-equiv="refresh" content="0; URL=./doc/html/index.html">
</head>
<body>
<p>Automatic redirection failed, please go to
<a href="./doc/html/index.html">./doc/html/index.html</a>.</p>
</body>
</html>

27
meta/libraries.json Normal file
View File

@ -0,0 +1,27 @@
{
"key": "detail",
"name": "Detail",
"status": "hidden",
"authors": [
"David Abrahams",
"Beman Dawes",
"Eric Friedman",
"Ronald Garcia",
"Howard Hinnant",
"Daniel James",
"Bryce Lelbach",
"Joaquin M Lopez Munoz",
"Jeremy Siek",
"Matthias Troyerk"
],
"description": "This library contains a set of header only utilities used internally by Boost C++ Libraries to facilitate their implementation.",
"category": [
"Miscellaneous"
],
"maintainers": [
"Beman Dawes <bdawes -at- acm.org>",
"Robert Ramey <ramey -at- rrsd.com>",
"Rene Rivera <grafikrobot -at- gmail.com>",
"Andrey Semashev <andrey.semashev -at- gmail.com>"
]
}

33
test/Jamfile Normal file
View File

@ -0,0 +1,33 @@
################################################################*# Jam #*#######
# Copyright (C) 2010 Bryce Lelbach
#
# 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)
################################################################################
build-project container_fwd ;
project detail/test
: requirements
<toolset>clang:<cxxflags>-Wno-unused
<toolset>clang:<cxxflags>-Wno-tautological-compare
<toolset>clang:<cxxflags>-ftemplate-depth-300
<toolset>gcc:<cxxflags>-ftemplate-depth-300
<toolset>gcc:<define>_STLP_DEBUG
# Do not enable libstdc++ debug mode because of gcc 10.1 bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95289
# <toolset>gcc:<define>_GLIBCXX_DEBUG
<toolset>darwin:<cxxflags>-ftemplate-depth-300
;
# import rules for testing conditional on config file variables
import ../../config/checks/config : requires ;
run binary_search_test.cpp ;
run blank_test.cpp ;
run is_sorted_test.cpp ;
run numeric_traits_test.cpp ;
run is_xxx_test.cpp ;
# run test_utf8_codecvt.cpp : : : [ requires std_wstreambuf ] ;
run test_utf8_codecvt.cpp ;
run allocator_utilities_test.cpp ;
run reference_content_test.cpp ;

View File

@ -0,0 +1,46 @@
// Copyright 2018 Daniel James.
// 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)
#include <boost/detail/allocator_utilities.hpp>
#include <boost/static_assert.hpp>
#include <boost/core/allocator_access.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/type_traits/is_same.hpp>
#include <memory>
typedef std::allocator<int> std_int_allocator;
typedef boost::detail::allocator::rebind_to<std_int_allocator, char>::type char_allocator;
typedef boost::detail::allocator::rebind_to<char_allocator, int>::type int_allocator;
typedef boost::detail::allocator::rebind_to<int_allocator, char>::type char_allocator2;
int main()
{
BOOST_STATIC_ASSERT((!boost::is_same<char_allocator, int_allocator>::value));
BOOST_STATIC_ASSERT((boost::is_same<char_allocator, char_allocator2>::value));
// Check the constructors works okay
std_int_allocator a1;
char_allocator a2(a1);
char_allocator a2a(a2);
int_allocator a3(a2);
// Check allocate works okay
{
boost::allocator_pointer<char_allocator>::type p = a2.allocate(10);
BOOST_TEST(!!p);
a2.deallocate(p, 10);
}
// Try using the standalone construct/destroy
{
boost::allocator_pointer<int_allocator>::type p2 = a3.allocate(1);
boost::detail::allocator::construct(p2, 25);
BOOST_TEST(*p2 == 25);
boost::detail::allocator::destroy(p2);
a3.deallocate(p2, 1);
}
return boost::report_errors();
}

264
test/binary_search_test.cpp Normal file
View File

@ -0,0 +1,264 @@
// (C) Copyright David Abrahams 2000.
// 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)
#include <boost/detail/binary_search.hpp>
#include <vector>
#include <string>
#include <memory>
#include <climits>
#include <iostream>
#include <cstddef>
#include <stdlib.h> // for rand(). Would use cstdlib but VC6.4 doesn't put it in std::
#include <list>
#include <utility>
#include <algorithm>
#include <boost/detail/workaround.hpp>
#include <boost/core/lightweight_test.hpp>
#if defined(__SGI_STL_PORT) ? defined(__SGI_STL_OWN_IOSTREAMS) : (!defined(__GNUC__) || __GNUC__ > 2)
# define USE_SSTREAM
#endif
#ifdef USE_SSTREAM
# include <sstream>
#else
# include <strstream>
#endif
namespace {
// In order to get ADL to find the comparison operators defined below, they have
struct mystring : std::string
{
typedef std::string base;
mystring(std::string const& x)
: base(x) {}
};
typedef std::vector<mystring> string_vector;
const std::size_t sequence_length = 1000;
unsigned random_number()
{
return static_cast<unsigned>(::rand()) % sequence_length;
}
# ifndef USE_SSTREAM
class unfreezer {
public:
unfreezer(std::ostrstream& s) : m_stream(s) {}
~unfreezer() { m_stream.freeze(false); }
private:
std::ostrstream& m_stream;
};
# endif
template <class T>
void push_back_random_number_string(T& seq)
{
unsigned value = random_number();
# if defined(__SGI_STL_PORT) ? defined(__SGI_STL_OWN_IOSTREAMS) : (!defined(__GNUC__) || __GNUC__ > 2)
std::ostringstream s;
s << value;
seq.push_back(s.str());
# else
std::ostrstream s;
auto unfreezer unfreeze(s);
s << value << char(0);
seq.push_back(std::string(s.str()));
# endif
}
inline unsigned to_int(unsigned x) { return x; }
inline unsigned to_int(const std::string& x) { return atoi(x.c_str()); }
struct cmp
{
template <class A1, class A2>
inline bool operator()(const A1& a1, const A2& a2) const
{
return to_int(a1) < to_int(a2);
}
};
inline bool operator<(const mystring& x, const unsigned y)
{
return to_int(x) < y;
}
inline bool operator<(const unsigned y, const mystring& x)
{
return y < to_int(x);
}
template <class T>
void sort_by_value(T& x);
template <class T>
void sort_by_value_(T& v, long)
{
std::sort(v.begin(), v.end(), cmp());
}
template <class T>
void random_sorted_sequence(T& seq)
{
seq.clear();
for (std::size_t i = 0; i < sequence_length; ++i)
{
push_back_random_number_string(seq);
}
sort_by_value(seq);
}
template <class T, class A>
void sort_by_value_(std::list<T,A>& l, int)
{
# if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) && !defined(__SGI_STL_PORT)
// VC6's standard lib doesn't have a template member function for list::sort()
std::vector<T> seq;
seq.reserve(sequence_length);
std::copy(l.begin(), l.end(), std::back_inserter(seq));
sort_by_value(seq);
std::copy(seq.begin(), seq.end(), l.begin());
# else
l.sort(cmp());
# endif
}
template <class T>
void sort_by_value(T& x)
{
(sort_by_value_)(x, 1);
}
// A way to select the comparisons with/without a Compare parameter for testing.
template <class Compare> struct searches
{
template <class Iterator, class Key>
static Iterator lower_bound(Iterator start, Iterator finish, Key key, Compare cmp)
{ return boost::detail::lower_bound(start, finish, key, cmp); }
template <class Iterator, class Key>
static Iterator upper_bound(Iterator start, Iterator finish, Key key, Compare cmp)
{ return boost::detail::upper_bound(start, finish, key, cmp); }
template <class Iterator, class Key>
static std::pair<Iterator, Iterator> equal_range(Iterator start, Iterator finish, Key key, Compare cmp)
{ return boost::detail::equal_range(start, finish, key, cmp); }
template <class Iterator, class Key>
static bool binary_search(Iterator start, Iterator finish, Key key, Compare cmp)
{ return boost::detail::binary_search(start, finish, key, cmp); }
};
struct no_compare {};
template <> struct searches<no_compare>
{
template <class Iterator, class Key>
static Iterator lower_bound(Iterator start, Iterator finish, Key key, no_compare)
{ return boost::detail::lower_bound(start, finish, key); }
template <class Iterator, class Key>
static Iterator upper_bound(Iterator start, Iterator finish, Key key, no_compare)
{ return boost::detail::upper_bound(start, finish, key); }
template <class Iterator, class Key>
static std::pair<Iterator, Iterator> equal_range(Iterator start, Iterator finish, Key key, no_compare)
{ return boost::detail::equal_range(start, finish, key); }
template <class Iterator, class Key>
static bool binary_search(Iterator start, Iterator finish, Key key, no_compare)
{ return boost::detail::binary_search(start, finish, key); }
};
template <class Sequence, class Compare>
void test_loop(Sequence& x, Compare cmp, unsigned long test_count)
{
typedef typename Sequence::const_iterator const_iterator;
for (unsigned long i = 0; i < test_count; ++i)
{
random_sorted_sequence(x);
const const_iterator start = x.begin();
const const_iterator finish = x.end();
unsigned key = random_number();
const const_iterator l = searches<Compare>::lower_bound(start, finish, key, cmp);
const const_iterator u = searches<Compare>::upper_bound(start, finish, key, cmp);
bool found_l = false;
bool found_u = false;
std::size_t index = 0;
std::size_t count = 0;
unsigned last_value = 0;
(void)last_value;
for (const_iterator p = start; p != finish; ++p)
{
if (p == l)
found_l = true;
if (p == u)
{
BOOST_TEST(found_l);
found_u = true;
}
unsigned value = to_int(*p);
BOOST_TEST(value >= last_value);
last_value = value;
if (!found_l)
{
++index;
BOOST_TEST(to_int(*p) < key);
}
else if (!found_u)
{
++count;
BOOST_TEST(to_int(*p) == key);
}
else
{
BOOST_TEST(to_int(*p) > key);
}
}
BOOST_TEST(found_l || l == finish);
BOOST_TEST(found_u || u == finish);
std::pair<const_iterator, const_iterator>
range = searches<Compare>::equal_range(start, finish, key, cmp);
BOOST_TEST(range.first == l);
BOOST_TEST(range.second == u);
bool found = searches<Compare>::binary_search(start, finish, key, cmp);
(void)found;
BOOST_TEST(found == (u != l));
std::cout << "found " << count << " copies of " << key << " at index " << index << "\n";
}
}
}
int main()
{
string_vector x;
std::cout << "=== testing random-access iterators with <: ===\n";
test_loop(x, no_compare(), 25);
std::cout << "=== testing random-access iterators with compare: ===\n";
test_loop(x, cmp(), 25);
std::list<mystring> y;
std::cout << "=== testing bidirectional iterators with <: ===\n";
test_loop(y, no_compare(), 25);
std::cout << "=== testing bidirectional iterators with compare: ===\n";
test_loop(y, cmp(), 25);
std::cerr << "******TEST PASSED******\n";
return boost::report_errors();
}

37
test/blank_test.cpp Normal file
View File

@ -0,0 +1,37 @@
// Copyright 2018 Daniel James.
// 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)
#include <boost/blank.hpp>
#include <boost/static_assert.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/type_traits/is_pod.hpp>
#include <boost/type_traits/is_empty.hpp>
#include <boost/type_traits/is_stateless.hpp>
#if !defined(BOOST_NO_IOSTREAM)
#include <sstream>
#endif
int main()
{
BOOST_STATIC_ASSERT((boost::is_pod<boost::blank>::value));
BOOST_STATIC_ASSERT((boost::is_empty<boost::blank>::value));
BOOST_STATIC_ASSERT((boost::is_stateless<boost::blank>::value));
boost::blank b1,b2;
BOOST_TEST(b1 == b2);
BOOST_TEST(b1 <= b2);
BOOST_TEST(b1 >= b2);
BOOST_TEST(!(b1 != b2));
BOOST_TEST(!(b1 < b2));
BOOST_TEST(!(b1 > b2));
#if !defined(BOOST_NO_IOSTREAM)
std::stringstream s;
s << "(" << b1 << ")";
BOOST_TEST(s.str() == "()");
#endif
return boost::report_errors();
}

View File

@ -0,0 +1,39 @@
# Copyright 2011 Daniel James.
# 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)
import testing ;
project detail/test/container_fwd
: requirements
<warnings>all
<toolset>intel:<warnings>on
<toolset>gcc:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion"
<toolset>darwin:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion"
<toolset>clang:<cxxflags>"-pedantic -Wextra -Wmismatched-tags"
<warnings-as-errors>on
;
run container_no_fwd_test.cpp ;
run container_fwd_test.cpp : : : : container_fwd ;
run container_fwd_test.cpp : :
: <define>_STLP_DEBUG <define>_GLIBCXX_DEBUG
: container_fwd_debug ;
# The 'correctly_disable' tests fail if forward declaring standard types
# could work, but is currently not being done. Unfortunately, this if often
# the case - but we can't detect it, so the tests fail and there's not much
# we can do. There are also problems because some compilers don't support
# the debug version of their libraries. So I felt it was best to stop these
# tests from running in a normal test run..
compile-fail correctly_disable_fail.cpp
: <warnings-as-errors>off
: correctly_disable ;
compile-fail correctly_disable_fail.cpp
: <warnings-as-errors>off <define>_STLP_DEBUG <define>_GLIBCXX_DEBUG
: correctly_disable_debug ;
explicit correctly_disable ;
explicit correctly_disable_debug ;

View File

@ -0,0 +1,112 @@
// Copyright 2005-2009 Daniel James.
// 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)
#include <boost/detail/container_fwd.hpp>
#if BOOST_WORKAROUND(__GNUC__, < 3) && \
!defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
template <class charT, class Allocator>
static void test(
std::basic_string<charT, std::string_char_traits<charT>, Allocator> const&)
{
}
#else
template <class charT, class Allocator>
static void test(
std::basic_string<charT, std::char_traits<charT>, Allocator> const&)
{
}
#endif
template <class T, class Allocator>
static void test(std::deque<T, Allocator> const&)
{
}
template <class T, class Allocator>
static void test(std::list<T, Allocator> const&)
{
}
template <class T, class Allocator>
static void test(std::vector<T, Allocator> const&)
{
}
template <class Key, class T, class Compare, class Allocator>
static void test(std::map<Key, T, Compare, Allocator> const&)
{
}
template <class Key, class T, class Compare, class Allocator>
static void test(std::multimap<Key, T, Compare, Allocator> const&)
{
}
template <class Key, class Compare, class Allocator>
static void test(std::set<Key, Compare, Allocator> const&)
{
}
template <class Key, class Compare, class Allocator>
static void test(std::multiset<Key, Compare, Allocator> const&)
{
}
template <std::size_t N>
static void test(std::bitset<N> const&)
{
}
template <class T>
static void test(std::complex<T> const&)
{
}
template <class X, class Y>
static void test(std::pair<X, Y> const&)
{
}
#include <deque>
#include <list>
#include <vector>
#include <map>
#include <set>
#include <bitset>
#include <string>
#include <complex>
#include <utility>
int main()
{
std::deque<int> x1;
std::list<std::string> x2;
std::vector<float> x3;
std::vector<bool> x4;
std::map<int, int> x5;
std::multimap<float, int*> x6;
std::set<std::string> x7;
std::multiset<std::vector<int> > x8;
std::bitset<10> x9;
std::string x10;
std::complex<double> x11;
std::pair<std::list<int>, char***> x12;
test(x1);
test(x2);
test(x3);
test(x4);
test(x5);
test(x6);
test(x7);
test(x8);
test(x9);
test(x10);
test(x11);
test(x12);
return 0;
}

View File

@ -0,0 +1,14 @@
// Copyright 2010 Daniel James.
// 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)
#define BOOST_DETAIL_NO_CONTAINER_FWD
#include <boost/detail/container_fwd.hpp>
int main()
{
std::set<int> x;
std::vector<std::string> y;
}

View File

@ -0,0 +1,43 @@
// Copyright 2011 Daniel James.
// 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)
// This tests if container forwarding is correctly disabled. If it isn't
// disabled it causes a compile error (which causes the test to pass).
// If it is disabled it tries container forwarding. If it doesn't work
// then there will be a compile error, indicating that it is correctly
// disabled. But if there isn't a compile error that indicates that
// container forwarding might work.
//
// Since this test only tries std::vector, it might get it wrong but I didn't
// want it to fail because of some incompatibility with a trickier class.
#define BOOST_DETAIL_TEST_CONFIG_ONLY
#include <boost/detail/container_fwd.hpp>
#if !defined(BOOST_DETAIL_NO_CONTAINER_FWD)
#error "Failing in order to pass test"
#else
#define BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD
#undef BOOST_DETAIL_CONTAINER_FWD_HPP
#undef BOOST_DETAIL_TEST_CONFIG_ONLY
#include <boost/detail/container_fwd.hpp>
template <class T, class Allocator>
void test(std::vector<T, Allocator> const&)
{
}
#include <vector>
int main ()
{
std::vector<int> x;
test(x);
}
#endif

137
test/is_sorted_test.cpp Normal file
View File

@ -0,0 +1,137 @@
/*==============================================================================
Copyright (c) 2010-2011 Bryce Lelbach
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)
==============================================================================*/
#include <boost/detail/is_sorted.hpp>
#include <iostream>
#include <boost/config.hpp>
#include <boost/array.hpp>
#include <boost/core/lightweight_test.hpp>
template<class T>
struct tracking_less {
typedef bool result_type;
typedef T first_argument_type;
typedef T second_argument_type;
#if defined(__PATHSCALE__)
tracking_less (void) { }
~tracking_less (void) { }
#endif
bool operator() (T const& x, T const& y) const {
std::cout << x << " < " << y << " == " << (x < y) << "\n";
return x < y;
}
};
template<class T>
struct tracking_less_equal {
typedef bool result_type;
typedef T first_argument_type;
typedef T second_argument_type;
#if defined(__PATHSCALE__)
tracking_less_equal (void) { }
~tracking_less_equal (void) { }
#endif
bool operator() (T const& x, T const& y) const {
std::cout << x << " <= " << y << " == " << (x <= y) << "\n";
return x <= y;
}
};
template<class T>
struct tracking_greater {
typedef bool result_type;
typedef T first_argument_type;
typedef T second_argument_type;
#if defined(__PATHSCALE__)
tracking_greater (void) { }
~tracking_greater (void) { }
#endif
bool operator() (T const& x, T const& y) const {
std::cout << x << " > " << y << " == " << (x > y) << "\n";
return x > y;
}
};
template<class T>
struct tracking_greater_equal {
typedef bool result_type;
typedef T first_argument_type;
typedef T second_argument_type;
#if defined(__PATHSCALE__)
tracking_greater_equal (void) { }
~tracking_greater_equal (void) { }
#endif
bool operator() (T const& x, T const& y) const {
std::cout << x << " >= " << y << " == " << (x >= y) << "\n";
return x >= y;
}
};
int main (void) {
#define IS_SORTED ::boost::detail::is_sorted
#define IS_SORTED_UNTIL ::boost::detail::is_sorted_until
using boost::array;
using boost::report_errors;
std::cout << std::boolalpha;
array<int, 10> a = { { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } };
array<int, 10> b = { { 0, 1, 1, 2, 5, 8, 13, 34, 55, 89 } };
array<int, 10> c = { { 0, 1, -1, 2, -3, 5, -8, 13, -21, 34 } };
tracking_less<int> lt;
tracking_less_equal<int> lte;
tracking_greater<int> gt;
tracking_greater_equal<int> gte;
BOOST_TEST_EQ(IS_SORTED_UNTIL(a.begin(), a.end()), a.end());
BOOST_TEST_EQ(IS_SORTED_UNTIL(a.begin(), a.end(), lt), a.end());
BOOST_TEST_EQ(IS_SORTED_UNTIL(a.begin(), a.end(), lte), a.end());
BOOST_TEST_EQ(IS_SORTED_UNTIL(a.rbegin(), a.rend(), gt).base(), a.rend().base());
BOOST_TEST_EQ(IS_SORTED_UNTIL(a.rbegin(), a.rend(), gte).base(), a.rend().base());
BOOST_TEST_EQ(IS_SORTED(a.begin(), a.end()), true);
BOOST_TEST_EQ(IS_SORTED(a.begin(), a.end(), lt), true);
BOOST_TEST_EQ(IS_SORTED(a.begin(), a.end(), lte), true);
BOOST_TEST_EQ(IS_SORTED(a.rbegin(), a.rend(), gt), true);
BOOST_TEST_EQ(IS_SORTED(a.rbegin(), a.rend(), gte), true);
BOOST_TEST_EQ(IS_SORTED_UNTIL(b.begin(), b.end()), b.end());
BOOST_TEST_EQ(IS_SORTED_UNTIL(b.begin(), b.end(), lt), b.end());
BOOST_TEST_EQ(IS_SORTED_UNTIL(b.begin(), b.end(), lte), &b[2]);
BOOST_TEST_EQ(IS_SORTED_UNTIL(b.rbegin(), b.rend(), gt).base(), b.rend().base());
BOOST_TEST_EQ(IS_SORTED_UNTIL(b.rbegin(), b.rend(), gte).base(), &b[2]);
BOOST_TEST_EQ(IS_SORTED(b.begin(), b.end()), true);
BOOST_TEST_EQ(IS_SORTED(b.begin(), b.end(), lt), true);
BOOST_TEST_EQ(IS_SORTED(b.begin(), b.end(), lte), false);
BOOST_TEST_EQ(IS_SORTED(b.rbegin(), b.rend(), gt), true);
BOOST_TEST_EQ(IS_SORTED(b.rbegin(), b.rend(), gte), false);
BOOST_TEST_EQ(IS_SORTED_UNTIL(c.begin(), c.end()), &c[2]);
BOOST_TEST_EQ(IS_SORTED_UNTIL(c.begin(), c.end(), lt), &c[2]);
BOOST_TEST_EQ(IS_SORTED_UNTIL(c.begin(), c.end(), lte), &c[2]);
BOOST_TEST_EQ(IS_SORTED_UNTIL(c.rbegin(), c.rend(), gt).base(), &c[8]);
BOOST_TEST_EQ(IS_SORTED_UNTIL(c.rbegin(), c.rend(), gte).base(), &c[8]);
BOOST_TEST_EQ(IS_SORTED(c.begin(), c.end()), false);
BOOST_TEST_EQ(IS_SORTED(c.begin(), c.end(), lt), false);
BOOST_TEST_EQ(IS_SORTED(c.begin(), c.end(), lte), false);
BOOST_TEST_EQ(IS_SORTED(c.rbegin(), c.rend(), gt), false);
BOOST_TEST_EQ(IS_SORTED(c.rbegin(), c.rend(), gte), false);
return report_errors();
}

23
test/is_xxx_test.cpp Normal file
View File

@ -0,0 +1,23 @@
// Copyright 2018 Daniel James.
// 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)
#include <boost/detail/is_xxx.hpp>
#include <boost/static_assert.hpp>
namespace is_xxx_test {
template <typename T> struct thing1 {};
template <typename T1, typename T2 = int> struct thing2 {};
}
BOOST_DETAIL_IS_XXX_DEF(thing1, is_xxx_test::thing1, 1);
BOOST_DETAIL_IS_XXX_DEF(thing2, is_xxx_test::thing2, 2);
BOOST_STATIC_ASSERT((is_thing1<is_xxx_test::thing1<int> >::value));
BOOST_STATIC_ASSERT((!is_thing1<is_xxx_test::thing2<int> >::value));
BOOST_STATIC_ASSERT((!is_thing2<is_xxx_test::thing1<int> >::value));
BOOST_STATIC_ASSERT((is_thing2<is_xxx_test::thing2<int> >::value));
BOOST_STATIC_ASSERT((is_thing2<is_xxx_test::thing2<int, float> >::value));
int main() {}

View File

@ -0,0 +1,422 @@
// (C) Copyright David Abrahams 2001.
// 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)
// See http://www.boost.org for most recent version including documentation.
// Revision History
// 1 Apr 2001 Fixes for ICL; use BOOST_STATIC_CONSTANT
// 11 Feb 2001 Fixes for Borland (David Abrahams)
// 23 Jan 2001 Added test for wchar_t (David Abrahams)
// 23 Jan 2001 Now statically selecting a test for signed numbers to avoid
// warnings with fancy compilers. Added commentary and
// additional dumping of traits data for tested types (David
// Abrahams).
// 21 Jan 2001 Initial version (David Abrahams)
#include <boost/detail/numeric_traits.hpp>
#include <cassert>
#include <boost/type_traits/conditional.hpp>
#include <boost/type_traits/is_signed.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/static_assert.hpp>
#include <boost/cstdint.hpp>
#include <climits>
#include <typeinfo>
#include <iostream>
#include <sstream>
#include <string>
#ifndef BOOST_NO_LIMITS
#include <limits>
#endif
// =================================================================================
// template class complement_traits<Number> --
//
// statically computes the max and min for 1s and 2s-complement binary
// numbers. This helps on platforms without <limits> support. It also shows
// an example of a recursive template that works with MSVC!
//
template <unsigned size> struct complement; // forward
// The template complement, below, does all the real work, using "poor man's
// partial specialization". We need complement_traits_aux<> so that MSVC doesn't
// complain about undefined min/max as we're trying to recursively define them.
template <class Number, unsigned size>
struct complement_traits_aux
{
BOOST_STATIC_CONSTANT(Number, max = complement<size>::template traits<Number>::max);
BOOST_STATIC_CONSTANT(Number, min = complement<size>::template traits<Number>::min);
};
template <unsigned size>
struct complement
{
template <class Number>
struct traits
{
private:
// indirection through complement_traits_aux necessary to keep MSVC happy
typedef complement_traits_aux<Number, size - 1> prev;
public:
#if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 2
// GCC 4.0.2 ICEs on these C-style casts
BOOST_STATIC_CONSTANT(Number, max =
Number((prev::max) << CHAR_BIT)
+ Number(UCHAR_MAX));
BOOST_STATIC_CONSTANT(Number, min = Number((prev::min) << CHAR_BIT));
#else
// Avoid left shifting negative integers, use multiplication instead
BOOST_STATIC_CONSTANT(Number, shift = 1u << CHAR_BIT);
BOOST_STATIC_CONSTANT(Number, max =
Number(Number(prev::max) * shift)
+ Number(UCHAR_MAX));
BOOST_STATIC_CONSTANT(Number, min = Number(Number(prev::min) * shift));
#endif
};
};
// Template class complement_base<> -- defines values for min and max for
// complement<1>, at the deepest level of recursion. Uses "poor man's partial
// specialization" again.
template <bool is_signed> struct complement_base;
template <> struct complement_base<false>
{
template <class Number>
struct values
{
BOOST_STATIC_CONSTANT(Number, min = 0);
BOOST_STATIC_CONSTANT(Number, max = UCHAR_MAX);
};
};
template <> struct complement_base<true>
{
template <class Number>
struct values
{
BOOST_STATIC_CONSTANT(Number, min = SCHAR_MIN);
BOOST_STATIC_CONSTANT(Number, max = SCHAR_MAX);
};
};
// Base specialization of complement, puts an end to the recursion.
template <>
struct complement<1>
{
template <class Number>
struct traits
{
BOOST_STATIC_CONSTANT(bool, is_signed = boost::is_signed<Number>::value);
BOOST_STATIC_CONSTANT(Number, min =
complement_base<is_signed>::template values<Number>::min);
BOOST_STATIC_CONSTANT(Number, max =
complement_base<is_signed>::template values<Number>::max);
};
};
// Now here's the "pretty" template you're intended to actually use.
// complement_traits<Number>::min, complement_traits<Number>::max are the
// minimum and maximum values of Number if Number is a built-in integer type.
template <class Number>
struct complement_traits
{
BOOST_STATIC_CONSTANT(Number, max = (complement_traits_aux<Number, sizeof(Number)>::max));
BOOST_STATIC_CONSTANT(Number, min = (complement_traits_aux<Number, sizeof(Number)>::min));
};
// =================================================================================
// Support for streaming various numeric types in exactly the format I want. I
// needed this in addition to all the assertions so that I could see exactly
// what was going on.
//
// Numbers go through a 2-stage conversion process (by default, though, no real
// conversion).
//
template <class T> struct stream_as {
typedef T t1;
typedef T t2;
};
// char types first get converted to unsigned char, then to unsigned.
template <> struct stream_as<char> {
typedef unsigned char t1;
typedef unsigned t2;
};
template <> struct stream_as<unsigned char> {
typedef unsigned char t1; typedef unsigned t2;
};
template <> struct stream_as<signed char> {
typedef unsigned char t1; typedef unsigned t2;
};
// C++20 ostream has deleted operator<< for wchar_t
template <> struct stream_as<wchar_t> {
typedef unsigned int t1;
typedef unsigned int t2;
};
#if defined(BOOST_MSVC_STD_ITERATOR) // No intmax streaming built-in
// With this library implementation, __int64 and __uint64 get streamed as strings
template <> struct stream_as<boost::uintmax_t> {
typedef std::string t1;
typedef std::string t2;
};
template <> struct stream_as<boost::intmax_t> {
typedef std::string t1;
typedef std::string t2;
};
#endif
// Standard promotion process for streaming
template <class T> struct promote
{
static typename stream_as<T>::t1 from(T x) {
typedef typename stream_as<T>::t1 t1;
return t1(x);
}
};
#if defined(BOOST_MSVC_STD_ITERATOR) // No intmax streaming built-in
// On this platform, stream them as long/unsigned long if they fit.
// Otherwise, write a string.
template <> struct promote<boost::uintmax_t> {
std::string static from(const boost::uintmax_t x) {
if (x > ULONG_MAX)
return std::string("large unsigned value");
else {
std::ostringstream strm;
strm << (unsigned long)x;
return strm.str();
}
}
};
template <> struct promote<boost::intmax_t> {
std::string static from(const boost::intmax_t x) {
if (x > boost::intmax_t(ULONG_MAX))
return std::string("large positive signed value");
else if (x >= 0) {
std::ostringstream strm;
strm << (unsigned long)x;
return strm.str();
}
if (x < boost::intmax_t(LONG_MIN))
return std::string("large negative signed value");
else {
std::ostringstream strm;
strm << (long)x;
return strm.str();
}
}
};
#endif
// This is the function which converts types to the form I want to stream them in.
template <class T>
typename stream_as<T>::t2 stream_number(T x)
{
return promote<T>::from(x);
}
// =================================================================================
//
// Tests for built-in signed and unsigned types
//
// Tag types for selecting tests
struct unsigned_tag {};
struct signed_tag {};
// Tests for unsigned numbers. The extra default Number parameter works around
// an MSVC bug.
template <class Number>
void test_aux(unsigned_tag, Number*)
{
typedef typename boost::detail::numeric_traits<Number>::difference_type difference_type;
BOOST_STATIC_ASSERT(!boost::is_signed<Number>::value);
BOOST_STATIC_ASSERT(
(sizeof(Number) < sizeof(boost::intmax_t))
| (boost::is_same<difference_type, boost::intmax_t>::value));
#if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 2
// GCC 4.0.2 ICEs on this C-style cases
BOOST_STATIC_ASSERT((complement_traits<Number>::max) > Number(0));
BOOST_STATIC_ASSERT((complement_traits<Number>::min) == Number(0));
#else
// Force casting to Number here to work around the fact that it's an enum on MSVC
BOOST_STATIC_ASSERT(Number(complement_traits<Number>::max) > Number(0));
BOOST_STATIC_ASSERT(Number(complement_traits<Number>::min) == Number(0));
#endif
const Number max = complement_traits<Number>::max;
const Number min = complement_traits<Number>::min;
const Number test_max = (sizeof(Number) < sizeof(boost::intmax_t))
? max
: max / 2 - 1;
std::cout << std::hex << "(unsigned) min = " << stream_number(min) << ", max = "
<< stream_number(max) << "..." << std::flush;
std::cout << "difference_type = " << typeid(difference_type).name() << "..."
<< std::flush;
difference_type d1 = boost::detail::numeric_distance(Number(0), test_max);
difference_type d2 = boost::detail::numeric_distance(test_max, Number(0));
std::cout << "0->" << stream_number(test_max) << "==" << std::dec << stream_number(d1) << "; "
<< std::hex << stream_number(test_max) << "->0==" << std::dec << stream_number(d2) << "..." << std::flush;
assert(d1 == difference_type(test_max));
assert(d2 == -difference_type(test_max));
}
// Tests for signed numbers. The extra default Number parameter works around an
// MSVC bug.
struct out_of_range_tag {};
struct in_range_tag {};
// This test morsel gets executed for numbers whose difference will always be
// representable in intmax_t
template <class Number>
void signed_test(in_range_tag, Number*)
{
BOOST_STATIC_ASSERT(boost::is_signed<Number>::value);
typedef typename boost::detail::numeric_traits<Number>::difference_type difference_type;
const Number max = complement_traits<Number>::max;
const Number min = complement_traits<Number>::min;
difference_type d1 = boost::detail::numeric_distance(min, max);
difference_type d2 = boost::detail::numeric_distance(max, min);
std::cout << stream_number(min) << "->" << stream_number(max) << "==";
std::cout << std::dec << stream_number(d1) << "; ";
std::cout << std::hex << stream_number(max) << "->" << stream_number(min)
<< "==" << std::dec << stream_number(d2) << "..." << std::flush;
assert(d1 == difference_type(max) - difference_type(min));
assert(d2 == difference_type(min) - difference_type(max));
}
// This test morsel gets executed for numbers whose difference may exceed the
// capacity of intmax_t.
template <class Number>
void signed_test(out_of_range_tag, Number*)
{
BOOST_STATIC_ASSERT(boost::is_signed<Number>::value);
typedef typename boost::detail::numeric_traits<Number>::difference_type difference_type;
const Number max = complement_traits<Number>::max;
const Number min = complement_traits<Number>::min;
difference_type min_distance = complement_traits<difference_type>::min;
difference_type max_distance = complement_traits<difference_type>::max;
const Number n1 = Number(min + max_distance);
const Number n2 = Number(max + min_distance);
difference_type d1 = boost::detail::numeric_distance(min, n1);
difference_type d2 = boost::detail::numeric_distance(max, n2);
std::cout << stream_number(min) << "->" << stream_number(n1) << "==";
std::cout << std::dec << stream_number(d1) << "; ";
std::cout << std::hex << stream_number(max) << "->" << stream_number(n2)
<< "==" << std::dec << stream_number(d2) << "..." << std::flush;
assert(d1 == max_distance);
assert(d2 == min_distance);
}
template <class Number>
void test_aux(signed_tag, Number*)
{
typedef typename boost::detail::numeric_traits<Number>::difference_type difference_type;
BOOST_STATIC_ASSERT(boost::is_signed<Number>::value);
BOOST_STATIC_ASSERT(
(sizeof(Number) < sizeof(boost::intmax_t))
| (boost::is_same<difference_type, Number>::value));
#if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 2
// GCC 4.0.2 ICEs on this cast
BOOST_STATIC_ASSERT((complement_traits<Number>::max) > Number(0));
BOOST_STATIC_ASSERT((complement_traits<Number>::min) < Number(0));
#else
// Force casting to Number here to work around the fact that it's an enum on MSVC
BOOST_STATIC_ASSERT(Number(complement_traits<Number>::max) > Number(0));
BOOST_STATIC_ASSERT(Number(complement_traits<Number>::min) < Number(0));
#endif
const Number max = complement_traits<Number>::max;
const Number min = complement_traits<Number>::min;
std::cout << std::hex << "min = " << stream_number(min) << ", max = "
<< stream_number(max) << "..." << std::flush;
std::cout << "difference_type = " << typeid(difference_type).name() << "..."
<< std::flush;
typedef typename boost::conditional<
(sizeof(Number) < sizeof(boost::intmax_t)),
in_range_tag,
out_of_range_tag
>::type range_tag;
signed_test<Number>(range_tag(), 0);
}
// Test for all numbers. The extra default Number parameter works around an MSVC
// bug.
template <class Number>
void test(Number* = 0)
{
std::cout << "testing " << typeid(Number).name() << ":\n"
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
<< "is_signed: " << (std::numeric_limits<Number>::is_signed ? "true\n" : "false\n")
<< "is_bounded: " << (std::numeric_limits<Number>::is_bounded ? "true\n" : "false\n")
<< "digits: " << std::numeric_limits<Number>::digits << "\n"
#endif
<< "..." << std::flush;
// factoring out difference_type for the assert below confused Borland :(
typedef boost::is_signed<
#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
typename
#endif
boost::detail::numeric_traits<Number>::difference_type
> is_signed;
BOOST_STATIC_ASSERT(is_signed::value);
typedef typename boost::conditional<
boost::is_signed<Number>::value,
signed_tag,
unsigned_tag
>::type signedness;
test_aux<Number>(signedness(), 0);
std::cout << "passed" << std::endl;
}
int main()
{
test<char>();
test<unsigned char>();
test<signed char>();
test<wchar_t>();
test<short>();
test<unsigned short>();
test<int>();
test<unsigned int>();
test<long>();
test<unsigned long>();
#if defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_INTEGRAL_INT64_T)
test< ::boost::long_long_type>();
test< ::boost::ulong_long_type>();
#elif defined(BOOST_MSVC)
// The problem of not having compile-time static class constants other than
// enums prevents this from working, since values get truncated.
// test<boost::uintmax_t>();
// test<boost::intmax_t>();
#endif
return 0;
}

View File

@ -0,0 +1,16 @@
// Copyright 2018 Daniel James.
// 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)
#include <boost/detail/reference_content.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_same.hpp>
BOOST_STATIC_ASSERT((boost::is_same<int, boost::detail::make_reference_content<int>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<boost::detail::reference_content<int&>, boost::detail::make_reference_content<int&>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<int, boost::detail::make_reference_content<>::apply<int>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<boost::detail::reference_content<int&>, boost::detail::make_reference_content<>::apply<int&>::type>::value));
BOOST_STATIC_ASSERT((boost::has_nothrow_copy<boost::detail::make_reference_content<int&>::type>::value));
int main() {}

302
test/test_utf8_codecvt.cpp Normal file
View File

@ -0,0 +1,302 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// test_utf8_codecvt.cpp
// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to 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)
#include <algorithm> // std::copy
#include <fstream>
#include <iostream>
#include <iterator>
#include <locale>
#include <vector>
#include <string>
#include <cstddef> // size_t
#include <cwchar>
#include <boost/config.hpp>
#include <boost/core/no_exceptions_support.hpp>
#define BOOST_UTF8_BEGIN_NAMESPACE namespace boost { namespace detail {
#define BOOST_UTF8_END_NAMESPACE } }
#include <boost/detail/utf8_codecvt_facet.hpp>
#include <boost/detail/utf8_codecvt_facet.ipp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::size_t;
using ::wcslen;
#if !defined(UNDER_CE) && !defined(__PGIC__)
using ::w_int;
#endif
} // namespace std
#endif
// Note: copied from boost/iostreams/char_traits.hpp
//
// Dinkumware that comes with QNX Momentics 6.3.0, 4.0.2, incorrectly defines
// the EOF and WEOF macros to not std:: qualify the wint_t type (and so does
// Sun C++ 5.8 + STLport 4). Fix by placing the def in this scope.
// NOTE: Use BOOST_WORKAROUND?
#if (defined(__QNX__) && defined(BOOST_DINKUMWARE_STDLIB)) \
|| defined(__SUNPRO_CC)
using ::std::wint_t;
#endif
#include <boost/core/lightweight_test.hpp>
template<std::size_t s>
struct test_data
{
static unsigned char utf8_encoding[];
static wchar_t wchar_encoding[];
};
template<>
unsigned char test_data<2>::utf8_encoding[] = {
0x01,
0x7f,
0xc2, 0x80,
0xdf, 0xbf,
0xe0, 0xa0, 0x80,
0xe7, 0xbf, 0xbf
};
template<>
wchar_t test_data<2>::wchar_encoding[] = {
0x0001,
0x007f,
0x0080,
0x07ff,
0x0800,
0x7fff
};
template<>
unsigned char test_data<4>::utf8_encoding[] = {
0x01,
0x7f,
0xc2, 0x80,
0xdf, 0xbf,
0xe0, 0xa0, 0x80,
0xef, 0xbf, 0xbf,
0xf0, 0x90, 0x80, 0x80,
0xf4, 0x8f, 0xbf, 0xbf,
/* codecvt implementations for clang and gcc don't handle more than 21 bits and
* return eof accordlingly. So don't test the whole 32 range
*/
/*
0xf7, 0xbf, 0xbf, 0xbf,
0xf8, 0x88, 0x80, 0x80, 0x80,
0xfb, 0xbf, 0xbf, 0xbf, 0xbf,
0xfc, 0x84, 0x80, 0x80, 0x80, 0x80,
0xfd, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf
*/
};
template<>
wchar_t test_data<4>::wchar_encoding[] = {
(wchar_t)0x00000001,
(wchar_t)0x0000007f,
(wchar_t)0x00000080,
(wchar_t)0x000007ff,
(wchar_t)0x00000800,
(wchar_t)0x0000ffff,
(wchar_t)0x00010000,
(wchar_t)0x0010ffff,
/* codecvt implementations for clang and gcc don't handle more than 21 bits and
* return eof accordlingly. So don't test the whole 32 range
*/
/*
(wchar_t)0x001fffff,
(wchar_t)0x00200000,
(wchar_t)0x03ffffff,
(wchar_t)0x04000000,
(wchar_t)0x7fffffff
*/
};
int
test_main(int /* argc */, char * /* argv */[]) {
std::locale utf8_locale
= std::locale(
std::locale::classic(),
new boost::detail::utf8_codecvt_facet
);
typedef char utf8_t;
// define test data compatible with the wchar_t implementation
// as either ucs-2 or ucs-4 depending on the compiler/library.
typedef test_data<sizeof(wchar_t)> td;
// Send our test UTF-8 data to file
{
std::ofstream ofs;
ofs.open("test.dat");
std::copy(
td::utf8_encoding,
td::utf8_encoding + sizeof(td::utf8_encoding) / sizeof(unsigned char),
std::ostream_iterator<utf8_t>(ofs)
);
}
// Read the test data back in, converting to UCS-4 on the way in
std::vector<wchar_t> from_file;
{
std::wifstream ifs;
ifs.imbue(utf8_locale);
ifs.open("test.dat");
std::wint_t item = 0;
// note can't use normal vector from iterator constructor because
// dinkumware doesn't have it.
for(;;){
item = ifs.get();
if(item == WEOF)
break;
//ifs >> item;
//if(ifs.eof())
// break;
from_file.push_back(item);
}
}
BOOST_TEST(std::equal(from_file.begin(), from_file.end(), td::wchar_encoding));
// Send the UCS4_data back out, converting to UTF-8
{
std::wofstream ofs;
ofs.imbue(utf8_locale);
ofs.open("test2.dat");
std::copy(
from_file.begin(),
from_file.end(),
std::ostream_iterator<wchar_t, wchar_t>(ofs)
);
}
// Make sure that both files are the same
{
typedef std::istream_iterator<utf8_t> is_iter;
is_iter end_iter;
std::ifstream ifs1("test.dat");
is_iter it1(ifs1);
std::vector<utf8_t> data1;
std::copy(it1, end_iter, std::back_inserter(data1));
std::ifstream ifs2("test2.dat");
is_iter it2(ifs2);
std::vector<utf8_t> data2;
std::copy(it2, end_iter, std::back_inserter(data2));
BOOST_TEST(data1 == data2);
}
// some libraries have trouble that only shows up with longer strings
const wchar_t * test3_data = L"\
<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>\
<!DOCTYPE boost_serialization>\
<boost_serialization signature=\"serialization::archive\" version=\"3\">\
<a class_id=\"0\" tracking_level=\"0\">\
<b>1</b>\
<f>96953204</f>\
<g>177129195</g>\
<l>1</l>\
<m>5627</m>\
<n>23010</n>\
<o>7419</o>\
<p>16212</p>\
<q>4086</q>\
<r>2749</r>\
<c>-33</c>\
<s>124</s>\
<t>28</t>\
<u>32225</u>\
<v>17543</v>\
<w>0.84431422</w>\
<x>1.0170664757130923</x>\
<y>tjbx</y>\
<z>cuwjentqpkejp</z>\
</a>\
</boost_serialization>\
";
// Send the UCS4_data back out, converting to UTF-8
std::size_t l = std::wcslen(test3_data);
{
std::wofstream ofs;
ofs.imbue(utf8_locale);
ofs.open("test3.dat");
std::copy(
test3_data,
test3_data + l,
std::ostream_iterator<wchar_t, wchar_t>(ofs)
);
}
// Make sure that both files are the same
{
std::wifstream ifs;
ifs.imbue(utf8_locale);
ifs.open("test3.dat");
ifs >> std::noskipws;
BOOST_TEST(
std::equal(
test3_data,
test3_data + l,
std::istream_iterator<wchar_t, wchar_t>(ifs)
)
);
}
// Test length calculation
{
std::codecvt<wchar_t, char, std::mbstate_t> const& fac = std::use_facet< std::codecvt<wchar_t, char, std::mbstate_t> >(utf8_locale);
std::mbstate_t mbs = std::mbstate_t();
const int utf8_len = sizeof(td::utf8_encoding) / sizeof(*td::utf8_encoding);
int res = fac.length(mbs, reinterpret_cast< const char* >(td::utf8_encoding), reinterpret_cast< const char* >(td::utf8_encoding + utf8_len), ~static_cast< std::size_t >(0u));
BOOST_TEST_EQ(utf8_len, res);
}
// Test that length calculation detects character boundaries
{
std::codecvt<wchar_t, char, std::mbstate_t> const& fac = std::use_facet< std::codecvt<wchar_t, char, std::mbstate_t> >(utf8_locale);
std::mbstate_t mbs = std::mbstate_t();
// The first 5 bytes of utf8_encoding contain 3 complete UTF-8 characters (taking 4 bytes in total) and 1 byte of an incomplete character.
// This last byte should not be accounted by length().
const int input_len = 5;
const int utf8_len = 4;
int res = fac.length(mbs, reinterpret_cast< const char* >(td::utf8_encoding), reinterpret_cast< const char* >(td::utf8_encoding + input_len), ~static_cast< std::size_t >(0u));
BOOST_TEST_EQ(utf8_len, res);
}
return EXIT_SUCCESS;
}
int
main(int argc, char * argv[]){
int retval = 1;
BOOST_TRY{
retval = test_main(argc, argv);
}
#ifndef BOOST_NO_EXCEPTION_STD_NAMESPACE
BOOST_CATCH(const std::exception & e){
BOOST_ERROR(e.what());
}
#endif
BOOST_CATCH(...){
BOOST_ERROR("failed with uncaught exception:");
}
BOOST_CATCH_END
int error_count = boost::report_errors();
if(error_count > 0)
retval = error_count;
return retval;
}