Compare commits

...

1442 Commits

Author SHA1 Message Date
bcddc892f7 glob headers 2022-07-05 10:48:45 +02:00
d2746d7d72 Rework as esp-idf component 2022-07-04 19:43:20 +02:00
d2a4a6bf0a Merge pull request #167 from boostorg/msvc2022_ci
Correct CI workflow and add 2022 tests.
2022-02-11 09:56:38 +00:00
273678042d Correct CI workflow and add 2022 tests. 2022-02-10 18:06:40 +00:00
bc26f6b192 Merge pull request #157 from eldiener/develop
[skip ci] Fixed operator traits example code for last issue.
2022-02-10 13:12:02 +00:00
a10ca89479 Merge pull request #163 from igaztanaga/patch-1
Fix -Wconversion warning for GCC / 64 bits
2022-02-10 13:10:42 +00:00
a184e146e3 Merge pull request #161 from boostorg/pr/tt-has-accurate-function
Fix misspelled macro name
2022-02-10 13:10:02 +00:00
8583d1a967 Fix -Wconversion warning for GCC / 64 bits
../../boost/type_traits/is_complete.hpp:47:14: error: conversion from ‘long unsigned int’ to ‘unsigned int’ may change value 
       ok_tag<sizeof(T)> check_is_complete(int);
2021-12-30 15:29:17 +01:00
b265ce8f3a Merge branch 'develop' of https://github.com/boostorg/type_traits into develop 2021-10-06 08:56:09 +01:00
e3dd034588 Remove obsolete test runner Xenial. 2021-10-06 08:55:49 +01:00
d37dc8c4b9 Merge pull request #162 from boostorg/test_on_cuda
Initial CUDA testing.
2021-10-06 08:18:21 +01:00
7ac69733b8 Update CI scripts for testing with CUDA device compile.
Fix inspection report issues.
2021-10-03 12:20:08 +01:00
18b6e30e9c Fix up CUDA device testing [CI SKIP] 2021-10-03 12:09:10 +01:00
09b102587f Misc CUDA testing fixes 2021-10-02 15:13:42 +01:00
a842eeda5c Initial CUDA testing. 2021-10-01 19:10:34 +01:00
693488cb29 Fix misspelled macro name 2021-07-04 19:55:29 +03:00
bfce306637 Update CMakeLists.txt 2021-06-10 02:04:51 +03:00
3d246cb5d1 Merge pull request #158 from sdarwin/meta_libraries
Fix comma in meta/libraries.json
2021-04-20 18:27:37 +01:00
567774cacb Fix comma in meta/libraries.json 2021-04-20 16:03:18 +00:00
cdbb996d3a Fixed operator traits example code for last issue. 2021-04-19 12:41:39 -04:00
30396ed792 Merge pull request #155 from boostorg/pr130
Integration test for PR130
2021-03-08 11:40:41 +00:00
cea791882b Merge branch 'develop' of https://github.com/bionicOnion/type_traits into pr130 2021-03-08 09:36:28 +00:00
396d97f5a6 Merge pull request #154 from boostorg/GHA
Add GHA first cut.
2021-03-08 09:32:29 +00:00
61c9e7699c C++latest not supported in /CLR mode. 2021-03-07 20:13:26 +00:00
64eb4e2f40 Add managed clr tests.
Remove travis and appveyor.
2021-03-07 19:39:50 +00:00
c3c1357c3d Fix up C++20 failure. 2021-03-07 12:44:18 +00:00
cf497924b1 Merge pull request #145 from tobias-loew/develop
Update type_with_alignment.hpp
2021-03-07 11:47:40 +00:00
71208778dd One more fix to CI script. Also fix msvc test failures. 2021-03-07 11:42:55 +00:00
4c2b7d5215 Try again with --hash on b2 command line. 2021-03-07 10:51:38 +00:00
a105c3531c Add GHA first cut. 2021-03-07 10:36:17 +00:00
d1994736b9 Fix for recent libc++ versions.
Tidy up drone script a little more.
2021-01-27 20:08:11 +00:00
d9d298170f Tidy up drone script. 2021-01-27 19:33:37 +00:00
95c8a8a567 Mark testing binary member operators as const.
Otherwise they generate ambiguities in C++20.
2021-01-27 19:33:13 +00:00
89a062e7b8 Disable testing volatile return types in C++20:
as they're deprecated.
2021-01-27 19:32:29 +00:00
1b0cf49465 Merge pull request #152 from eldiener/develop
[skip ci] Add "cxxstd" json field
2021-01-21 19:34:33 -05:00
2b8b797b88 [skip ci] Add "cxxstd" json field. The "cxxstd" json field is being added to each Boost library's meta json information for libraries in order to specify the minumum C++ standard compilation level. The value of this field matches one of the values for 'cxxstd' in Boost.Build. The purpose of doing this is to provide information for the Boost website documentation for each library which will specify the minimum C++ standard compilation that an end-user must employ in order to use the particular library. This will aid end-users who want to know if they can successfully use a Boost library based on their C++ compiler's compilation level, without having to search the library's documentation to find this out. 2021-01-21 16:26:33 -05:00
a2cffe9c04 Update compilers tested on drone CI. 2021-01-18 17:05:49 +00:00
7ca204de52 Merge pull request #151 from sdarwin/drone
Drone config
2021-01-18 16:59:46 +00:00
92ceb4079b add drone config [ci skip] 2021-01-12 17:08:07 +00:00
59951c1853 Add missing ).
Fixes https://github.com/boostorg/type_traits/issues/150.
2020-12-25 16:55:55 +00:00
106b442289 Update type_with_alignment.hpp 2020-09-10 08:38:13 +02:00
e4228d7260 Update type_with_alignment.hpp
Replaced dead link
2020-09-09 20:09:25 +02:00
c6c7ff1647 Update is_trivially_copyable implementation for user move with defaulted copy 2020-08-14 09:53:04 -04:00
5588bb1ab7 Regenerate docs. 2020-06-23 18:53:39 +01:00
18962d99a4 Merge pull request #142 from glenfe/develop
Implement multiple type traits
2020-06-02 19:07:36 +01:00
f7f7dbf16e Implement is_trivially_copyable 2020-05-31 03:00:48 -04:00
7a071a5918 Implement is_scoped_enum and is_unscoped_enum 2020-05-31 02:49:03 -04:00
f8e9879d4e Implement conjunction, disjunction, negation 2020-05-31 02:47:41 -04:00
bd5bede326 Merge pull request #140 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:30:10 +01:00
ea2dae279f Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost config for the Embarcadero non-clang-based compilers. 2020-03-23 09:21:49 -04:00
7ee9910b2f Merge branch 'develop' 2020-01-06 15:47:53 +02:00
b57a7a54e4 Merge pull request #136 from boostorg/pr/add-cmake-install
Add CMake install support (needed by Atomic)
2019-12-28 09:50:02 -08:00
4e6975503f Disable installation without the superproject; add comments 2019-12-27 04:27:59 +02:00
b0f9c6cda1 Add CMake install support (needed by Atomic) 2019-12-26 17:19:43 +02:00
d91381b8f2 Merge branch 'develop' 2019-11-01 16:45:06 +00:00
4a32bcc9ff Merge pull request #131 from boostorg/circle_ci_inspect
clean up inspection failures and add circle-ci testing.
2019-08-26 08:13:43 +01:00
741b8b395b clean up inspection failures and add circle-ci testing. 2019-08-22 19:17:36 +01:00
97f71e0cb3 Issue 123: Revised /clr conditionals to handle __stdcall and __cdecl properly 2019-07-22 11:30:13 -05:00
9351dae4a4 Issue 123: Modified preprocessor conditionals to fix errors with /clr builds 2019-07-16 16:08:12 -05:00
cbf7c56a66 Merge pull request #128 from boostorg/gcc9
Add clang-8 and gcc-9 to CI tests.
2019-06-28 18:22:48 +01:00
12325df58f Add clang-8 and gcc-9 to CI tests. 2019-06-28 11:53:12 +01:00
0044e85b4c Merge branch 'develop' 2019-06-28 08:35:15 +01:00
f8069ad974 Merge pull request #127 from boostorg/xenial
CI: update distribution and clang testing.
2019-06-27 08:35:38 +01:00
5ff6b669ea CI: Try again to get clang-3.7 working. 2019-06-25 12:58:31 +01:00
86855dac99 CI: clang-3.7 needs "precise" distro? 2019-06-25 08:28:17 +01:00
c54dd34571 Merge pull request #119 from Kojoley/patch-1
Remove expected fail on tricky_rvalue_test
2019-06-24 18:18:28 +01:00
17359415f5 Make sure distributions match and are supported. 2019-06-24 16:01:39 +01:00
f9e8143ac5 CI: update distribution and clang testing. 2019-06-23 08:50:30 +01:00
efc0be6b55 is_function_cxx_11.hpp: There's no __fastcall on clr.
Update for noexcept functions, also updates CI script to test C++17 as that's required to trigger the error.
Fixes: https://github.com/boostorg/type_traits/pull/124.
2019-06-13 11:49:46 +01:00
ba7a01aa96 Merge pull request #122 from gongminmin/Vs2019Arm64
Fix the compiling errors in VS2019 ARM64 with /std:c++17
2019-06-13 11:17:57 +01:00
dbc8980715 Fix the compiling errors in VS2019 ARM64 with /std:c++17 2019-06-07 10:53:40 +08:00
dea6757dbf Add support for noexcept detection via _NOEXCEPT_TYPES_SUPPORTED with msvc.
See https://github.com/boostorg/type_traits/issues/118#issuecomment-475228526
2019-03-22 19:25:33 +00:00
decc409800 Remove expected fail on tricky_rvalue_test
Was fixed in #83
2019-03-22 00:33:36 +03:00
7d89ec0426 Fix use of noexcept for msvc with /Zc:noexceptTypes- flag set.
Fixes https://github.com/boostorg/type_traits/issues/118.
2019-03-21 10:23:21 +00:00
f9bc21647a Merge pull request #116 from Kojoley/vc14.2-still-has-underlying-enum-type-bug
VS2017 and VS2019 still has underlying enum type bug
2019-03-16 08:51:42 +00:00
cfe031d40d Merge pull request #117 from Kojoley/suppress-clang-Wignored-qualifiers-in-test.hpp
test.hpp: Suppress Clang -Wignored-qualifiers warning
2019-03-16 08:50:48 +00:00
6f7e2ec545 test.hpp: Suppress Clang -Wignored-qualifiers warning
../libs/type_traits/test/test.hpp:221:9: warning: 'const' qualifier on reference type 'r_type' (aka 'int &') has no effect [-Wignored-qualifiers]
2019-03-15 00:27:09 +03:00
04350b86c5 VS2017 and VS2019 still has underlying enum type bug
Opened a new bug report in their new bug report system for the issue https://developercommunity.visualstudio.com/content/problem/490264/standard-violation-enum-underlying-type-cannot-rep.html
2019-03-15 00:08:20 +03:00
d2dbcca368 Migrate explicit-failures-markup.xml to the repository 2019-03-15 00:03:55 +03:00
cbcb282722 Merge branch 'develop' 2019-03-03 09:37:19 +00:00
f6ef5722ef Merge pull request #115 from glenfe/develop
Use make_void directly instead of void_t for compatibility
2019-02-27 18:04:39 +00:00
453564a501 Use make_void directly instead of void_t for compatibility 2019-02-27 08:29:43 -05:00
625c40e750 Merge pull request #112 from glenfe/develop
Implement copy_reference and copy_cv_ref
2019-02-26 20:16:42 +00:00
4ca80785f8 Merge pull request #110 from Kojoley/patch-1
is_assignable_test: Fixed copy-paste error
2019-02-26 09:20:53 +00:00
6a472a381d Implement copy_reference and copy_cv_ref 2019-02-23 00:05:35 -05:00
e1f882b25d is_assignable_test: Fixed copy-paste error
The test `is_assignable<noexcept_assignable&>` checks self-assignability, while the
operator was defined for other type, so it was testing the non-noexcept implicit
generated copy assignment operator instead.
2019-02-19 19:11:03 +03:00
0e09cb7178 Merge branch 'develop' 2019-02-14 09:17:30 +00:00
5e7844bea1 Fix up is_function/is_member_function_pointer for msvc/arm compiler. 2019-01-10 17:53:50 +00:00
c65f41d4c0 Merge pull request #104 from boostorg/travis-os-x-10.1
Travis: Update XCode versions.
2019-01-07 20:33:22 +00:00
c71e2ffb6e Merge pull request #95 from glenfe/develop
Implement is_bounded_array and is_unbounded_array
2019-01-07 18:34:40 +00:00
55a3ee0a3d clang/OSX: Disable untestable is_function/is_member_function bits. 2019-01-07 18:30:22 +00:00
38f9545757 is_member_function_pointer_cxx_11.hpp: and another attempt to get the clang OS X logic correct. 2019-01-07 13:37:11 +00:00
649c585b9c is_member_function_pointer_cxx_11.hpp: don't specialize on noexcept for clang/apple. 2019-01-07 09:16:29 +00:00
d8bdd309d7 Implement is_bounded_array and is_unbounded_array 2019-01-07 00:30:16 -05:00
941e29e0a6 Apple X Code doesn't support noexcept as a separate type in partial specializations. 2019-01-06 17:04:15 +00:00
13d477be5d Travis CI: Add more OS X testers, plus clang-6.
Update configuration to handle more broken compilers that can't deduce noexcept parameters in template partial specializations.
2019-01-06 11:29:49 +00:00
9830bcb8a9 Travis: Add Xcode 9.1. 2019-01-06 10:36:36 +00:00
94e055c9ba Travis: Update XCode versions. 2019-01-06 09:22:25 +00:00
23aa33892f Merge pull request #102 from boostorg/msvc-calling-convension-tests
Add better tests for msvc native calling conventions.
2019-01-06 08:36:56 +00:00
6fca9826f6 Add support for /arch:IA32 in msvc Win32 builds when there is no __vectorcall.
Add CI tests for that configuration.
2019-01-05 18:39:49 +00:00
cacb2bb3f6 Disable __fastcall for x86+CLR. 2019-01-05 09:14:57 +00:00
3df3014681 Merge branch 'develop' into msvc-calling-convension-tests
Resolved Conflicts:
	include/boost/type_traits/detail/is_function_cxx_11.hpp
	include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp
2019-01-04 19:35:57 +00:00
ee7e6ff397 Fix /clr test failures. 2019-01-04 18:18:37 +00:00
16e04ea7c0 No __vectorcal prior to vc12. 2019-01-04 13:23:51 +00:00
99777eba8e Merge pull request #100 from boostorg/feature/msvc-clr
Add CI support for testing /clr option with msvc.
2019-01-04 09:09:42 +00:00
fdb5378d12 Regenerate old workaround versions of function type testers to handle __vectorcall. 2019-01-03 19:19:54 +00:00
72e02341a2 Fix is_likely_lambda.hpp for msvc-14.0 in CLR mode. 2019-01-03 17:59:30 +00:00
1ead421054 Add better tests for msvc native calling conventions. 2019-01-03 17:52:51 +00:00
51957092d2 Add CI support for testing /clr option with msvc.
Fix CLR failures thanks to : https://github.com/boostorg/type_traits/issues/99.
2018-12-30 09:58:53 +00:00
bdaa002b74 Update CI scripts to handle new module layout. 2018-12-20 09:05:45 +00:00
903b59e2a3 Merge branch 'develop'
Resolved Conflicts:
	include/boost/type_traits/detail/config.hpp
2018-12-12 18:26:20 +00:00
efc694d679 Fix use of BOOST_WORKAROUND in config.hpp, should be BOOST_GCC < 40900 rather than <= 40800 in case there is a patch level. Fixes: https://github.com/boostorg/type_traits/issues/97 2018-12-05 18:43:44 +00:00
19bc3525a3 config.hpp: change workaround to < gcc-4.8.5 rather than < 4.9.
See https://github.com/boostorg/type_traits/issues/97.
2018-11-26 17:51:00 +00:00
d49f6e05f5 Fix use of BOOST_WORKAROUND in config.hpp, should be BOOST_GCC < 40900 rather than <= 40800 in case there is a patch level. Fixes: https://github.com/boostorg/type_traits/issues/97 2018-11-26 17:41:45 +00:00
b8e0395cd8 Add CI badges.
[CI SKIP]
2018-11-06 19:37:09 +00:00
5737ed46eb Merge branch 'develop' of https://github.com/boostorg/type_traits into develop 2018-11-05 18:17:14 +00:00
b6351c3def Fully qualify some names to prevent ambiguity over detail::. 2018-11-05 18:16:57 +00:00
45b893f52c Merge pull request #92 from Mike-Devel/min_cmake
[CMake] Add minimal cmake file
2018-11-04 15:24:49 +00:00
eafca43cc6 Merge pull request #94 from Lastique/patch-1
Fix is_constructible header reference.
2018-11-04 15:24:22 +00:00
f146e70e9b Fix is_constructible header reference. 2018-11-04 13:46:32 +03:00
6fd9601014 [CMake] Add minimal cmake file
Generate cmake target that can be used by other libraries
to express their dependency on this library and retrieve
any configuration information such as the include directory,
transitive dependencies, necessary compiler options or the
required c++ standards level.
2018-10-25 12:07:01 +02:00
af1f17cd15 Add README.md.
[CI SKIP]
2018-10-15 18:01:58 +01:00
a5bb8d7336 Merge branch 'develop' of https://github.com/boostorg/type_traits into develop 2018-09-14 17:41:16 +01:00
cbb9fecd92 Fix #pragma push/pop mismatch in is_virtual_base_of.hpp
Fixes https://github.com/boostorg/type_traits/issues/91.
2018-09-14 17:40:36 +01:00
ee4f7aab0c Merge pull request #90 from boostorg/documentation
Add note to documentation and correct spelling
2018-09-14 17:12:10 +01:00
53aec15195 Add note to documentation and correct spelling 2018-09-08 11:17:48 -04:00
fcc0711c33 Update e-mail address in comments 2018-09-08 11:17:06 -04:00
744b49751a Merge pull request #89 from glenfe/develop
Add enable_if_ and enable_if_t. Sever dependency on Core.
2018-08-27 18:10:48 +01:00
7aeee229b9 Merge pull request #88 from boostorg/feature/is_noncopyable
Do not include boost/noncopyable.hpp to avoid a dependency on Core
2018-08-27 18:09:12 +01:00
2baafd4a3a Add enable_if_ and enable_if_t. Sever dependency on Core. 2018-08-25 21:00:17 -04:00
0d7d9c72ef Add comment describing the use of noncopyable_::base_token 2018-08-25 15:36:29 +03:00
91c5184fca Do not include boost/noncopyable.hpp to avoid a dependency on Core 2018-08-25 01:45:50 +03:00
7639c5820b is_function_test.cpp: correct macro usage (again). 2018-08-14 19:40:40 +01:00
529b3fe7bd Merge branch 'develop' of https://github.com/boostorg/type_traits into develop 2018-08-14 17:54:31 +01:00
e4f356dab3 Use correct macro in is_function_test.cpp. 2018-08-14 17:54:14 +01:00
685c47ecca Use the correct feature macro in is_function.hpp 2018-08-14 09:39:40 +01:00
17af798061 Merge pull request #85 from boostorg/issue6
Big update for is_function and is_member_function_pointer for modern …
2018-08-13 18:31:06 +01:00
e0868d6474 GCC warning fix has to be constrained to gcc-7. 2018-08-13 09:29:46 +01:00
4b6b13ad25 Disable gcc warning. 2018-08-12 19:37:33 +01:00
c3412181c4 Refactor is_function.hpp/is_member_function_pointer.hpp:
With separate files for C++03 and C++11 versions.
Add workarounds for compilers with insufficient C++11 support to handle the new code.
Add support for C++17 noexcept function signatures and update tests accordingly.
2018-08-12 11:04:33 +01:00
0c9643ee88 Disable some partial specializations in x64 mode. 2018-08-11 19:51:10 +01:00
52fbd03a6c Big update for is_function and is_member_function_pointer for modern compilers with modern features.
See https://github.com/boostorg/type_traits/issues/81.
2018-08-11 19:32:02 +01:00
f78c5330cd Document improved unary operators.
[CI SKIP]
2018-08-11 09:50:49 +01:00
baad6ce607 Merge pull request #84 from boostorg/issue80
Add tests for scoped_enums.
2018-08-11 09:26:47 +01:00
635388aafd Issue80: remove redundant test. 2018-08-11 08:30:08 +01:00
66a146c1cb Disable additional specialization for is_function for msvc-10.0 -
it doesn't work and leads to ambiguous overloads.
Also change the expected result of some tests for msvc-14.0.
2018-08-10 18:13:02 +01:00
a408a29ffc Update has_complement tests. 2018-08-10 12:52:21 +01:00
5bd3e11429 Make the unary operator traits use "perfect" detection.
Update tests accordingly.
2018-08-09 19:48:36 +01:00
344efaf161 Merge pull request #83 from boostorg/issue8
Tentative fix for msvc-10 issue with rvalue refs.
2018-08-07 20:50:22 +01:00
56d111026c tricky_rvalue_test.cpp: correct msvc version workaround. 2018-08-07 18:23:38 +01:00
8d740945a8 is_rvalue_reference: More partial specialisations for obsolete compilers. 2018-08-07 17:59:11 +01:00
e958c63a6d rvalue refs and msvc-10: add fix for is_function as well. 2018-08-06 19:20:34 +01:00
e574d2c134 Add tests for scoped_enums.
See https://github.com/boostorg/type_traits/issues/80 and https://svn.boost.org/trac10/ticket/9913.
2018-08-06 19:11:20 +01:00
0c59e22982 Tentative fix for msvc-10 issue with rvalue refs.
See: https://svn.boost.org/trac10/ticket/5795 and https://github.com/boostorg/type_traits/issues/78.
2018-08-06 18:31:26 +01:00
458b1fa071 Update docs on decay.
Fixes: https://github.com/boostorg/type_traits/issues/33.
[CI SKIP]
2018-08-06 13:22:28 +01:00
ad326841ec Correct spelling of "__clang__" so that the headers compile on clang/windows. 2018-08-03 18:31:46 +01:00
373c9fc4b4 Travis: add gcc-8 to tested compilers. 2018-07-01 10:36:06 +01:00
059ed8839d Merge branch 'develop' of https://github.com/boostorg/type_traits into develop 2018-05-27 10:59:40 +01:00
bd67d9075f Documentation update.
[CI SKIP]
2018-05-27 10:59:31 +01:00
3b6c340fc2 Merge pull request #75 from dsakurai/develop
Use boost::declval instead of std::declval
2018-05-22 17:59:47 +01:00
c2c0b47565 Merge pull request #74 from boostorg/issue73
clang intrinsics: Use __is_trivially_constructible and __is_trivially…
2018-05-19 20:47:02 +01:00
7b115c8d0e Tests: disable some failing tests for msvc-11.0. 2018-05-19 19:45:10 +01:00
4c9add90d0 Intrinsics: update msvc trivial move intrinsics.
Tighten up the tests.
2018-05-19 09:29:13 +01:00
dec6869a3f Use boost::declval instead of std::declval 2018-05-18 16:18:30 +02:00
7eab81300e clang intrinsics: disable trivial move construction testing for c++03. 2018-05-18 08:00:28 +01:00
8898c6d1bb clang intrinsics: Use __is_trivially_constructible and __is_trivially_assignable to test for trivial move construct and assign.
See https://github.com/boostorg/type_traits/issues/73.
2018-05-17 18:26:31 +01:00
a3114e9f79 Merge branch 'develop' of https://github.com/boostorg/type_traits into develop 2018-05-15 18:23:17 +01:00
6a1fbd45f6 Move some #pragma warning(pop)'s to the correct place. 2018-05-15 18:22:59 +01:00
6eb8a15c25 Merge pull request #71 from boostorg/pr31
CI integration test for PR31.
2018-05-12 08:18:49 +01:00
7bba2acbcc is_virtual_base_of.hpp: simplify and use clang version for all compilers. 2018-05-11 17:19:44 +01:00
fbc50bfd12 is_virtual_base_of: more workarounds for clang and older gcc versions 2018-05-10 11:34:02 +01:00
02270ed668 is_virtual_base_of: tentative fixes for clang and older gcc versions.
[CI SKIP]
2018-05-10 10:31:24 +01:00
770c095dcc is_virtual_base_of_test.cpp: add more tests for tricky cases and bug reports. 2018-05-09 19:31:45 +01:00
63dea93d99 is_virtual_base_of.hpp: Reinstate old version for old broken compilers. 2018-05-09 19:14:50 +01:00
e2041351c8 intrinsics.hpp: fix typo in comment. 2018-05-09 18:14:13 +01:00
b48fae5352 is_final_test.cpp: disable some tests for msvc-12 for which there is no workaround.
The compiler is unable to detect final class templates.
2018-05-09 18:13:58 +01:00
e3fb4a6e85 Merge branch 'develop' of https://github.com/boostorg/type_traits into develop 2018-05-09 18:01:27 +01:00
2cc2697e53 Merge branch 'hotfix/is_virtual_base_of' of https://github.com/csernib/type_traits into pr31 2018-05-08 18:59:29 +01:00
01f9a0b43a Add test for const-qualified final classes. 2018-05-08 18:53:17 +01:00
00951845fb Merge pull request #60 from Flast/patch-1
Added is_final intrinsic for msvc 2013 and later
2018-05-08 18:38:34 +01:00
eda07fdec9 common_arithmetic_type.hpp: remove duplicate const. 2018-05-08 11:09:25 +01:00
963131c1db is_final_test.cpp: Fix for compilers with no final keyword. 2018-05-08 07:58:34 +01:00
356635219b Fix for is_final which works around GCC bug, see https://github.com/boostorg/type_traits/issues/69 2018-05-07 18:50:28 +01:00
1305001a58 Trivial fix for GCCXML, fixes: https://github.com/boostorg/type_traits/issues/69 2018-05-07 18:49:53 +01:00
d06ee12c5c has_nothrow_copy: new test case fails for msvc-12 and there seems to be no way to make it work. 2018-05-07 18:18:44 +01:00
9052a3830e has_nothrow_copy: disable intrinsic for gcc-4.8 as well as 4.7, and the test for gcc-4.4 2018-05-07 13:36:20 +01:00
53f99bb1a6 Merge branch 'develop' of https://github.com/boostorg/type_traits into develop 2018-05-07 09:47:45 +01:00
59e81bca80 Tentative fix for git issue #56: failing has_nothrow_copy with deleted constructor 2018-05-07 09:47:06 +01:00
9e880c3187 Merge pull request #70 from Flast/patch-2
Fixed a typo in is_assignable doc
2018-05-07 08:09:14 +01:00
9548118ed4 Fixed a typo in is_assignable doc 2018-05-07 12:50:25 +09:00
547263c001 Merge branch 'develop' of https://github.com/boostorg/type_traits into develop 2018-05-04 20:04:14 +01:00
7e9909324a Fix missing #pragma warning(pop)'s for msvc
Fixes https://github.com/boostorg/type_traits/issues/68
2018-05-04 20:03:59 +01:00
307f37ab58 Merge pull request #65 from danieljames/include-yes-no-type
Include yes_no_type.hpp from is_complete.hpp
2018-03-31 11:38:12 +01:00
4c3706113a Fix for type-punning warnings from gcc.
See: https://svn.boost.org/trac10/ticket/13479
2018-03-29 11:31:35 +01:00
2bb1021fe8 Include yes_no_type.hpp from is_complete.hpp 2018-03-14 13:49:25 +00:00
e34ad30482 Fix some more gcc-4.5/6 testing errors. 2018-03-13 18:32:15 +00:00
7e19a87e67 Update tests for GCC-4.6.x failures.
Also suppress one new msvc warning (from 14.1 update 6).
2018-03-13 18:03:18 +00:00
ab184c2def Merge branch 'develop' of https://github.com/boostorg/type_traits into develop 2018-03-13 08:55:44 +00:00
bc54a3f54f Travis.yml: add gcc-4.4 and 4.6 testers. 2018-03-13 08:55:30 +00:00
b06185c29f is_nothrow_move_constructible: Tentatively re-enable support for gcc-4.7.x as it seems to work locally 2018-03-07 19:04:26 +00:00
24fa07bbd7 Update history and regenerate docs.
[CI SKIP]
2018-02-21 18:51:22 +00:00
e5003ad808 is_likely_lambda.hpp: Allow use of the workaround for msvc-14.0.
Note that 14.0 update 3 doesn't require this, but update 2 and earlier do.
2018-02-21 18:30:50 +00:00
5240cd67d8 Comparison tests: disable tests that gcc-4.6 and earlier cannot handle. 2018-02-16 19:38:41 +00:00
10f09a6327 is_complete: implementation chokes with gcc-4.5, disable for that compiler.
[CI SKIP]
2018-02-16 19:32:41 +00:00
75160cd755 clang: we can't use the new operator detector code for clang < 3.2. 2018-02-16 19:08:49 +00:00
8d938a4bb9 binary operator traits: previous fix using is_complete can't be used since even incomplete types may have non-member operators declared. 2018-02-14 18:09:52 +00:00
875b95974a binary operators: msvc-12 and under can't cope with new gcc workarounds, so disable in that case. 2018-02-13 19:55:06 +00:00
84f9b6da68 binary operators: add revised workaounds for gcc-4.7 and 4.8 2018-02-13 19:18:12 +00:00
28658d6c11 Comparison operators: add poor man's workaround for captureless lambdas 2018-02-12 18:30:08 +00:00
0155b7030c Update docs for binary operator traits. 2018-02-11 11:31:23 +00:00
014ac72782 Switch to a centralised macro for binary operator traits implementation selection. 2018-02-10 17:40:39 +00:00
7d42b545e9 Merge pull request #62 from glenfe/develop
For MSVC2017 use detector_t instead of make_void
2018-02-10 11:59:38 +00:00
3a0382ccbe Merge pull request #64 from boostorg/issue_13012
Improve binary operators.
2018-02-10 11:45:32 +00:00
fb4430512d Fix up -= and += detection for clang. 2018-02-09 18:20:23 +00:00
94e54c030d binary operators: disable new code for older gcc versions 2018-02-08 19:21:13 +00:00
98d6eaf1e9 Add missing function bodies to test cases - it suppresses gcc warnings. 2018-02-08 09:02:05 +00:00
e9399adefa Add tests for improved binary operators. 2018-02-07 19:50:26 +00:00
e4d3cba6dd Binary Operators: switch to the "detection idiom" if the compiler supports it.
This gives us almost perfect fidelity in the detection and solves the known issues for binary operators.
Also fixes: https://svn.boost.org/trac10/ticket/13012.
2018-02-07 19:14:50 +00:00
fdf9b67335 is_complete: correct namespace names. 2018-02-07 18:03:08 +00:00
ed21a2d9c7 is_complete: no std::declval in gcc-4.4 and earlier.
So disable in that case.
2018-02-07 18:00:06 +00:00
b406b574a5 For MSVC2017 use detector_t, instead of make_void.
(Not using boost::void_t to workaround a VC12 defect)
2018-02-06 22:16:52 -05:00
6d294b5ff2 is_complete: qualify the detail namespace as otherwise it can trip up msvc-14.0. 2018-02-05 12:05:15 +00:00
23520c13a1 Merge pull request #61 from boostorg/issue12285
Assert when we try to use an incomplete type on a trait which require…
2018-02-04 19:27:23 +00:00
df4eccb911 Document is_complete.
[CI SKIP]
2018-02-04 19:26:10 +00:00
0886e13a99 Assert completeness fixes: fix up msvc failures. 2018-02-04 18:15:34 +00:00
bfb6384a0a Assert on incomplete types: begin fixing test failures for msvc-12.0, 14.0, and clang. 2018-02-04 12:52:24 +00:00
ac351390b2 Assert when we try to use an incomplete type on a trait which requires complete types as arguments.
This prevents some traits from doing the wrong thing (ie compiling but giving the wrong answer when handed an incomplete type.
See https://svn.boost.org/trac10/ticket/12285.
A by-product of this is we add is_complete as a new trait.
2018-02-04 10:03:30 +00:00
85a03d3453 Fix integral_constant.hpp for the case where the user has explicitly defined BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE.
Fixes: https://svn.boost.org/trac10/ticket/12212
2018-02-03 16:18:12 +00:00
33bd73e26d Add macro to indicate when is_constructible is fully implemented.
Fixes: https://svn.boost.org/trac10/ticket/12003
[SKIP CI]
2018-02-02 19:24:52 +00:00
30b029d937 Fix typos in is_mem_fun_pointer_tester.hpp.
See https://svn.boost.org/trac10/ticket/11884
[SKIP CI]
2018-02-02 19:18:18 +00:00
f5823d6732 type_traits:function type testing, change to explicit noexcept specifiers as clang-4 can't handle partial-specialisation on noexcept(bool).
Also reinstate and test support for functions with ellipsis.
2018-02-02 18:17:03 +00:00
29c6fc7aa2 Added is_final intrinsic for msvc 2013 and later 2018-02-02 12:12:27 +09:00
c8c95f18ca type_traits: function types, update to detect functions with exception specifications in is_function and is_member_function_pointer. 2018-02-01 19:14:30 +00:00
b78fd5f29d Type_traits.detection idiom: flesh out docs and add history. 2018-01-31 18:55:04 +00:00
35c105501b Implement detection idiom toolkit 2018-01-28 09:40:24 -05:00
5d5c651ea6 Type_traits.is_default_constructible: workaround for std::pair is required for more compilers. We don't need functional appveyor.yml any more. 2018-01-28 10:44:12 +00:00
05c4fdcabb Merge branch 'feature/container_hash' of https://github.com/danieljames/type_traits into develop
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2018-01-28 10:40:14 +00:00
7beb519980 GCC-5.x also needs workaround for std::pair issue 2018-01-27 18:31:28 +00:00
a6e879f091 Add tests and tentative fix for issue with clang mis-identifying pairs of non-constructible types. See github #51. 2018-01-25 13:18:38 +00:00
5ed289c317 Update docs. 2018-01-25 10:56:23 +00:00
837fe4d245 Merge pull request #57 from danieljames/develop
Fallback for is_nothrow_swappable on pre-C++11
2018-01-25 10:44:12 +00:00
3e9608230c Fallback for is_nothrow_swappable on pre-C++11 2017-11-28 22:12:01 +00:00
1146f73070 Travis.yml: Correct use of "cxxstd-dialect". 2017-10-28 16:56:08 +01:00
af2546ae5c travis.yml: need to unset IFS before b2 invocation. 2017-10-28 08:25:13 +01:00
3530a015ed One more try with travis.yml: remove ":" from command line as travis mangles it. 2017-10-27 17:18:19 +01:00
4cd7655730 Correct travis.yml syntax one more time. 2017-10-27 08:31:49 +01:00
4ac0c52b66 Merge pull request #50 from Lastique/fix_clang30_decltype
Add a workaround for clang 3.0 not supporting decltype in base class list
2017-10-26 18:34:02 +01:00
9ee7745626 Merge pull request #47 from kuhlenough/develop
VxWorks has double align issues similar to unix
2017-10-26 18:32:02 +01:00
51c82dc0fe Merge pull request #46 from tanzislam/fix_detail_namespace_for_borland
Fix 'detail' namespace opening for Borland
2017-10-26 18:28:24 +01:00
73fd7479dd Type_traits: try using --hash on the Appveyor b2 command line as we appear to be exceeding the max path length. 2017-10-26 18:09:49 +01:00
ceaddeef42 Type_traits: correct travis.yml. 2017-10-26 11:27:44 +01:00
bb94535ba8 Type_traits: add CI defines to Jamfile. Update travis script to build multiple configurations at once for faster build times. 2017-10-25 19:10:02 +01:00
455e6129be Added a workaround for clang 3.0 not supporting decltype in base class list.
Use an additional proxy class to define the base class using decltype in a
typedef, which is supported by the compiler, judging by Boost.Config tests.
2017-09-19 14:51:45 +03:00
7bc78f51ff Move the detail namespace entirely within the #ifndef __BORLANDC__-block. 2017-09-08 21:37:03 +01:00
b23f18cac2 is_complex.hpp: include boost/config.hpp first so we get compiler specific workarounds prior to including std lib headers. 2017-09-07 18:09:53 +01:00
d6f2dd9186 Whoops, updating intrinsics.hpp again 2017-09-06 10:33:34 -04:00
dfaad9ed21 Update intrinsics.hpp 2017-09-05 23:54:19 -04:00
54f3c61f08 VxWorks has double align issues similar to unix
but only on 32bit IA
2017-09-05 23:46:58 -04:00
907bbbb759 Fix 'detail' namespace closing for Borland
In `type_with_alignment.hpp`, the `boost::detail` namespace is opened in line 28 just before starting the main `#ifndef __BORLANDC__`-block at line 30. The `detail` namespace is closed within the `#ifndef`-block at line 79. Highlight that namespace closing-brace with a comment for visibility.

Furthermore, the main `#ifndef __BORLANDC__`-block has a `#else`-case beginning at line 209, which effectively begins the `boost::detail` namespace at that point. This continuation of the namespace was missing a closing brace, causing a compilation failure with C++Builder (due to not finding `::boost::tt_align_ns::a16` in line 230, but merely finding `::boost::detail::tt_align_ns::a16`). Add that closing brace in line 217 with a visibility comment, just before opening the `tt_align_ns` namespace (which is expected by existing code to be directly inside the `boost` namespace, and not inside `boost::detail`).
2017-08-27 15:15:31 +01:00
06d07e3d11 Merge pull request #44 from boostorg/2017_07_21
Cherry pick fixes from develop for Boost-1.47
2017-07-21 18:27:30 +01:00
d17304143e Merge branch 'develop' into 2017_07_21 2017-07-21 13:38:00 +01:00
defd5612a4 Replace exception specification with noexcept(false) (except.spec. invalid in C++17) 2017-07-21 13:33:56 +01:00
d59b9f419e Suppress g++ bool use warnings 2017-07-21 13:33:56 +01:00
bc98c3b05f Add g++-7 in -std=c++ mode as well 2017-07-21 13:33:55 +01:00
33328ddad0 Add g++-7, clang-4 to Travis 2017-07-21 13:33:55 +01:00
db654452a3 Fix MSVC failures caused by warning C4800 2017-07-21 13:33:55 +01:00
bd30493d1c Add corresponding required include 2017-07-21 13:33:54 +01:00
26b2676928 Add floating_point_promotion test 2017-07-21 13:33:54 +01:00
6acc283b49 Add missing includes 2017-07-21 13:33:53 +01:00
05982c1b09 Reorder test includes to test header self-sufficiency 2017-07-21 13:33:53 +01:00
336162c8c4 Merge pull request #42 from boostorg/feature/is_list_constructible
Add is_list_constructible
2017-07-16 19:04:56 +01:00
1321945e8b Merge pull request #41 from boostorg/pdimov-patch-1
Fix typo in .travis.yml
2017-07-16 19:03:11 +01:00
847b2b3b06 Merge pull request #40 from boostorg/feature/is_nothrow_swappable
Add is_nothrow_swappable
2017-07-16 19:02:45 +01:00
7af1f795c1 Merge pull request #43 from boostorg/pr/fix-gcc7-warnings
Disable g++-7 warnings in a proper manner
2017-07-16 19:00:21 +01:00
aa2158f97b Define CI_SUPPRESS_KNOWN_ISSUES on Travis, suppress known g++-4 issues 2017-07-16 02:29:40 +03:00
7d7322655e Disable g++-7 warnings in a proper manner 2017-07-16 02:06:18 +03:00
a3bef3752c Disable failures caused by g++-7 -std=c++17 bug 2017-07-16 01:44:06 +03:00
d5be3746a1 Suppress warnings on g++ 4.x 2017-07-16 01:20:50 +03:00
ced4870cb0 Add is_list_constructible 2017-07-15 23:03:38 +03:00
0ea90ad466 Fix typo in .travis.yml 2017-07-15 21:51:11 +03:00
b47d4aa421 Disable is_nothrow_swappable_test for the built-in clang++ on Travis, libstdc++ 4.6 is too old 2017-07-15 21:32:13 +03:00
1154c16b34 std::vector isn't nothrow swappable pre-C++17 2017-07-15 20:41:23 +03:00
aa8dcb47cf Add is_nothrow_swappable 2017-07-15 18:57:34 +03:00
64421a443b Merge pull request #39 from boostorg/pr/clang-4
Add g++-7, clang-4 to Travis
2017-07-15 16:09:29 +01:00
d19ff6cec4 Replace exception specification with noexcept(false) (except.spec. invalid in C++17) 2017-07-15 15:20:35 +03:00
53f5c2776c Suppress g++ bool use warnings 2017-07-15 15:19:44 +03:00
0c3d8420ee Add g++-7 in -std=c++ mode as well 2017-07-15 15:05:25 +03:00
3d81378e92 Add g++-7, clang-4 to Travis 2017-07-15 14:36:29 +03:00
97db3128ad Merge pull request #37 from boostorg/pr/missing-config-includes
Add missing includes
2017-07-07 08:11:32 +01:00
8f62efcdfc Fix MSVC failures caused by warning C4800 2017-07-06 00:05:17 +03:00
2260b04c5d Add corresponding required include 2017-07-01 23:54:09 +03:00
468ed1b9be Add floating_point_promotion test 2017-07-01 23:53:15 +03:00
0cae4b02e4 Add missing includes 2017-07-01 23:45:13 +03:00
06c90d642b Reorder test includes to test header self-sufficiency 2017-07-01 23:37:04 +03:00
1f6bc4d80b Merge pull request #36 from boostorg/develop
Merge develop to master
2017-06-29 18:28:26 +01:00
a427937573 CI: disable tricky_rvalue_test when we know it will fail with msvc-10 and 11. 2017-06-04 11:26:20 +01:00
079ea2af3a CI: Add missing appveyor dependency. 2017-06-04 08:12:33 +01:00
6907de979f CI: Fix appveyor bjam arguments. 2017-06-04 08:04:59 +01:00
27c0457cba CI: Simplify appveyor testing load. 2017-05-30 19:34:24 +01:00
31b509c52d Merge pull request #35 from boostorg/improve_ci
Improve CI testing
2017-05-30 09:40:42 +01:00
7bf550d474 CI: add missing type_index dependency. 2017-05-29 20:57:03 +01:00
4b40530453 Fix directory name 2017-05-29 20:30:47 +01:00
f0e7cfbf96 Improve CI testing 2017-05-29 19:58:42 +01:00
1268ba4c24 Appveyor: add initial testing.
Disable known test failures.
2017-05-24 17:51:35 +01:00
ea78f79bbd Merge branch 'develop' of https://github.com/boostorg/type_traits into develop 2017-05-21 10:58:25 +01:00
623f41d806 Update travis to run GCC with GNU extensions, plus multiple XCode versions, and better config_info output. 2017-05-21 10:58:09 +01:00
b67ceea791 Merge pull request #34 from boostorg/feature/remove_cv_ref
Add remove_cv_ref
2017-05-21 10:52:29 +01:00
8a3d01a5ea Add remove_cv_ref 2017-05-20 17:13:43 +03:00
85df11dad2 Don't test new aliases prior to gcc 4.6.4.
Add config_info output to travis build.
2017-05-19 08:40:54 +01:00
c725b736be Rebuild docs. 2017-05-18 19:47:21 +01:00
bb867c86d8 Improve tests for new *_t template aliases.
Add missing *_t aliases.
2017-05-18 19:44:29 +01:00
13d4b60dea Add simple test for _t aliases 2017-05-18 00:33:14 +03:00
909cd6ad9e Merge branch 'develop' into feature/cxx14-aliases 2017-05-16 21:52:52 +03:00
f51a528591 Add _t aliases 2017-05-16 21:52:06 +03:00
9bb504b631 Add workarounds in tests for GCC-4.7 2017-05-16 19:42:35 +01:00
60d8c7d5e1 Fix spurious warnings from old GCC versions in aligned_storage test case 2017-05-16 19:10:38 +01:00
58b0bc964e Add initial .travis.yml 2017-05-16 18:49:01 +01:00
7f792f96c9 Make is_virtual_base_of work on final classes 2017-03-29 22:58:49 +02:00
9e05c49c7d Merge branch 'develop' 2017-02-27 12:06:40 +00:00
551502a4a0 Update history. 2017-02-27 12:06:11 +00:00
2efc763afc Merge branch 'develop' 2017-02-27 12:03:03 +00:00
37955f2360 Merge pull request #29 from glenfe/develop
Add multiple type support to pre-C++11 void_t alias
2017-02-08 18:19:32 +00:00
fe7317d1ba Add multiple type support to pre-C++11 void_t alias 2017-02-07 18:04:31 -05:00
7b29d67a3e Small improvements to make_void:
* When there are no variadic templates, supports up to 5 parameters.
* Tests added for void_t.
* Documentation added on compiler support.
2017-02-07 18:49:33 +00:00
f59467e310 Merge branch 'develop' of https://github.com/glenfe/type_traits into pr28 2017-02-07 18:31:38 +00:00
9898e1684e Merge pull request #27 from zerotypos-found/inspection_report
[inspection report] remove tabs and non-ASCII chars, add newline, etc.
2017-02-07 18:27:13 +00:00
d24f722c5a Add make_void and void_t traits 2017-01-30 19:50:38 -05:00
c3b38bc3dd [inspection report] remove tabs and non-ASCII chars, add newline at EOF, fix copyright 2016-11-29 12:05:30 +09:00
f6c6a3ef9f Add, and update, documentation build targets. 2016-10-10 11:39:54 -05:00
4fffc7637d Add, and update, documentation build targets. 2016-10-07 23:07:37 -05:00
627832e519 Merge branch 'develop'
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2016-08-10 18:27:24 +01:00
5f82b5ac50 Suppress msvc-14 warning. 2016-05-08 18:13:26 +01:00
4243962e40 Conditionally stop using outdated msvc workarounds. 2016-05-08 18:12:57 +01:00
97cea143b9 Add and comment cstddef includes whenever std::size_t is used.
See https://svn.boost.org/trac/boost/ticket/12124.
2016-04-13 18:36:03 +01:00
8637711758 Merge branch 'develop' 2016-04-13 17:54:17 +01:00
b93bed1313 Merge branch 'develop' 2016-04-13 17:53:33 +01:00
01f41ec30e Merge branch 'develop'
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2016-04-01 18:26:57 +01:00
38cbf9df96 Merge pull request #24 from MarcelRaad/fix_clang_msvc
Fixes for clang in MSVC mode
2016-03-18 10:11:53 +00:00
f7e1f2d52e Change #includes to use angle brackets.
See https://svn.boost.org/trac/boost/ticket/11516.
2016-03-12 17:18:24 +00:00
2b64ca10e5 Change #includes to angle brackets.
See https://svn.boost.org/trac/boost/ticket/11516.
2016-03-12 17:05:27 +00:00
4cf4d9c191 Merge branch 'develop' 2016-02-15 19:10:30 +00:00
71c6fea390 Fixes for clang in MSVC mode
In MSVC mode, clang doesn't define __GNUC__.
Also, it doesn't define __clang, but defines __clang__.
2016-02-12 14:55:56 +01:00
1f3a3a1553 Fixes for older GCC versions, see issue 11904. 2016-01-13 10:50:22 +00:00
0bbffe0176 Manually revert accidental commit of tentative CUDA changes. 2016-01-11 13:47:46 +00:00
c526c89267 Update docs. 2016-01-11 13:45:41 +00:00
23d6106101 Revert "Update docs."
This reverts commit 1f65f0351d.
2016-01-11 13:44:51 +00:00
1f65f0351d Update docs. 2016-01-10 18:53:10 +00:00
217c337233 Fix result of add_reference<const void>.
Also update tests.
See https://svn.boost.org/trac/boost/ticket/11900.
2016-01-10 18:10:17 +00:00
70afe1dd0d Merge pull request #23 from gjasny/rename_check_for_apple
Change check to s_check (like #8542)
2015-12-30 18:38:01 +00:00
f80cbb0dad Change check to s_check (like #8542) 2015-12-29 20:41:10 +01:00
bc58964228 Disable wchar_t usage when it's not available.
See https://svn.boost.org/trac/boost/ticket/11870.
2015-12-28 18:53:44 +00:00
a0140edf50 Merge branch 'develop' 2015-12-13 12:49:42 +00:00
08cb0bba32 Add missing #include. 2015-12-12 13:19:12 +00:00
bc8a92c7b6 Suppress use of noexcept for gcc-4.6 as it doesn't handle all failure cases correctly. 2015-12-12 13:15:34 +00:00
58d70ed28b Add tests for https://svn.boost.org/trac/boost/ticket/11840. 2015-12-11 17:32:37 +00:00
b9c1ca01f5 Merge pull request #22 from scopeInfinity/changes
[type_traits] Fixed is_complex<T> with const types. Ticket #11840
2015-12-11 17:31:47 +00:00
dc272078fc [type_traits] Fixed is_complex<T> with const types. Ticket #11840 2015-12-11 20:01:01 +05:30
7d81a57758 Merge branch 'develop' 2015-12-08 19:12:44 +00:00
26531e7e2c Merge branch 'develop' of https://github.com/boostorg/type_traits into develop 2015-12-06 12:12:47 +00:00
f176e0a26d Apply patch https://svn.boost.org/trac/boost/ticket/11831 for clang. 2015-12-06 11:58:11 +00:00
0de68d2722 Merge pull request #21 from Lastique/patch-1
Fix a preprocessor warning on Intel compiler
2015-11-11 12:50:23 +00:00
40fada5956 Fix a preprocessor warning on Intel compiler
Replaced incorrect "#else if" sequence with "#elif". This fixes "warning #14: extra text after expected end of preprocessing directive".
2015-11-11 13:17:02 +03:00
4154c00265 Fix has_trivial_copy on Intel 16. 2015-11-09 18:48:21 +00:00
946221e550 Fix has_nothrow_copy on Intel-16 / Windows. 2015-11-09 13:41:33 +00:00
f0021b147e Merge branch 'develop' 2015-10-15 10:46:41 +01:00
1a5f11bb5a Second patch that makes all common type tests happy. 2015-09-19 23:09:46 +02:00
2f3fecf3f5 First patches for MSVC-7.1 2015-09-19 22:27:38 +02:00
f1f534a923 Merge pull request #19 from igaztanaga/patch-1
Workaround for old compilers like MSVC 7.1
2015-09-15 08:50:14 +01:00
7d4bb24bf6 Workaround for old compilers like MSVC 7.1
Without the indirection, a compilation error was triggered in line 106
2015-09-14 22:03:04 +02:00
e275dfc275 Merge pull request #18 from Lastique/fix_permissions
Remove executable permissions from headers.
2015-09-14 09:15:49 +01:00
99576a12f6 Remove executable permissions from headers. 2015-09-13 21:20:51 +03:00
0f82e72f34 Merge branch 'develop' 2015-09-13 09:34:56 +01:00
5fcd9c3fd4 Merge pull request #17 from ldionne/bugfix/integral_constant
Add missing value_type typedef in integral_constant<bool> specialization
2015-09-13 08:18:19 +01:00
f1bb7f979c Add missing ::value_type typedef in integral_constant<bool> specialization 2015-09-12 19:13:21 -04:00
1b18be716f Remove v2 changelog from master - we don't need it here, it's just for admin. 2015-09-12 11:26:56 +01:00
8151879fb2 Merge branch 'develop' 2015-09-12 11:25:05 +01:00
e5c0382a1b Update change log. 2015-09-12 11:24:30 +01:00
f083968ba6 Update to use new BOOST_HAS_FLOAT128, plus more tests. 2015-08-13 17:53:33 +01:00
39660c2421 Add __float128 specialization for is_floating_point. 2015-08-13 13:22:32 +01:00
a0a9475d17 Stop testing things that can't possibly pass (compiler features not available). 2015-07-24 10:07:27 +01:00
14d595e260 Fix a few more MSVC-14 failures. 2015-07-24 10:04:44 +01:00
98954e1d15 Fix test case. 2015-07-23 19:22:28 +01:00
b03c2df9c3 Disable __alignof usage by clang when it emulating GCC and GCC's behavior is buggy. 2015-07-10 13:15:00 +01:00
5d0cc6dca4 Fix duplicate definitions. 2015-07-10 13:05:31 +01:00
2fc6fea44b Add more missing checks for BOOST_NO_CXX11_RVALUE_REFERENCES, 2015-07-08 18:31:30 +01:00
ac4a37449d Add needed PP_guard around rvalue ref usage. 2015-07-08 16:42:38 +01:00
2d04c70520 Tentative fix for VC14.
Intrinsics behaviour seems to have changed compared to VC12.
2015-07-07 18:35:52 +01:00
50e7e269e5 Try and suppress some vc9 warnings. 2015-07-07 18:21:01 +01:00
312bf1d8ce Add some workarounds for GCC-4.4.x 2015-07-07 18:16:18 +01:00
04a8a9ecc2 Need to use __is_polymorphic intrinsic with msvc
when final is supported.
Also improve tests.
2015-07-07 12:30:28 +01:00
ebf5ae3b76 Disable has_nothrow_destructor for MSVC as appears not to work at present. 2015-06-20 17:50:10 +01:00
f5592c72c0 Fix template args to is_copy_constructible. 2015-06-20 12:47:01 +01:00
3267b296cf Fix correct include. 2015-06-19 09:25:27 +01:00
e19e733040 Regenerate docs and add missing files. 2015-06-18 11:26:28 +01:00
22fd60efe3 Merge branch 'Version2' into develop 2015-06-18 11:23:28 +01:00
d66cb6e905 Fix Oracle C++11 failure. 2015-06-17 19:29:25 +01:00
dca27f8b3d Fix Oracle failure - needs to filter result through is_constructible. 2015-06-17 19:13:19 +01:00
d9255a7958 Disable fully conforming is_convertible for gcc-4.6.4 as it fails our tests. 2015-06-17 18:17:42 +01:00
904a4adf00 Fix #include. 2015-06-16 19:32:27 +01:00
57134385f1 Use old version of is_copy_constructible with older GCC versions. 2015-06-16 19:23:37 +01:00
5a4f30208a More fixes for older GCC versions:
Don't filter through is_constructible/is_assignable etc as older GCC versions can't cope, and don't need these anyway.
2015-06-16 19:11:53 +01:00
9ab3aae3e6 Fix use of is_constructible - to limits to cases where it's really needed.
And to not use it when the compiler would choke.
2015-06-16 18:42:55 +01:00
863ba0a7c5 Revert "Move private-constructor tests into separate file."
This wasn't the right fix, and didn't fix the issue anyway.

This reverts commit fe5f4e2253.
2015-06-16 18:30:02 +01:00
fe5f4e2253 Move private-constructor tests into separate file.
These tests fail on older GCC versions.
2015-06-16 12:47:29 +01:00
fc2b8e14b9 Disable move-construction for arrays - fixes Oracle C++ issue. 2015-06-15 09:02:10 +01:00
821d5a177f Clean up macros after use. 2015-06-14 19:39:13 +01:00
b65423f1fa Fix comment. 2015-06-14 19:36:43 +01:00
642bf8377d More Oracle C++ fixes:
Disable noexcept code for is_destructible - Oracle seems to always return false.
Filter has_trivial_move_assign through is_assignable.
2015-06-14 19:34:26 +01:00
b554c5ae26 Oops should be using is_constructible not is_assignable in has_trivial_move_constructor.hpp. 2015-06-14 19:27:32 +01:00
d3a0be9f48 Fix for Oracle compiler thinking non-moveable types are POD's. 2015-06-14 19:17:21 +01:00
0408a8888f Add missing #include for Solaris. 2015-06-14 18:50:08 +01:00
6b7ed138b2 Stop including type_traits headers from intrinsics.hpp: it leads to cyclic dependencies. 2015-06-14 18:46:24 +01:00
136b7dbd7f Oracle has_nothrow_assign need to check for assignablility. 2015-06-14 18:27:57 +01:00
745bf9bee1 Fix for Oracle+STLPort. 2015-06-14 18:05:58 +01:00
4da98d4e8c Disable use of __oracle_has_nothrow_copy which appears not to do the right thing. 2015-06-14 13:20:18 +01:00
6f5f212fa0 Function types need to be screened out of is_pod on Oracle. 2015-06-14 13:06:23 +01:00
17985daa3c Add Oracle compiler to the list that needs extra includes. 2015-06-14 12:49:59 +01:00
693c7a9ca6 Fix for copy-constructibility with Oracle compiler. 2015-06-14 12:47:31 +01:00
c4243e2914 Ooops, revert to using add_reference for C++98 compilers. 2015-06-14 12:43:27 +01:00
979fc5b293 Delete dead file. 2015-06-14 09:31:45 +01:00
2f2ca65e48 Switch to using boost::declval.
Change has_nothrow_copy to use is_copy_constructible as it has better broken-compiler workarounds than is_constructible.
2015-06-14 09:30:46 +01:00
e68fddd992 Document new traits classes. 2015-06-13 19:19:22 +01:00
739956e561 Update type_traits.hpp to include lots of otherwise missing stuff. 2015-06-13 13:09:04 +01:00
68413905af Update more compiler requirements. 2015-06-12 19:37:19 +01:00
587298b93a Update compiler compatibility notes. 2015-06-12 18:44:01 +01:00
1c91d63197 Looks like some intrinsics are only available in C++11 mode. 2015-06-12 17:57:56 +01:00
cb98a630ff Change is_copy_constructible to use is_constructible where possible, and fix some MSVC failures. 2015-06-12 13:26:27 +01:00
ae76223bab Move trivial/nothrow construct traits closer into line with the standard. 2015-06-11 11:26:33 +01:00
b069b3ce3c Fix spelling of ::value ! 2015-06-11 11:01:18 +01:00
229e99880b Add missing #include to has_trivial_move_constructor.hpp 2015-06-11 10:59:52 +01:00
2fc65e67a8 Add missing #include to has_trivial_move_constructor.hpp. 2015-06-11 10:58:09 +01:00
d44141cf88 Fix behaviour of references and arrays in has_trivial_move_assign. 2015-06-11 10:57:11 +01:00
e8e7724303 Volatile types are not trivially movable. 2015-06-11 10:25:39 +01:00
11cd9e6674 Improve is_destructible - especially for references. 2015-06-11 10:13:30 +01:00
434e26e7a3 Improve is_destructible and add tests. 2015-06-11 10:00:31 +01:00
2d71379074 Fix has_trivial* traits and improve their tests. 2015-06-11 10:00:09 +01:00
24548d6158 Add missing #includes. 2015-06-11 09:58:39 +01:00
1dfcdd7bb2 Bring more docs up to date. 2015-06-11 09:57:56 +01:00
c0ca135b78 Add docs for undocumented has_nothrow_destructor trait. 2015-06-10 17:10:41 +01:00
79942e93cd More intrinsics corrections for clang 2015-06-09 19:38:05 +01:00
ade5857d78 Clang intrinsic needs to be filtered through is_constructible. 2015-06-09 19:33:07 +01:00
c1d885edbd Test nothrow_copy in no-intrinsics mode. 2015-06-09 18:52:17 +01:00
4777c0b4a6 Fix has_nothrow_destructor so it actually works.
Add tests for it.
2015-06-09 18:51:46 +01:00
05e1b3b7a5 Reduce trivial copy dependencies. 2015-06-09 18:51:04 +01:00
b21b0f0476 Fix test case: arrays are not explicitly copyable 2015-06-09 18:50:29 +01:00
4a16185e27 Improve is_constructible.
Add is_destructible.
Add tests.
2015-06-08 19:19:08 +01:00
bdd23b4b9b Merge branch 'develop' of https://github.com/boostorg/type_traits into develop 2015-06-08 17:17:49 +01:00
b7a24b7217 Merge pull request #15 from boostorg/feature/common_type_sfinae
Make common_type SFINAE-friendly, add tests
2015-06-08 17:17:28 +01:00
9fd4ee06b2 Make common_type SFINAE-friendly, add tests 2015-06-08 15:34:45 +03:00
8ed541ac23 Merge branch 'develop' of https://github.com/boostorg/type_traits into develop
Resolved Conflicts:
	doc/transform_traits.qbk
	doc/type_traits.qbk
2015-06-08 11:41:56 +01:00
d124da05c8 Merge pull request #14 from boostorg/feature/copy_cv_doc
Add copy_cv documentation.
2015-06-08 09:20:36 +01:00
965d6ed403 Merge pull request #13 from boostorg/feature/common_type
New implementation of common_type.
2015-06-08 09:18:28 +01:00
ef2d00be2a Use boost::int128_type to avoid GCC warnings.
Without this the type_traits tests fail as they use -Werror.
2015-06-08 09:18:00 +01:00
d97ca425ec Add first draft of is_constructible. 2015-06-08 09:06:39 +01:00
7a0c636208 Update nothrow_constructible tests. 2015-06-08 09:06:16 +01:00
719ea20756 Begin updating docs to match new code. 2015-06-08 09:05:40 +01:00
971fd13805 Remove unnecessary includes. 2015-06-08 02:03:14 +03:00
7cb0e840f1 Moved utility/declval.hpp to type_traits/declval.hpp. 2015-06-08 01:55:17 +03:00
01493e4acb Add a few more common_type tests. 2015-06-08 01:34:06 +03:00
b0f9674649 Add a test for copy_cv. 2015-06-08 01:08:18 +03:00
bc89aa6160 Add a type_identity test. 2015-06-08 00:54:19 +03:00
2180399398 Update documentation of common_type a bit. 2015-06-08 00:39:05 +03:00
987b01b28c Add documentation for declval. 2015-06-08 00:22:03 +03:00
2a645db56c Add documentation for type_identity as well. 2015-06-08 00:09:40 +03:00
d0dbb24faf Move copy_cv to its alphabetical place. 2015-06-08 00:01:09 +03:00
3d3463b639 Rename tp_identity to type_identity; add copy_cv.hpp and type_identity.hpp to type_traits.hpp. 2015-06-07 22:18:49 +03:00
5fcc741db4 Add copy_cv documentation. 2015-06-07 21:10:51 +03:00
2b957cfd55 Add missing include of boost/config.hpp. 2015-06-07 19:19:55 +03:00
ad1ddddaf4 New implementation of common_type. 2015-06-07 19:12:55 +03:00
acf6e41edb Add is_assignable.
Update has_nothrow_assign to make use of it.
2015-06-06 12:51:51 +01:00
34805a673f Improve has_nothrow_constructor with check for constructibility where required. 2015-06-05 18:08:35 +01:00
19b4c5c9ee Add first draft of is_default_constructible trait. 2015-06-05 18:07:27 +01:00
93aa34671b Remove inline namespace support - we're not using it. 2015-06-04 19:00:25 +01:00
916adca633 Add generic version of has_nothrow_assign.
Does not require a compiler intrinsic - makes it easier to port to other/unknown compilers going forward as long as they are C++11.
2015-06-04 18:59:21 +01:00
e31d0ab7bd Suppress VC++ analyzer warnings.
See https://svn.boost.org/trac/boost/ticket/9100.
2015-05-28 19:07:39 +01:00
e824cad0bd Fix indent. 2015-05-28 18:52:29 +01:00
d3ac8b95c4 Bring decay into line with std::decay.
See https://svn.boost.org/trac/boost/ticket/7760.
2015-05-28 18:33:31 +01:00
ab62bb1c14 Add missing #include. 2015-05-28 13:42:00 +01:00
3b86fe6cb4 Disable typeof when BOOST_COMMON_TYPE_DONT_USE_TYPEOF is set. 2015-05-28 13:13:45 +01:00
d57c36d056 Revert "Use typeof with recent Oracle compiler releases."
This reverts commit ef7436a729.
2015-05-27 18:26:01 +01:00
ef7436a729 Use typeof with recent Oracle compiler releases. 2015-05-27 18:22:48 +01:00
fb0c253a86 Add missing include for Oracle. 2015-05-27 18:17:35 +01:00
28b599d17e Add missing #include. 2015-05-27 18:14:47 +01:00
ec6b822957 Add missing Solaris #includes. 2015-05-27 18:10:14 +01:00
55ea6d614c Merge branch 'Version2' into develop 2015-05-22 13:18:48 +01:00
286d08b1ea Mark those changes that have been merged. 2015-05-22 13:17:18 +01:00
3b78213a41 Merge branch 'develop' into Version2 2015-05-21 19:37:33 +01:00
fe2dafdde1 Update PR list. 2015-05-21 19:35:51 +01:00
3ee10740eb Merge branch 'Version2' of https://github.com/boostorg/type_traits into Version2 2015-05-21 18:52:13 +01:00
b333158270 Merge branch 'develop' 2015-05-21 18:51:23 +01:00
9f489b0d71 Add tests to detect, https://svn.boost.org/trac/boost/ticket/11324. 2015-05-21 18:39:50 +01:00
64daadea88 Merge pull request #12 from AntonBikineev/Version2
Version2
2015-05-20 17:49:26 +01:00
eaa601cc38 Merge branch 'Version2' of https://github.com/AntonBikineev/type_traits into Version2 2015-05-20 10:30:37 -05:00
34fe226814 Added decaying to common_type in accordance with defect LWG2141 2015-05-20 10:29:22 -05:00
b3c24153c4 Test PR applied 2015-05-19 21:30:15 -04:00
b1c92f301f PR request for Boost Test 2015-05-19 12:28:32 -04:00
4fb3457fe2 Merge branch 'develop' into Version2 2015-05-17 11:45:08 +01:00
24b7d226d3 Add fix for false positives in is_virtual_base_of
See https://svn.boost.org/trac/boost/ticket/11309
2015-05-16 18:39:49 +01:00
ba1588ebc1 Updated pull requests for Version2 2015-04-27 19:34:19 -04:00
d6683b9759 Combine and put changes in alphabetical library order. 2015-04-27 03:41:29 -04:00
2fcd884d9c Updates for detail and variant 2015-04-02 12:43:26 -04:00
587401cc05 More changes noted, in iterator and function_types 2015-04-01 22:16:52 -04:00
7af948ad26 Chanbed name of detail is_signed implementation to avoid conflicts with numeric_traits detail is_signed implementation. 2015-04-01 17:57:51 -04:00
2b84e5f125 Changed to lexical_cast and lambda 2015-03-31 03:41:01 -04:00
eff5109f0c Put out correct deprecated message. 2015-03-31 00:39:14 -04:00
65ac4ddc5a Put out correct deprecated message. 2015-03-31 00:35:50 -04:00
17885c80f1 Added pull request for boost detail 2015-03-30 02:32:21 -04:00
5ab8957b15 Added Boost function pull request 2015-03-30 01:58:47 -04:00
dcfd3a880b Revert "Make constexpr return values const to suppress clang warnings."
This reverts commit cae9001400.
2015-03-24 19:14:53 +00:00
52a3eeeda4 Make constexpr functions const. 2015-03-24 19:05:32 +00:00
cae9001400 Make constexpr return values const to suppress clang warnings. 2015-03-24 19:04:08 +00:00
703aa0c3b3 Fix clang compilation failure. 2015-03-24 19:01:08 +00:00
080125fffd Merge branch 'develop' 2015-03-19 14:29:51 +01:00
d3cf98115f Merge pull request #11 from akumta/patch-1
Update type_with_alignment.hpp
2015-03-12 19:30:39 +00:00
70345d87d3 Update type_with_alignment.hpp
Update for ticket # 11096.
2015-03-10 09:46:46 -07:00
defa583eba Fix template param name. 2015-02-28 16:58:02 +00:00
258c80886a Add some namespace prefixes to avoid ambiguities. 2015-02-28 16:55:32 +00:00
13c3530448 Fix preprocessor logic, and add missing #include. 2015-02-26 19:11:18 +00:00
e1b4d57733 Merge branch 'develop' 2015-02-23 18:17:21 +00:00
c348b224da Add intrinsic support for Oracle compiler. 2015-02-21 19:06:47 +00:00
13af122a06 Revert "Add intrinsics for Oracle compiler."
This reverts commit 3c6adff2fd.
2015-02-21 19:04:27 +00:00
3c6adff2fd Add intrinsics for Oracle compiler. 2015-02-21 19:02:46 +00:00
93d3c87b5d Merge branch 'develop' 2015-02-14 18:00:52 +00:00
90fca0f64b Reorganise #includes to reduce dependencies - only legacy compilers should depend on anything other than Boost.Config now. 2015-01-31 09:58:35 +00:00
d5465b7801 Merge pull request #10 from alexhenrie/develop
Correct spelling of "suppress"
2015-01-30 20:02:09 -05:00
ad30bf473b Correct spelling of "suppress" 2015-01-30 17:52:03 -07:00
18f8c75289 is_signed and is_unsigned need to inherit from integral_constant. 2015-01-29 11:46:31 +00:00
d584c75252 Add definitions of ::value members. 2015-01-27 16:30:05 +00:00
adf29f0d3f Update pending changes. 2015-01-26 12:48:59 +00:00
1f96f4732a Add back old deprecated header. 2015-01-24 18:16:31 +00:00
5594993c44 Update status. 2015-01-24 18:06:52 +00:00
a685e20578 Fix mpl conceptual failure. 2015-01-22 17:50:18 +00:00
d834d7aeab Update needed changes in other libs. 2015-01-22 16:31:42 +00:00
3c3071e4ef Fix buggy decay. 2015-01-22 09:17:40 +00:00
ea25faa853 Add some more missing #includes. 2015-01-21 19:46:18 +00:00
e1b4b91692 Add notes on changes required by other libs. 2015-01-21 19:11:47 +00:00
e1b1831b79 Fix issue that occurs when wchar_t is not a native type - still an option for msvc. 2015-01-21 18:32:26 +00:00
fb7b527c37 Fix nasty bug in aligned storage. 2015-01-21 18:04:55 +00:00
abe3c03295 Merge branch 'Version2' of https://github.com/boostorg/type_traits into Version2 2015-01-21 16:50:38 +00:00
7513e68882 Added include for BOOST_WORKAROUND. 2015-01-20 19:13:06 -05:00
5a2ab9ffb0 Fix iostreams lib failures, and some some conceptual errors. 2015-01-20 18:14:59 +00:00
81c4b8f860 Fix function_types failures. 2015-01-20 17:40:32 +00:00
60547bfef9 Fix bug in aligned_storage.hpp include guards. Add back some detail headers that other libraries are using. 2015-01-20 13:06:27 +00:00
8f94dbbf35 Inline namespace test version. 2015-01-18 11:39:05 +00:00
3435d48f0e Add the remaining traits - only common_type still has dependencies to something other than Boost.Config. 2015-01-17 19:08:08 +00:00
94eb94980e Add more traits back - nearly complete now. 2015-01-17 18:06:27 +00:00
6aa0878fb3 Add some more traits back. 2015-01-17 13:35:26 +00:00
1b1f90fdea Remove dependency on ice.hpp for operator traits. 2015-01-17 12:00:22 +00:00
fe41f0a4c1 Add operator traits and tests. 2015-01-16 18:30:26 +00:00
c4c10e06c6 Add new versions of decay, extent, function_traits. 2015-01-15 18:23:35 +00:00
6bbee3cc59 Add new versions of alignment traits. 2015-01-15 17:05:05 +00:00
8dc33362b9 Convert some more traits. 2015-01-15 11:31:18 +00:00
3cf613228d Fix Linux #include issues. 2015-01-14 19:17:10 +00:00
f0da159e1f Initial commit of new version of type_traits which has zero dependencies (other than Boost.Config), plus reduced template instantiations, and cleaner easier to read code. 2015-01-14 18:34:11 +00:00
5f0de298dc Merge branch 'develop' 2014-12-11 15:50:01 +00:00
6a8708a128 Update history. 2014-12-11 15:49:21 +00:00
cf42ce1cfd Fix version check. 2014-12-06 09:38:35 +00:00
ffa9927732 Add new hooks for nothrow move assign/construct and fix is_nothrow_move_assignable and is_nothrow_move_constructible for msvc-12 and later. 2014-12-05 18:30:54 +00:00
c76c7cc1ad Update history and regen docs. 2014-11-10 18:01:17 +00:00
9b12c8ad6a Fix for CUDA on Clang compilation failure when including type traits headers.
See https://svn.boost.org/trac/boost/ticket/10694.
2014-11-10 17:58:14 +00:00
f71cdfc11e Merge branch 'develop' 2014-10-30 10:47:21 +00:00
817d036e1e Update history, regenerate docs. 2014-10-30 10:46:19 +00:00
81b951012d Merge branch 'develop' 2014-10-26 13:42:16 +01:00
9ad41f9ff6 Remove unneeded is_const.
Tidy up special cases.
2014-10-20 11:50:47 +01:00
5c0474dbc7 Improve is_nothrow* tests.
Disable is_nothrow* full implementation when there's no SFINAE expressions and simplify implementation.
2014-10-19 17:45:57 +01:00
a838eafd5e Merge branch 'develop' 2014-10-19 08:41:03 +01:00
ffd5e058b3 Merge branch 'develop' 2014-10-18 16:52:53 +01:00
9de6a4924e Merge pull request #8 from MarcelRaad/patch-1
Compile fix for MSVC14
2014-09-25 10:34:44 +01:00
c845f41f2d Compile fix for MSVC14
MSVC14 supports noexcept, but doesn't support expression SFINAE, so false_or_cpp11_noexcept_move_assignable<const T> fails to compile with
error C3892: 'boost::declval': you cannot assign to a variable that is const

Disabling the overload for const types so that they are never reported as noexcept move assignable fixes the compile error. Of course this doesn't work for imaginary UDTs with an assignment operator that is marked both noexcept and const - the alternative would be to guard the block with BOOST_NO_SFINAE_EXPR in addition to BOOST_NO_CXX11_NOEXCEPT.
2014-09-24 14:32:04 +02:00
6b92cc7e26 Fix C++11 syntax error 2014-09-22 18:09:12 +01:00
7e8ed98615 Include is_copy_assignable in doc build. 2014-08-31 18:51:58 +01:00
79b690140e Merge branch 'is_copy_assignable' of https://github.com/igaztanaga/type_traits into develop 2014-08-31 18:24:26 +01:00
383c44d577 Merge branch 'develop' of https://github.com/boostorg/type_traits into develop 2014-08-31 10:47:34 +01:00
497b877d15 Incrementable and decrementable traits failed to compile with array types: fix that by filtering out arrays early. 2014-08-30 09:19:06 +01:00
cf18d2bbac is_copy_assignable implementation added. It needs C++11 support to work reliable. 2014-08-26 23:23:12 +02:00
bbcfff0278 Fix clang is_convertible test failure - we don't need to check for abstract targets as clang does the right thing. 2014-08-23 13:26:15 +01:00
df74811a4c Fix has_trivial_copy so that non-copyable types are never trivially copyable! Also fix clang to detect trivially copyable array types. 2014-08-23 12:20:26 +01:00
c0a2a3c012 Merge pull request #5 from igaztanaga/msvc-12.0_is_copy_constructible_fix
Fix for MSVC 12.0 std::is_copy_constructible and boost::is_copy_construc...
2014-08-20 18:16:45 +01:00
0e78687e7d Fix test case:
* Don't test incomplete types.
* Use new BOOST_NO_CXX11_FINAL macro for checks.
* Use soft checks when no compiler support is present.
2014-08-20 18:15:30 +01:00
6f6e288daf Oops, move gcc config to correct section. 2014-08-20 18:13:21 +01:00
0c7df66d0e Merge branch 'is_final' of https://github.com/K-ballo/type_traits into develop 2014-08-20 17:22:23 +01:00
5d936acc05 Added is_final type trait. Added BOOST_IS_FINAL intrinsic. 2014-08-19 14:45:00 -03:00
ee65713b9e Merge pull request #6 from danieljames/metadata
Create metadata file.
2014-08-18 17:38:07 +01:00
d11a87472a Add metadata file. 2014-08-18 15:11:59 +01:00
dea1f79512 Fix for MSVC 12.0 std::is_copy_constructible and boost::is_copy_constructible return true for types with deleted copy constructors 2014-08-18 01:09:13 +02:00
2131823bc2 Merge pull request #3 from K-ballo/typo-varaible
Fixed typo varaible -> variable
2014-08-15 18:26:19 +01:00
9b3c90a320 Fixed typo varaible -> variable 2014-07-18 21:59:23 -03:00
74b5bea140 Partially revert "Fixes for msvc-13."
This reverts commit e69dd6740a.
2014-07-17 13:21:19 +01:00
e9fbf0eaee Merge branch 'develop' 2014-07-09 19:04:22 +01:00
b80c87f837 Merge pull request #2 from MarcelRaad/develop
compile fix for tests with TEST_STD defined
2014-07-09 18:57:43 +01:00
ada1f1b831 compile fix for tests with TEST_STD defined 2014-07-03 21:05:17 +02:00
b2631acb58 Merge branch 'develop' 2014-06-05 17:22:35 +03:00
3a6fa37355 Tweak comments (removing a non-ascii character, updating references to the C++11 standard, etc.) and rename the include guard macro.
[SVN r81112]
2014-06-05 17:22:27 +03:00
abd3f9a3d6 Utility/declval: update history.
[SVN r78729]
2014-06-05 17:22:26 +03:00
d3f4c2daf0 Utility: Rollback unwanted commit while adding noexcept to boost::declval
[SVN r77562]
2014-06-05 17:22:26 +03:00
a4b03d930c Utility: Fix for Adding noexcept to boost::declval
[SVN r77552]
2014-06-05 17:22:25 +03:00
d0b1fdb484 Utility: Added doc for Adding noexcept to boost::declval
[SVN r77543]
2014-06-05 17:22:25 +03:00
f981615a99 Utility: Apply patch for 6570: Adding noexcept to boost::declval
[SVN r77539]
2014-06-05 17:22:24 +03:00
9b4b60d87a Fix doc errors reported by Rob Stewart. Fixes #5421.
[SVN r71047]
2014-06-05 17:22:24 +03:00
393edd855b Add declval and common type from Vicente J. Botet Escriba. Regenerate docs.
[SVN r65443]
2014-06-05 17:22:23 +03:00
8ced326b70 Tweak comments (removing a non-ascii character, updating references to the C++11 standard, etc.) and rename the include guard macro.
[SVN r81112]
2014-06-05 17:21:59 +03:00
9dca8381fe Utility/declval: update history.
[SVN r78729]
2014-06-05 17:21:58 +03:00
00e3a56d57 Utility: Rollback unwanted commit while adding noexcept to boost::declval
[SVN r77562]
2014-06-05 17:21:57 +03:00
590d24cb2e Utility: Fix for Adding noexcept to boost::declval
[SVN r77552]
2014-06-05 17:21:56 +03:00
d6fd3f6ccb Utility: Added doc for Adding noexcept to boost::declval
[SVN r77543]
2014-06-05 17:21:56 +03:00
8fd600df47 Utility: Apply patch for 6570: Adding noexcept to boost::declval
[SVN r77539]
2014-06-05 17:21:55 +03:00
a04746196d Fix doc errors reported by Rob Stewart. Fixes #5421.
[SVN r71047]
2014-06-05 17:21:55 +03:00
88f5ca0bfd Add declval and common type from Vicente J. Botet Escriba. Regenerate docs.
[SVN r65443]
2014-06-05 17:21:54 +03:00
f00b6182ef Merge branch 'develop' 2014-06-05 10:08:58 +01:00
1f815065bb Fix gcc-4.9.0 warnings 2014-05-02 09:29:30 +01:00
3327d4c48f Fix doc bug: https://svn.boost.org/trac/boost/ticket/9967 2014-04-30 18:13:43 +01:00
03bff14498 Updated fix for https://svn.boost.org/trac/boost/ticket/9910#comment:2
C++11 version of is_convertible does not need a check for is_abstract.
2014-04-27 16:51:19 +01:00
14d6a21eb1 Update docs on alignment traits. 2014-04-24 18:33:16 +01:00
f91ab70055 Apply fix for issue https://svn.boost.org/trac/boost/ticket/9910 which provides a C++11 conforming version of is_convertible. 2014-04-23 12:50:53 +01:00
3b12bbb0d6 regenerate docs and update history. 2014-04-22 09:27:48 +01:00
7c2d5eb2a6 Apply patches from https://svn.boost.org/trac/boost/ticket/7317
Fixes msvc-11 compile failures.
2014-04-22 09:22:35 +01:00
6100ef9bac Regenerate/update docs. 2014-04-21 09:47:34 +01:00
954cdb5e46 Add fix for https://svn.boost.org/trac/boost/ticket/9474 2014-04-21 09:39:19 +01:00
3c5c6a3be1 Merge branch 'develop' 2014-03-17 18:11:37 +00:00
261db898d9 Revert removal of obsolete headers as it breaks existing code.
See https://svn.boost.org/trac/boost/ticket/9783.
2014-03-17 18:06:31 +00:00
da8a57f9dc Change check to s_check.
Fixes https://svn.boost.org/trac/boost/ticket/8542
2014-03-13 18:20:53 +00:00
a0ae848ad2 GCC warning suppression. 2014-03-13 17:56:03 +00:00
1074233206 Fix warning under vc-11.0 2014-03-13 17:44:34 +00:00
890debddb2 Merge branch 'develop' 2014-03-13 17:37:03 +00:00
7f7cde4378 Remove obsolete #includes - reduces dependency burden. 2014-02-20 11:32:01 +00:00
787e28368d Change name of boost::align so it doesn't clash with other stuff. 2014-02-18 13:31:01 +00:00
c137710c27 Merge commit 'a291374a230b89161691f890637b2896459c0afd' into develop: sets up merge point for master->develop merges. 2014-02-16 18:20:50 +00:00
a291374a23 Manual merge of change missed by auto-merge. Master and develop should now be in synch. 2014-02-16 16:53:40 +00:00
acfc15eae3 Remove files which should never have been in Git. 2014-02-16 16:49:45 +00:00
2fe6e4f08b Remove files which should never have been in Git in the first place. 2014-02-16 16:47:52 +00:00
e347b45eef Merge branch 'develop' 2014-02-16 16:37:02 +00:00
8c0269c1c2 Setup first merge point in Git land. 2014-02-16 16:36:50 +00:00
e69dd6740a Fixes for msvc-13. 2014-02-08 16:19:14 +00:00
6f9d6798a7 Suppress spurious GCC warning. 2014-02-08 13:00:54 +00:00
a2b3727caf Fix some GCC warnings by actually testing the types generated. 2014-02-08 13:00:31 +00:00
e9ae20d161 Merge r86524 (Correct broken links to C++ standard papers); fixes #9212
[SVN r86673]
2013-11-13 03:22:55 +00:00
ba63463ab7 Correct broken links to C++ standard papers. Refs #9212.
[SVN r86524]
2013-10-30 12:51:24 +00:00
497c7c10e9 TypeTraits/common_type fix typo. fix #8785.
[SVN r86458]
2013-10-26 15:49:29 +00:00
31ceaf1b02 TypeTraits/common_type fix typo.
[SVN r86457]
2013-10-26 15:30:31 +00:00
d5c5988d92 Remove dead files.
[SVN r86300]
2013-10-14 15:25:21 +00:00
937009e771 Remove use of obsolete BOOST_TT_BROKEN_COMPILER_SPEC
[SVN r86250]
2013-10-11 23:23:26 +00:00
ad10d46cc5 Remove remaining occurances of BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
These evaded scripting.

[SVN r86249]
2013-10-11 23:22:36 +00:00
a7d4ca60cf Simplify multi-component ifdefs containing BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
[SVN r86248]
2013-10-11 23:20:59 +00:00
32f87190d6 Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #elif...#else...#endif blocks.

[SVN r86247]
2013-10-11 23:19:44 +00:00
77697c2134 Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #ifdef...#else...#endif blocks.

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

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

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

[SVN r86243]
2013-10-11 23:13:10 +00:00
7b3dfb6f0a Removed extraneous calling convention declarations for VC++ and compatibles when varargs is used.
[SVN r86214]
2013-10-09 14:54:36 +00:00
f53c38de37 aligned_storage: Remove obsolete GCC version check.
[SVN r86103]
2013-10-01 08:41:55 +00:00
7713e90dc3 TypeTraits: Remove obsolete GCC version checks.
[SVN r86077]
2013-09-30 16:01:57 +00:00
d1403c7d10 TypeTraits: Remove use of obsolete macro
BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING was only defined for GCC 2.

[SVN r86076]
2013-09-30 16:01:34 +00:00
df4224484f TypeTraits: Remove definition of macro for obsolete GCC.
[SVN r86075]
2013-09-30 16:01:16 +00:00
95587ab589 aligned_storage: Remove obsolete MSVC version check.
[SVN r86025]
2013-09-30 00:18:28 +00:00
f23fef070e 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
81918230c6 TypeTraits: Remove obsolete MSVC version checks.
[SVN r85919]
2013-09-25 21:15:34 +00:00
dc676dc982 TypeTraits: Port away from obsolete macro.
[SVN r85918]
2013-09-25 21:14:42 +00:00
ed84feb8b2 TypeTraits: Remove use of obsolete macro.
[SVN r85917]
2013-09-25 21:14:24 +00:00
dec59cee34 TypeTraits: Remove alternative macro definitions for old MSVC.
[SVN r85916]
2013-09-25 21:14:01 +00:00
6d0830f46f Merge type traits from Trunk:
* Adds uchar16_t and uchar32_t support.
* Adds is_copy_constructible trait.

[SVN r85474]
2013-08-26 10:43:14 +00:00
5b7204632a Disable tests that can not be passed by intel compiler due to its usege of the is_copy_constructible trait in C++98/fallback mode (beacause of the bugs in SFINAE for deleted functions). (refs #8802)
[SVN r85357]
2013-08-15 15:17:40 +00:00
e236bd7c14 Intel compiler: do not use SFINAE with decltype/sizeof on deleted functions. Use fallback mode instead (refs #8802)
[SVN r85319]
2013-08-12 13:25:01 +00:00
4b93facaaa Atempt to workaround Intel issue with SFINAE (refs #8802)
[SVN r85222]
2013-08-06 15:37:00 +00:00
c646121426 Test is_copy_constructible trait on C++03/98 with Boost.Move emulation of noncopyable-movable type (refs #8802, refs #8842)
[SVN r85193]
2013-08-03 06:09:35 +00:00
a867293d57 Workaround some of the Intel warinings/bugs in the is_copy_constructible_tests file (refs #8802)
[SVN r85173]
2013-07-30 07:50:21 +00:00
2429f259cc Unify behavior of is_copy_constructible triat when dealing with rvalues + add comments for some tests (refs #8802):
[SVN r85104]
2013-07-22 12:51:09 +00:00
adfe8642af Fix tests for is_copy_constructible triat and fix reference-to-reference issue (refs #8802).
[SVN r85060]
2013-07-17 14:38:39 +00:00
449c859c9d Add support for char16_t and char32_t.
Fixes #8780.

[SVN r85019]
2013-07-12 18:28:17 +00:00
2131265b3d Fix tests build under MSVC for is_copy_constructible triat (refs #8802)
[SVN r85006]
2013-07-12 11:14:11 +00:00
e75060956c Improvemants for is_copy_constructible triat (refs #8802):
* Added small in-place documentation for trait
* Trait is now included by boost/type_traits.hpp header
* Added qbk documentation
* Documentation regenerated

[SVN r85002]
2013-07-11 10:27:49 +00:00
1feea65d89 Added is_copy_constructible triat implementation and tests (refs #8802)
[SVN r84987]
2013-07-09 07:49:44 +00:00
544307225b Remove reference to BOOST_TYPEOF_SILENT as it doesn't exist any more.
[SVN r84846]
2013-06-20 12:14:11 +00:00
554cb99bf1 Remove reference to BOOST_TYPEOF_SILENT as it doesn't exist any more.
[SVN r84845]
2013-06-20 12:13:47 +00:00
75abd7992c Change pp-code to fix #5809.
Fixes #5809.

[SVN r84837]
2013-06-19 17:39:35 +00:00
e7b1851330 Fix for #5809.
[SVN r84836]
2013-06-19 17:37:17 +00:00
c49466d872 Clarify that base classes include indirect ancestors.
Fixes #8407.

[SVN r84762]
2013-06-13 16:09:11 +00:00
03648e3664 Clarify that base classes include indirect ancestors.
Refs #8407.

[SVN r84761]
2013-06-13 16:06:30 +00:00
5cee0e2652 Fix typo in docs and regenerate.
Fixes #7639.

[SVN r84759]
2013-06-13 15:53:03 +00:00
314da4bb03 Fix typo in docs and regenerate.
Refs #7639.

[SVN r84757]
2013-06-13 15:48:59 +00:00
3874a62b66 Merge new traits & accumulated fixes from Trunk.
[SVN r83499]
2013-03-19 19:04:44 +00:00
79b4594c2b Fix messed up parenthesis.
[SVN r83473]
2013-03-17 16:02:13 +00:00
1554970121 Tentative fixes for remaining msvc-11 failures.
[SVN r83437]
2013-03-15 13:27:03 +00:00
2140b4c23c Added missing header for is_nothrow_move_constructible (refs #8189).
[SVN r83430]
2013-03-14 18:56:19 +00:00
0ef52c07fa Added C++11 specific tests for implementation of is_nothrow_move_constructible and is_nothrow_move_assignable traits (refs #8189).
[SVN r83365]
2013-03-08 15:52:46 +00:00
40d87a0683 Fix MSVC11 test (refs #8189).
Added C++11 noexcept implementation of is_nothrow_move_constructible and is_nothrow_move_assignable traits and changed C++03 version to to work close to C++11 (refs #8189).

[SVN r83245]
2013-03-02 16:15:30 +00:00
703afdc9c1 Added includes for new type triats to type_traits.hpp
[SVN r83242]
2013-03-02 08:36:39 +00:00
23bd369b77 Added documentation for new type traits (refs #8189)
HTML pages regenerated (refs #8189)

[SVN r83241]
2013-03-02 08:30:44 +00:00
6ddc6c1d51 Added new type traits (more documentation, more tests and improved C++11 specific features detection still must to be done) (refs #8189)
[SVN r83206]
2013-02-28 19:17:49 +00:00
8886da6e1b Removing a non-ascii character (i.e. a non-breaking space); fixes #8042.
[SVN r82830]
2013-02-12 15:29:39 +00:00
b64cca729d Add comment to the effect that is_POD is deprecated, and get it to forward to is_pod.
[SVN r82678]
2013-02-01 10:16:07 +00:00
fd843864fb Merge typo fixes from Michel Morin from Trunk.
Fixes #7683.

[SVN r82242]
2012-12-28 18:39:22 +00:00
2162f05dfc Apply patches to correct typos from Michel Morin.
Refs #7683.

[SVN r82241]
2012-12-28 18:21:09 +00:00
985ba7d10c Merge changes from Trunk.
[SVN r81829]
2012-12-10 18:11:39 +00:00
a921c555f1 TypeTraits: make it work with Borland
[SVN r81765]
2012-12-07 17:17:03 +00:00
9cd79c769e Removed usage of deprecated macros
[SVN r81554]
2012-11-26 16:59:41 +00:00
c64eb91a2b Remove usage of deprecated macros
[SVN r81466]
2012-11-21 21:11:24 +00:00
a103ebe7ed Update references to the C++11 standard.
[SVN r81113]
2012-10-30 17:01:59 +00:00
e6314963a3 Add initial support for __int128 to Config and TypeTraits
[SVN r81064]
2012-10-25 12:21:19 +00:00
a75ba5f2af Fix preprocessor usage (and synchronize the style); fixes #7306
[SVN r80325]
2012-08-31 03:30:51 +00:00
b95816426c Move new test cases into the "tricky" section as many compilers can't handle them.
Revert previous change that used std::is_convertible on GCC as it breaks code prior to gcc-4.7.
Fix MSVC intrinsic to handle function types better.
Filter out rvalue-refs from is_function.
Partially apply patch from #7251 to make is_convertible behave more according to C++11.
Refs #7251.

[SVN r80234]
2012-08-26 12:14:11 +00:00
c8294f4710 Adding is_convertible test for function types
[SVN r80081]
2012-08-19 02:05:55 +00:00
3bfd10465c Fixing is_convertible for function types; fixes #7246
[SVN r80080]
2012-08-19 02:03:07 +00:00
551385bd9c Remove stray ; in test file.
Add some rvalue ref tests for is_convertible.
Enable use of intrinsics for Intel on Win32.
Fix rvalue ref usage in is_convertible.

[SVN r79983]
2012-08-12 17:57:27 +00:00
8608d0a498 Merged accumulated bug fixes from Trunk.
Refs #6795.
Refs #6394.

[SVN r79562]
2012-07-16 10:03:17 +00:00
7f7a6d2324 Merge changes from trunk:
Fix PDF install rule so that it's explicit and automatically invokes a PDF build when specified on the command line.
So "bjam pdfinstall" will now build and install the PDF to the current directory.
This works around some problems that the previous versions had if the user did not have an FO processor installed (basically Daniel James was unable to build the HTML docs for the distribution if the pdfinstall rule was implicit).


[SVN r79500]
2012-07-14 16:05:50 +00:00
e386b1acbe Fix PDF install rule so that it's explicit and automatically invokes a PDF build when specified on the command line.
So "bjam pdfinstall" will now build and install the PDF to the current directory.
This works around some problems that the previous versions had if the user did not have an FO processor installed (basically Daniel James was unable to build the HTML docs for the distribution if the pdfinstall rule was implicit).

[SVN r79492]
2012-07-14 11:21:03 +00:00
3656db0215 Fix typo. Regenerate docs.
Fixes #6795.

[SVN r79458]
2012-07-12 17:55:05 +00:00
7f7f8a30d0 Add strongly typed enum test.
[SVN r79457]
2012-07-12 17:21:53 +00:00
9903a5539d Restrict gcc pragma to gcc-4.0 and later.
[SVN r79286]
2012-07-05 15:46:18 +00:00
bff7255740 Merge Clang fixes from Trunk.
[SVN r78574]
2012-05-24 09:42:23 +00:00
960c85dedc Explicitly guard gcc's code path using BOOST_CLANG.
Currently, the version check `(__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)` is enough to guard gcc's code path from clang, since clang pretends to be gcc-4.2.1.
But, it seems that the clang's (pretended) gcc version will be changed to a more recent one in the near future. So we need the explicit guard.

[SVN r78448]
2012-05-13 05:49:12 +00:00
888910b677 forgot some change in the previous commit
[SVN r78345]
2012-05-06 03:04:35 +00:00
1cfb87e358 Unconditionally disable clang's __is_pod and __is_empty intrinsics when used with libstdc++ 4.2. This fixes an include order issue reported by Luc Bourhis.
Added `#include <cstddef>` to pull the stdlib's version macro, as done in boost/config/select_stdlib_config.hpp.

[SVN r78344]
2012-05-06 02:50:13 +00:00
d4290a588f Apply Clang patch from Michel Morin.
[SVN r77146]
2012-03-01 11:27:18 +00:00
269d7452b1 Merge type_traits changes from Trunk.
[SVN r76338]
2012-01-07 17:18:00 +00:00
5e1995dcf8 Update to GCC support: support up to 128-byte alignments.
[SVN r76306]
2012-01-04 17:13:24 +00:00
f62a7094d5 operator type traits: merged trunk: documentation on the limitation to template classes
[SVN r75085]
2011-10-22 00:23:10 +00:00
e05726d61d operator type traits: added documentation on the limitation to template classes with operator definition that does not bind with all template arguments
[SVN r75084]
2011-10-21 23:42:44 +00:00
0cd9189357 operator traits: merged trunk->release (patch to make clang work)
[SVN r74930]
2011-10-12 19:41:11 +00:00
e41fd89f7e operator traits: own operator definition moved up to fix clang failures
[SVN r74924]
2011-10-12 05:14:48 +00:00
da123a1166 operator traits: uniform handling of warning removal
[SVN r74920]
2011-10-11 20:38:20 +00:00
171fad88b8 merged operator trait addition from trunk to branches/release
[SVN r74865]
2011-10-09 22:28:33 +00:00
c1072ec858 operator traits: added limitation about SFINAE in the doc
[SVN r74861]
2011-10-09 19:13:44 +00:00
5d84dee264 operator traits: added #include for operator traits in 'include all header' type_traits.hpp
[SVN r74860]
2011-10-09 18:51:44 +00:00
db5707d8c3 Add new traits classes to the index.
Regenerate docs.

[SVN r74842]
2011-10-09 11:05:29 +00:00
9e0c22f76a operator traits: deprecated operator++(bool) is now correctly handled (has_{pre,post}_increment<bool>::value==false
[SVN r74841]
2011-10-09 08:24:42 +00:00
e76b2462f1 Fix msvc warnings.
[SVN r74795]
2011-10-08 10:52:49 +00:00
6e2fae44d4 added type trait extension to operator detection
[SVN r74782]
2011-10-07 21:05:54 +00:00
360373e3ee eliminated unit_test_framework and BOOST_MESSAGE
[SVN r74734]
2011-10-05 10:05:30 +00:00
33db0b59ed Merge minor type traits fixes from Trunk.
[SVN r74575]
2011-09-26 12:19:40 +00:00
204f156c3b Fix doc typo.
Fixes #5942.

[SVN r74571]
2011-09-26 10:59:26 +00:00
969238f5f6 Fix errors in is_union examples.
Fixes #5885.

[SVN r74336]
2011-09-10 16:58:00 +00:00
aabbd5c3c8 Apply final part of Michel Morin's Clang patch.
[SVN r74183]
2011-09-01 17:43:32 +00:00
39cf0ec129 Apply Michel Morin's Clang patch.
[SVN r74178]
2011-08-31 17:10:35 +00:00
5976893b1a Merge accumulated type_traits patches from Trunk.
Refs #5777.

[SVN r74005]
2011-08-22 17:22:32 +00:00
5cc1ceccd1 Fix typo in code.
Fixes #5777.

[SVN r73954]
2011-08-20 16:05:02 +00:00
6842d7346b Documentation tweaks.
Fixes #5666.

[SVN r73942]
2011-08-20 09:02:55 +00:00
437c57d614 Fixes #5707. Fixes some trivial bugs for VC++6
[SVN r73201]
2011-07-17 19:36:06 +00:00
ea26a60081 Update docs to use latest auto-index in Trunk.
[SVN r72975]
2011-07-08 17:51:46 +00:00
2799200d4e Revert Clang intrinsics support - it doesn't always work presently.
Change authorized by eric niebler.
Fixes #5635.

[SVN r72758]
2011-06-26 08:16:55 +00:00
8ac524debe Revert support for clang 3.0 intrinsics in type traits.
As dicussed in:

http://lists.boost.org/Archives/boost/2011/06/182844.php


[SVN r72725]
2011-06-23 19:07:45 +00:00
5eb0486699 Merge from trunk.
[SVN r72423]
2011-06-05 19:13:25 +00:00
0bd2b25d5b Clang 3.0+ supports gcc-style type trait intrinsics.
[SVN r72280]
2011-05-30 12:42:20 +00:00
0e4093146b Fix flags for type_with_alignment test on gcc-4.4 (won't compile due to
uninitialized warning).



[SVN r72279]
2011-05-30 12:41:33 +00:00
e1a315e00e Merge change from Trunk to release.
[SVN r71481]
2011-04-25 12:26:48 +00:00
8375014c95 Disable some embedded win32 warnings.
[SVN r71394]
2011-04-20 16:22:29 +00:00
7fdc037def Fix remove pointer so it works for cv-qualified function pointers in VC-10 (compiler bug workaround).
Fixes #5484.

[SVN r71378]
2011-04-19 11:03:17 +00:00
74d5955a7a Fix misc typos and regenerate docs.
Fixes #5457.
Fixes #5458.
Fixes #5459.
Fixes #5460.
Fixes #5461.

[SVN r71222]
2011-04-13 11:02:44 +00:00
0e0c39c08a Fixes for MSVC compilers confused with namespace issues.
[SVN r70662]
2011-03-28 09:03:39 +00:00
28631034ca Fix up type_traits intrinsic support when using the Intel compiler.
Suppress quite a few Intel-12.0 warnings.

[SVN r70221]
2011-03-20 12:18:59 +00:00
4f873ea632 Don't test msvc bug case for versions of msvc that don't support the fix.
[SVN r70203]
2011-03-19 18:03:57 +00:00
087d133793 Update type_traits tests to reflect C++0x.
Make better/simpler use of C++0x intrinsics where available.
Change a few traits to C++0x behaviour.
Update docs to reflect current intrinsic availability.

[SVN r70057]
2011-03-17 13:12:44 +00:00
ee29b7660f Change is_convertible to use C++0x behaviour where possible.
Change is_converible to use MSVC __is_convertible intrinsic.
Fixes #5271.
Fixes #4530.

[SVN r69822]
2011-03-10 16:52:00 +00:00
104afb9ba4 Fix PDF build from within boost-root/doc/pdf.
[SVN r69512]
2011-03-03 11:23:57 +00:00
023bec7ba0 Fix PDF build from within boost-root/doc/pdf
[SVN r69511]
2011-03-03 11:22:48 +00:00
5c40f50432 Fix non-ASCII character.
Fixes #5099.

[SVN r68691]
2011-02-07 16:39:33 +00:00
6b8890aec8 Fix PDF name and PDF index generation.
[SVN r68284]
2011-01-19 12:49:55 +00:00
902217df24 Don't try and redefine macros that are already set.
[SVN r68095]
2011-01-13 12:14:56 +00:00
c02516b25b Fix comon_type to actually work when typeof isn't in use.
Applies fixes from Vicente Botet.

[SVN r68040]
2011-01-12 13:29:37 +00:00
6be68667fb Document the restrictions on is_virtual_base_of.
Refs #3730.

[SVN r67916]
2011-01-10 16:55:08 +00:00
459e0bb6a0 Document the restrictions on is_virtual_base_of.
Refs #3730.

[SVN r67913]
2011-01-10 13:23:51 +00:00
a865f64c2f Document the restrictions on is_virtual_base_of.
Refs #3730.

[SVN r67912]
2011-01-10 13:17:45 +00:00
eb24b1d9f1 Fix inspection report issues.
[SVN r67729]
2011-01-06 18:14:42 +00:00
19b82cc55b Fix inspection report issues.
[SVN r67728]
2011-01-06 17:09:17 +00:00
0986b590ee Change PDF URL to SF download page.
Add optional index generation.

[SVN r67546]
2011-01-01 18:00:16 +00:00
b67855e6da Change PDF URL to SF download page.
Add optional index generation.

[SVN r67544]
2011-01-01 17:01:48 +00:00
c93d93ccfc Merge minor warning fixes from Trunk.
[SVN r67525]
2010-12-31 18:11:48 +00:00
e0fb41d53c boost/type_traits/common_type.hpp: workaround for gcc 3.2 and 3.3 to avoid spurious warning
[SVN r66835]
2010-11-29 02:26:46 +00:00
ec49c59545 Merge fix for typo from Trunk.
Fixes #4810.

[SVN r66439]
2010-11-07 17:39:07 +00:00
1b5833a894 Fix typo in docs and regenerate.
Refs #4810.

[SVN r66433]
2010-11-07 15:10:13 +00:00
b722d7208b Fix MSVC warning.
[SVN r66404]
2010-11-05 09:50:42 +00:00
cdd2aee33e Merge documentation fixes to release.
[SVN r66285]
2010-10-30 17:34:45 +00:00
a430c8da1d Missing html file in type traits.
[SVN r66272]
2010-10-30 14:31:23 +00:00
0fe5ae981f Apply submitted patch.
Fixes #4707.

[SVN r65780]
2010-10-06 10:40:13 +00:00
eede6ec6e6 Apply submitted patch.
Fixes #4707.

[SVN r65779]
2010-10-06 10:37:48 +00:00
0977ea3b67 Merges changes from Trunk: refer to history.qbk for the details.
[SVN r65708]
2010-10-01 11:11:16 +00:00
5346e1f373 Update history for 1.45.0, regenerate docs.
[SVN r65707]
2010-10-01 10:29:54 +00:00
47e6213bd8 Oops fix typo in last commit.
[SVN r65706]
2010-10-01 09:41:05 +00:00
b6378f93e9 Tentative patch for IMB's compiler.
[SVN r65705]
2010-10-01 09:37:22 +00:00
ff704d8ed0 Suppress use of typeof with the IBM compiler - it appears not to work?
[SVN r65629]
2010-09-27 12:25:37 +00:00
71d516c6f5 Suppress some Intel C++ warnings.
[SVN r65628]
2010-09-27 12:23:46 +00:00
64e9b6ef07 Add missing #include.
[SVN r65626]
2010-09-27 12:15:03 +00:00
c77a72a7cc Add conditional trait.
Update and regenerate docs.
Update type_traits.hpp and add trivial test case for it.

[SVN r65575]
2010-09-24 17:12:08 +00:00
edd98db5fb Change these two traits to always use a static constant and not BOOST_STATIC_CONSTANT - otherwise they don't work!
Refs #4669.

[SVN r65531]
2010-09-22 08:47:55 +00:00
afd6785017 Add declval and common type from Vicente J. Botet Escriba.
Regenerate docs.

[SVN r65443]
2010-09-17 12:12:03 +00:00
e66ffd9a99 Add new traits add_lvalue_reference and add_rvalue_reference.
[SVN r65387]
2010-09-11 18:00:56 +00:00
fd67e7f2db Fix a few more compiler warnings.
[SVN r65273]
2010-09-04 17:36:23 +00:00
d06a16e0e9 Set warnings as errors in type_traits library, where possible.
[SVN r65188]
2010-09-02 09:32:35 +00:00
f8e246218e Commit updated test case.
[SVN r64674]
2010-08-08 08:40:57 +00:00
c9406a97fe Mangle the names of internal classes so they're less likely to conflict with derived class names and members.
Fixes #4453.

[SVN r64251]
2010-07-22 10:29:49 +00:00
58c6ce7362 Update docs to match all the fixes applied to 1.44.
[SVN r64066]
2010-07-16 09:03:26 +00:00
4588039349 Update docs to match all the fixes applied to 1.44.
[SVN r64055]
2010-07-15 17:26:14 +00:00
4bef4e5708 Make all references to the detail:: namespace fully qualified so we don't get ambiguities with other libraries.
Fixes #4407.

[SVN r63739]
2010-07-08 10:27:58 +00:00
b74b5fdf87 Make all references to the detail:: namespace fully qualified so we don't get ambiguities with other libraries.
Refs #4407.

[SVN r63738]
2010-07-08 10:15:11 +00:00
056830ee59 Oops forgot to update this one in last type_traits merge.
Updates file to include the new traits added.

[SVN r63599]
2010-07-04 15:46:45 +00:00
0895150b76 Merge changes from Trunk to support rvalue references better.
[SVN r63598]
2010-07-04 15:25:03 +00:00
0ae96f1401 Remove spurious ";".
[SVN r63495]
2010-07-01 17:46:38 +00:00
d94c44f927 Update docs to match code.
Update type_traits.hpp.
Completes fix for #3804.
Fixes #3804.

[SVN r63487]
2010-07-01 16:14:17 +00:00
b097b5215e Update the type_traits library to handle rvalue references.
Add is_lvalue_reference and is_rvalue_reference traits.

[SVN r63486]
2010-07-01 15:55:48 +00:00
11a217d923 Merge documentation fixes.
* Use `doc/src/*.css` instead of `doc/html/*.css`.
* Remove wiki and people directories.
* Some documentation fixes.
* Left out `minimal.css` changes and boostbook changes because of clashes.


[SVN r63347]
2010-06-26 12:30:09 +00:00
feb203903b Update various libraries' documentation build.
Mostly to use the images and css files under doc/src instead of
doc/html, usually be deleting the settings in order to use the defaults.
Also add 'boost.root' to some builds in order to fix links which rely on
it.

[SVN r63146]
2010-06-20 18:00:48 +00:00
60ba70f9a0 Merge mostly cosmetic fixes from Trunk
[SVN r62834]
2010-06-12 09:55:44 +00:00
9dd5a79afa Change memcpy to memmove in example as ranges may overlap.
Update/regenerate docs.

[SVN r61550]
2010-04-25 08:29:57 +00:00
cf879100c6 Fix inspection script issue: change check to do_check.
[SVN r61454]
2010-04-21 09:04:00 +00:00
0e8e26666e Fixes #4052.
[SVN r60960]
2010-03-31 11:09:21 +00:00
bb9fc4cfaf Merge minor fixes from Trunk.
[SVN r60694]
2010-03-18 16:57:43 +00:00
90c3c8e608 Fixes #4000.
[SVN r60525]
2010-03-12 16:57:29 +00:00
eea6aa420e Add comment to remove_pointer docs.
Fixes #3771.

[SVN r59474]
2010-02-04 17:22:33 +00:00
466c4a68fc Clarify docs and add some more examples.
Fixes #3768.

[SVN r59472]
2010-02-04 17:11:48 +00:00
7cd9227cba Fixes #3704.
[SVN r58905]
2010-01-11 13:30:26 +00:00
30598c1e09 Update docs with new history section.
[SVN r58903]
2010-01-11 13:19:25 +00:00
a5f067761a Fixes #3704.
[SVN r58901]
2010-01-11 13:04:01 +00:00
400f2555ae Fixes #3800.
[SVN r58597]
2009-12-30 17:10:23 +00:00
e7b1b3c773 Fixes #3800.
[SVN r58595]
2009-12-30 16:56:12 +00:00
1335987b92 Merge type_traits bug fixes from Trunk.
[SVN r58216]
2009-12-07 13:06:52 +00:00
89f18be48e Ooops, original test case invoked very undefined behaviour.
[SVN r58215]
2009-12-07 12:56:29 +00:00
908fa41cc3 Check for __unix__ as well as unix.
Fixes #3708.

[SVN r58135]
2009-12-04 10:18:29 +00:00
c8d4c6ccd1 Fix msvc and gcc warnings in the type_traits library.
Build should now be clean with cl /W4 or gcc -Wall -Wextra -pedantic for all except one test - there appears to be no way to use initialized aligned_storage with gcc without it producing a warning :-(

[SVN r57489]
2009-11-08 16:49:40 +00:00
524cb0cfe7 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
3ac7119088 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
13ca0cf698 Fixes #3401.
[SVN r56730]
2009-10-12 11:00:02 +00:00
aff3d68580 Merge interlinked changes in config, type_traits and TR1 libraries.
[SVN r56678]
2009-10-09 16:16:02 +00:00
be3077e203 Fix warnings emitted by gcc when building with -Wall -Wextra.
Fixes #3381.

[SVN r55957]
2009-09-01 12:24:08 +00:00
fcc974dd99 Workaround for IBM compiler issue, see issue #3324.
[SVN r55650]
2009-08-18 11:37:46 +00:00
9de89e9157 Fixes #2935.
Add new config macro BOOST_MSVC_FULL_VER, and updated type_traits to make use of it.

[SVN r55429]
2009-08-06 09:13:09 +00:00
f1817aeee1 Fixes #3317.
Fix is_virtual_base_of so it doesn't lose exception specifications on it's destructors (causes GCC and maybe other compilers to choke).

[SVN r55428]
2009-08-06 08:54:45 +00:00
c9e77b9c8d Fix is_base_of and is_base_and_derived to conform to C++0x.
Also fixed consistency of handling cv-qualified types.
Added new trait in boost::tr1 to archive old tr1 behaviour.
Updated TR1 lib to match.

[SVN r55404]
2009-08-04 17:15:51 +00:00
405c4ba902 Added support for (?(DEFINE) blocks and updated the docs accordingly.
Added support for ICU libraries which may be named icui18n.lib on some Win32 platforms.

[SVN r55267]
2009-07-29 17:11:56 +00:00
3e8055a725 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
f618d007b4 Bring up to date with Trunk (required by type_traits changes).
[SVN r55114]
2009-07-23 11:20:00 +00:00
e398f63259 Add basic copyright/license to keep cmake out of the inspection report
[SVN r55095]
2009-07-22 21:51:01 +00:00
96cbc09229 Fix some typos in docs.
Added stricter tests.
All merged from Trunk.

[SVN r54207]
2009-06-22 12:18:04 +00:00
28ddc6e6f5 Update docs.
Fixes typos.
Fixes #3202.

[SVN r54206]
2009-06-22 12:02:15 +00:00
68a4a628cf Test for: enum UIntEnum { value = UINT_MAX } is promoted to int
[SVN r53220]
2009-05-23 22:32:10 +00:00
afe1661308 Fixed almost all tab and min/max issues found by inspect tool
[SVN r53142]
2009-05-20 19:41:20 +00:00
4f26adad46 Fixed most tab and min/max issues from trunk inspection report
[SVN r53141]
2009-05-20 19:19:00 +00:00
bc45b934b6 Added tests for aligned_storage::address() and fixed some Borland specific bugs (these show up in serialization/test/test_delete_pointer_binary_archive).
[SVN r53071]
2009-05-17 09:12:30 +00:00
8d163a019e update that makes it possible to have empty aligned_storage
[SVN r52804]
2009-05-06 19:21:17 +00:00
0c934b3466 new test of empty aligned_storage
[SVN r52803]
2009-05-06 19:20:55 +00:00
60369a1035 Merged additional type_traits from Robert Ramey.
[SVN r52103]
2009-04-01 10:44:46 +00:00
bbb3e5da87 Add missing #includes.
[SVN r52102]
2009-04-01 09:32:08 +00:00
57bdff2d23 Include new headers.
[SVN r52061]
2009-03-30 17:03:42 +00:00
8ecf616c39 Added docs for the new has_new_operator and is_virtual_base_of traits.
[SVN r52060]
2009-03-30 17:02:46 +00:00
da752aaaa9 Revert Borland specific fix for non-Borland compilers as it breaks some of them :-(
[SVN r52057]
2009-03-30 16:06:39 +00:00
b253d45376 Mostly fix is_virtual_base_of on Borland.
[SVN r51988]
2009-03-26 17:57:05 +00:00
0ab92896c6 Added has_new_operator from Robert Ramey.
[SVN r51955]
2009-03-24 13:35:49 +00:00
44bd98cc6b Add is_virtual_base_of.
Add extra tests for is_base_of to test virtual inheritance.
Trivial warning fix for is_abstract: fixes #2827.

[SVN r51754]
2009-03-13 17:55:21 +00:00
87dcfccb54 Merge PDF build changes from Trunk.
[SVN r51417]
2009-02-23 18:39:32 +00:00
cde7a04813 Add PDF generation options to fix external links to point to the web site.
Added a few more Boostbook based libs that were missed first time around.
Fixed PDF naming issues.

[SVN r51284]
2009-02-17 10:05:58 +00:00
769487b134 Fixes #2591.
Also fixed formatting issue in alignment_of.qbk.
Regenerated docs.

[SVN r51083]
2009-02-08 10:32:08 +00:00
407e286df1 merge of cmake build files from trunk per beman
[SVN r50756]
2009-01-24 18:57:20 +00:00
5744aef20c Merge msvc-specific regression-fixes from trunk.
[SVN r50560]
2009-01-13 13:02:56 +00:00
101527367a Fix msvc regression and add additional tests to check issue #1946 fix.
[SVN r50559]
2009-01-13 12:49:42 +00:00
f785342300 merge changes from trunk
[SVN r50500]
2009-01-07 13:44:46 +00:00
0e8f2434ca MSVC's __alignof operator doesn't always do the right thing: disable for now.
[SVN r50410]
2008-12-30 13:25:26 +00:00
534e3294dc is_class requires remove_cv even when using intrinsics if the compiler is EDG based.
[SVN r50401]
2008-12-29 16:42:35 +00:00
2e8f5e6a14 Disable intrinsic support for GCC-XML.
[SVN r50373]
2008-12-23 16:16:37 +00:00
03d9c11026 Fix 32-bit Linux alignment_of failure.
[SVN r49704]
2008-11-12 18:13:36 +00:00
5490bf61f3 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
e4814ae18a Merge fixes from issue #2346.
[SVN r49337]
2008-10-15 09:29:29 +00:00
2d7661d661 Fixes 2346.
Patches for the codegear compiler, with intrinsic type_traits support enabled.

[SVN r49169]
2008-10-07 17:17:55 +00:00
e001183519 Merge typo fixes from trunk.
[SVN r49145]
2008-10-06 16:12:10 +00:00
0126f5e959 Fix some doc typos.
[SVN r49144]
2008-10-06 15:47:36 +00:00
ea4366f270 Clean up some link errors.
[SVN r48987]
2008-09-28 12:21:39 +00:00
3bd6ccdf41 Merged fix for #2171 from Trunk.
[SVN r47998]
2008-08-06 09:07:54 +00:00
353dad4196 Change PP-logic to fix #2171.
[SVN r47997]
2008-08-06 09:02:49 +00:00
85e6b2fb7c Merge type_traits changes from Trunk.
[SVN r47304]
2008-07-11 10:14:39 +00:00
a8248f5884 Fix some more inspection report issues: mostly non-ASCII characters in peoples names (sorry folks!).
[SVN r46840]
2008-06-29 09:10:46 +00:00
21d466f451 Added alignof intrinsic support: new tests and docs.
Also added test case from issue #1946.

[SVN r46128]
2008-06-04 17:09:37 +00:00
3cc8416611 Enable alignof intrinsic support.
Also fixes #1946.

[SVN r46127]
2008-06-04 17:00:19 +00:00
d1420c8e5a Don't test SSE2 primitives on non-Intel chips.
[SVN r45421]
2008-05-16 09:09:23 +00:00
72e51548aa make_shared added; tweaks for old compilers; fixes #1884.
[SVN r44979]
2008-05-01 16:50:39 +00:00
fb2ea8595a Fixed an ambiguity.
[SVN r44203]
2008-04-12 03:00:17 +00:00
aaefead804 Fix bug report #1797.
[SVN r44126]
2008-04-09 15:21:03 +00:00
4298d36237 Updated type_traits intrinsic support for VC8/9.
Updated type_traits intrinsics docs.

[SVN r44017]
2008-04-03 18:12:04 +00:00
713516cd7d Update the type_traits intrinsics support to include the gcc-4.3 intrinsics.
Also added some braces to our testing macros to quieten gcc warnings.

[SVN r44013]
2008-04-03 16:41:43 +00:00
912045e6ac Updated and strengthened type_with_alignment tests and fixed msvc issue that prevented a type_with_alignment (or any type containing it such as Boost.Optional) from being passed by value. See http://article.gmane.org/gmane.comp.lib.boost.devel/173011 for motivating test case.
[SVN r43984]
2008-04-01 16:48:58 +00:00
9f60cc0b42 Added support and tests for MSVC SSE intrinsic types with alignments > long long.
[SVN r43952]
2008-03-30 17:25:24 +00:00
21b6ef16db Fix bug report #1626: added missing #include.
[SVN r43948]
2008-03-30 16:07:27 +00:00
1555130d16 Merged revisions 43621-43622 via svnmerge from
https://svn.boost.org/svn/boost/trunk
Fixes #1686.

........
  r43621 | danieljames | 2008-03-15 12:59:21 +0000 (Sat, 15 Mar 2008) | 1 line
  
  Update type traits links for new location.
........
  r43622 | danieljames | 2008-03-15 13:04:57 +0000 (Sat, 15 Mar 2008) | 1 line
  
  Regenerate the type traits docs, to get changes from [43621]. Refs #1686.
........


[SVN r43623]
2008-03-15 13:13:08 +00:00
8fa9c7e6a7 Regenerate the type traits docs, to get changes from [43621]. Refs #1686.
[SVN r43622]
2008-03-15 13:04:57 +00:00
78eba00f6b Update type traits links for new location.
[SVN r43621]
2008-03-15 12:59:21 +00:00
93ccf162c7 Merged update from Trunk: adds link to PDF and fixes some broken links.
[SVN r43355]
2008-02-21 13:58:40 +00:00
1f23f44e86 Added link to PDF docs, and regenerated.
[SVN r43354]
2008-02-21 13:51:18 +00:00
c5da70812d Merge inspection report fix.
[SVN r43151]
2008-02-07 10:32:11 +00:00
00b86fc75c Added fix for inspection report.
[SVN r43150]
2008-02-07 10:29:59 +00:00
11e3e918ac Removed dead file.
[SVN r43086]
2008-02-04 09:18:30 +00:00
e80413f337 Removed dead file.
[SVN r43085]
2008-02-04 09:17:35 +00:00
e10f6cab43 Updated type traits library so that everything compiles with -Wall -pedantic with GCC.
[SVN r42899]
2008-01-21 18:11:09 +00:00
6ba37d939d Merge fix for #1525 from Trunk.
[SVN r42139]
2007-12-18 16:39:42 +00:00
8197f3c4e0 Fixes #1525.
[SVN r42138]
2007-12-18 16:37:23 +00:00
bef8e90150 Merge fix for #1504.
[SVN r41969]
2007-12-11 17:18:06 +00:00
3c402d1377 Fixes #1504.
[SVN r41968]
2007-12-11 17:16:21 +00:00
0265a9354b Pick up missing smart_ptr, utility, and type_traits files from full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41386]
2007-11-25 22:34:55 +00:00
2d9de2e57e Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41370]
2007-11-25 18:38:02 +00:00
7c73784313 Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41369]
2007-11-25 18:07:19 +00:00
5e7f4a9c2b Apply warning fix for VC8 and later only: earlier versions warn about the warning suppression :-(
[SVN r41278]
2007-11-21 14:03:16 +00:00
8cfb381025 Change warning suppression, to suppress warnings for VC8 as well.
[SVN r41277]
2007-11-21 12:09:28 +00:00
80e18d2937 Added warning suppression for VC-9.
[SVN r41259]
2007-11-20 16:57:32 +00:00
f250146688 Fix issue #1424.
[SVN r40997]
2007-11-10 17:40:19 +00:00
2d33f4a1bf Fixed license text.
[SVN r40925]
2007-11-08 09:38:22 +00:00
0451d0d24f Added license info.
[SVN r40903]
2007-11-07 18:38:23 +00:00
28dba3e799 Added copyright.
[SVN r40902]
2007-11-07 18:29:00 +00:00
a8c65cc595 added license info in copyright notice at the footer
[SVN r40867]
2007-11-07 03:23:31 +00:00
2275f12df8 Added a couple of boost:: qualifiers that were present in 1.34.1 but got lost from the Trunk.
[SVN r40683]
2007-11-02 13:01:39 +00:00
295936b175 Disabled intrinsic type traits testing for SGI compiler.
Disabled one is_convertible test for aCC on PA RISC.
Disabled some tests in promote_basic_test.cpp for more platforms that have broken WCHAR_MAX macros.

[SVN r40294]
2007-10-22 17:48:51 +00:00
ec72b74218 reverted 36306 for CW 8.3
[SVN r39885]
2007-10-10 10:20:43 +00:00
27eacb4039 Update Jamfiles to make PDF generation easier.
[SVN r39714]
2007-10-05 17:49:12 +00:00
c85d9e3b88 Disable PP-logic for __DECCXX compiler: WCAHR_MAX is defined but doesn't work in PP-logic on that platform.
[SVN r39708]
2007-10-05 15:00:40 +00:00
ed23fafc80 Starting point for releases
[SVN r39706]
2007-10-05 14:25:06 +00:00
dcee03611b Added tip to function_traits.qbk, rebuilt docs.
[SVN r39682]
2007-10-04 09:18:16 +00:00
293d1cb900 Added workarounds for broken WCHAR_MAX.
[SVN r39635]
2007-10-01 09:39:07 +00:00
97e7ce2abf Almost get things building with Borland.
[SVN r39634]
2007-10-01 09:38:05 +00:00
4f323d9845 Disable test for Intel-10.
[SVN r39633]
2007-10-01 08:29:15 +00:00
bb151449f7 Fix msvc warnings.
[SVN r39307]
2007-09-16 08:50:09 +00:00
60963a5d21 Fixed is_base_of/is_base_and_derived so that you get a compiler error if you try and use them with an incomplete class type.
[SVN r39219]
2007-09-12 16:44:16 +00:00
fe60c9c994 OK finally got date modified set right.
[SVN r39179]
2007-09-10 11:27:31 +00:00
e20cc9b294 Try and force a date update.
[SVN r39178]
2007-09-10 11:24:53 +00:00
4d0bcdc9f5 Big type_traits update:
Added make_signed, make_unsigned and is_complex.
Added docs for some previously undocumented traits: is_signed, is_unsigned and decay.html
Added synonyms for some traits that have changed name in the latest C++ std draft.
Re-organised docs, moved docs out of the main doc build for now (it takes too long).

This also fixes issues: http://svn.boost.org/trac/boost/ticket/492 and http://svn.boost.org/trac/boost/ticket/1008.

[SVN r39175]
2007-09-10 09:19:49 +00:00
76d2bb904b This commit was manufactured by cvs2svn to create tag
'Version_1_34_1'.

[SVN r38286]
2007-07-24 19:28:14 +00:00
6378e00d86 Apply patch posted in 'attempt to patch floating_point_promotion on borland' message and wait for regression test results.
http://lists.boost.org/Archives/boost/2007/06/122727.php


[SVN r37919]
2007-06-06 20:02:45 +00:00
dbac0a6f4c Added links to PDF docs.
[SVN r37653]
2007-05-09 17:20:56 +00:00
cff3acdd26 Updated HP-aCC workaround.
[SVN r36731]
2007-01-15 10:42:05 +00:00
820cae7c2c removed dead file.
[SVN r36553]
2006-12-31 17:29:18 +00:00
7be7028a30 Fix typo.
[SVN r36487]
2006-12-22 10:09:37 +00:00
ae6dd08936 Typo fix.
[SVN r36486]
2006-12-22 10:08:55 +00:00
f674627e7b Fix is_base_of example.
[SVN r36348]
2006-12-12 16:14:41 +00:00
f799394457 Fix is_base_of example.
[SVN r36348]
2006-12-12 16:14:41 +00:00
48232e77cb Added additional tests for cv-qualified pointer types: these all fail and add new regressions for old compilers, hence their location here.
[SVN r36307]
2006-12-09 09:34:19 +00:00
51dda56abd Fix cv qualified pointer types so they are recognised as pointers.
[SVN r36306]
2006-12-09 09:33:22 +00:00
69baca3355 Remove obsolete Boost.Build v1 files.
[SVN r35880]
2006-11-06 17:10:46 +00:00
797a419e4c removed dead code.
[SVN r35586]
2006-10-13 09:19:37 +00:00
f26b33201b Removed dead code.
[SVN r35585]
2006-10-13 09:19:09 +00:00
d5a7f6f622 Fix for old broken Borland compilers.
[SVN r35457]
2006-10-03 17:51:44 +00:00
7959ba4206 Removed aCC workarounds that are no longer necessary.
Updated aCC config.


[SVN r34937]
2006-08-24 10:59:16 +00:00
f0372be9da Added copyright.
[SVN r34587]
2006-07-17 11:09:44 +00:00
522e5a9983 Added copyright.
[SVN r34587]
2006-07-17 11:09:44 +00:00
533693d031 Added missing license info.
[SVN r34586]
2006-07-17 11:08:01 +00:00
413b552f6f Added missing license info.
[SVN r34586]
2006-07-17 11:08:01 +00:00
c01e7f7d00 Undef macros before defining them (again).
[SVN r34511]
2006-07-12 11:10:22 +00:00
99a176c004 Undef macros before defining them (again).
[SVN r34511]
2006-07-12 11:10:22 +00:00
1748709ef6 With apologies: changed Rani's surname so that the code will compile cleanly on machines using a far-eastern locale, unfortunately non-ASCII characters in source files are not portable across platforms and compilers.
[SVN r34507]
2006-07-11 12:07:06 +00:00
db595df809 With apologies: changed Rani's surname so that the code will compile cleanly on machines using a far-eastern locale, unfortunately non-ASCII characters in source files are not portable across platforms and compilers.
[SVN r34507]
2006-07-11 12:07:06 +00:00
a809a802f6 Added some comments related to frequently asked questions.
[SVN r34408]
2006-06-26 09:48:58 +00:00
b1269caaf6 Added some comments related to frequently asked questions.
[SVN r34408]
2006-06-26 09:48:58 +00:00
bbd235a4b2 Documentation for promotion traits.
[SVN r34296]
2006-06-13 21:00:06 +00:00
8d23867d2a Disambiguated certain constructs.
[SVN r34227]
2006-06-08 01:47:33 +00:00
bc351d63a4 Disambiguated certain constructs.
[SVN r34226]
2006-06-08 01:39:40 +00:00
16dd4cb998 Added some extra namespace qualifications to keep VC7 happy when used from within the TR1 lib.
[SVN r34182]
2006-06-05 09:40:22 +00:00
de714a5da4 Added some extra namepsace qualifications to keep VC7 happy when used from within the TR1 lib.
[SVN r34181]
2006-06-05 09:39:49 +00:00
cc9fd8a34e Fixed previous commit which was pretty well messed up!
[SVN r34151]
2006-06-03 11:25:54 +00:00
20e4a364b2 Fix header include name: was a duplicate used elsewhere.
[SVN r34144]
2006-06-02 17:52:15 +00:00
3308f93b33 Fix header include name: was a duplicate used elsewhere.
[SVN r34144]
2006-06-02 17:52:15 +00:00
0acf61da07 workaround to restore MIPSpro 7.3.1 Boost.Python build: the old EDG238-based compiler does not support the new boost/type_traits/integral_promotion.hpp
[SVN r34110]
2006-05-27 13:58:58 +00:00
1721b740ff BOOST_TT_AUX_BOOL_TRAIT_DEF1 removed
[SVN r34105]
2006-05-26 17:53:53 +00:00
6e89d59975 included missing files: floating_point_promotion.hpp, integral_promotion.hpp and promote.hpp
[SVN r34061]
2006-05-22 21:02:59 +00:00
0ff77240a8 Sunpro has apparently fixed the problems that need this workaround.
[SVN r34051]
2006-05-21 15:25:15 +00:00
a74063a1a2 remove leading :: from ::boost
[SVN r34040]
2006-05-20 09:35:45 +00:00
ece355a411 // reminder to keep in sync code duplicate.
[SVN r34039]
2006-05-20 09:34:53 +00:00
dac6a91362 Latest Sunpro version apparently doesn't need the workarounds in here.
[SVN r34026]
2006-05-19 13:05:16 +00:00
6d862ae4d3 Added DMC support.
[SVN r33905]
2006-05-02 11:00:21 +00:00
b5f0ef82b7 Updated tests for intrinsics.
[SVN r33758]
2006-04-21 12:59:28 +00:00
1708737f01 Fix bug in __is_pod intrinsic.
[SVN r33757]
2006-04-21 12:58:39 +00:00
d1766db0a4 VC8 __is_pod a bit broken, check for trivial constructor.
[SVN r33756]
2006-04-21 12:00:31 +00:00
feb17336f9 Added stronger tests for the intrinsic compiler support.
[SVN r33755]
2006-04-21 11:59:50 +00:00
88b97b0836 Fixed documentation bug in function_traits.
[SVN r33753]
2006-04-21 09:44:40 +00:00
7eada50812 Fixed documentation bug in function_traits.
[SVN r33753]
2006-04-21 09:44:40 +00:00
591657959b Applying blindly WCHAR_MAX fix for VC7.1
[SVN r33710]
2006-04-16 16:17:59 +00:00
0c7e439b85 Initial version of the code and tests
[SVN r33707]
2006-04-16 00:22:36 +00:00
1a30e4cf63 Fixed extent typo.
[SVN r33705]
2006-04-15 16:17:37 +00:00
117eddb5c9 Fixed typo in extent
[SVN r33704]
2006-04-15 16:16:13 +00:00
9549babcd8 Arrange things so that is_class and BOOST_NO_IS_ABSTRACT are in synch with one another.
[SVN r33566]
2006-04-06 16:28:47 +00:00
036f0593a0 Arrange things so that is_class and BOOST_NO_IS_ABSTRACT are in synch with one another.
[SVN r33566]
2006-04-06 16:28:47 +00:00
d77497ffec Added checks for managed code and __fastcall.
[SVN r33558]
2006-04-05 12:24:17 +00:00
9a4627f3b5 Added guards for managed code and __fastcall
[SVN r33557]
2006-04-05 12:22:36 +00:00
62132b3ad4 Merged remove_xxx implementation for VC6.5 and VC7.0 using typeof trick from HEAD
[SVN r33524]
2006-03-29 17:35:11 +00:00
aba9d9e93d Implemented full support for remove_xxx on VC6.5 and VC7.0.
Based on the typeof hack also used by the boost::typeof library.


[SVN r33476]
2006-03-26 10:15:27 +00:00
e675469610 This commit was manufactured by cvs2svn to create branch 'RC_1_34_0'.
[SVN r33417]
2006-03-21 02:26:31 +00:00
a7e866cc1b Updated version check for Borland 2006
[SVN r33247]
2006-03-07 08:19:28 +00:00
3fc38a9b11 Use BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION instead of
BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION.

Left the old #define in to avoid tromping over lots of code.


[SVN r33089]
2006-02-23 16:48:34 +00:00
8caecf0af8 commented previous changes for CW
[SVN r32881]
2006-02-13 07:47:53 +00:00
d8779a3dd6 missing inline keyword in trivial template functions avoid_unused_warning and no_unused_warning
[SVN r32870]
2006-02-12 21:34:04 +00:00
bc9658d0a8 Additional tests for cv-qualified array types.
[SVN r32811]
2006-02-10 16:21:44 +00:00
b152bda4a9 Patches for VC7.1 not detecting arrays as being const.
[SVN r32810]
2006-02-10 16:20:46 +00:00
db9d9518a5 changes for CW
[SVN r32806]
2006-02-10 13:51:09 +00:00
0e24b170a2 Patch for new Borland compiler.
[SVN r32728]
2006-02-08 10:49:55 +00:00
ecf079d691 Fix test program so it builds with Borland.
[SVN r32432]
2006-01-27 10:36:29 +00:00
2095e8d5a9 Improve is_pod docs.
[SVN r32412]
2006-01-25 10:44:01 +00:00
f3cd13084e Ooops, need to pass the right number of arguments to macros!
[SVN r31667]
2005-11-15 19:12:14 +00:00
9292ae9273 Changed test results to match class declarations.
[SVN r31663]
2005-11-15 11:40:12 +00:00
b1a35a8ee3 Updated is_base_of and is_convertible tests to match TR1 requirements.
Disabled tests that are Boost-specific, when TEST_STD is defined.
Suppress some gcc warnings.


[SVN r31632]
2005-11-12 17:30:30 +00:00
4c8fca9bc9 Make is_base_of<T,T>::value true for all types T, as per TR1.
Make is_convertible<T, void>::value true for all types T, as per TR1.


[SVN r31631]
2005-11-12 17:28:37 +00:00
a9be3b15e3 Improved warning suppression for vc8
[SVN r31620]
2005-11-10 19:48:00 +00:00
f38310ae8a Fixed tests so they actually work when the code really is in namespace std::tr1 (gcc-4).
[SVN r31611]
2005-11-09 17:34:00 +00:00
8dbdb5315b Fix regression: operator= should return a reference.
[SVN r31316]
2005-10-14 12:12:30 +00:00
b5c4409c76 Suppressed some unnecessary VC++ warnings so that tests are -W4 clean.
[SVN r31219]
2005-10-07 14:27:39 +00:00
d453fa3e67 Changed include style to <header> as per issue http://sourceforge.net/tracker/index.php?func=detail&aid=1079444&group_id=7586&atid=107586
Suppressed some VC++ warnings to ensure that the type_traits headers are -W4 clean.


[SVN r31218]
2005-10-07 14:26:38 +00:00
aef81a516f Remove the warnings: they don't really work as intended.
[SVN r31154]
2005-09-30 12:43:31 +00:00
bc4d7d7b32 Large patch from Ulrich Eckhardt to fix support for EVC++ 4.
[SVN r30670]
2005-08-25 16:27:28 +00:00
a0bb26cf98 Fix type_with_alignment and aligned_storage docs mix up.
[SVN r30650]
2005-08-24 16:49:32 +00:00
e8f1b067e4 Patch for pathological case submitted by Vladimir Plus.
[SVN r30624]
2005-08-22 11:07:37 +00:00
d83e054d04 Disabiguated the detail namespace.
[SVN r30558]
2005-08-12 19:06:10 +00:00
004a786439 Improved local documentation build.
[SVN r30479]
2005-08-05 11:44:32 +00:00
a603a6a21d WOrkaround for https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1242266&group_id=7586
[SVN r30218]
2005-07-22 16:14:42 +00:00
b6b9a01a0b Roll back "fixes" that never worked.
[SVN r29798]
2005-06-27 00:49:40 +00:00
7e95b4e2a4 Added cv-qualification to the member pointer. The issue here is that
vc6 fails to strip const from the deduced type when a member pointer
is passed by reference to a function template (I suspect it turns the
const into a qualification on the class itself), so it may need extra
help in detecting these.


[SVN r29797]
2005-06-26 18:00:58 +00:00
4b845146e2 Broken compiler workaround
[SVN r29781]
2005-06-24 15:39:45 +00:00
118684962b Added cv-qualification to all the pointers. The issue here is that
vc6 fails to strip const from the deduced type when a member pointer
is passed by reference to a function template (I suspect it turns the
const into a qualification on the class itself), so it may need extra
help in detecting these.


[SVN r29778]
2005-06-24 15:31:15 +00:00
8b941c5876 Added Tobias Schwinger's patch for gcc-3.2: ensures function types are correctly handled.
[SVN r29737]
2005-06-22 16:59:26 +00:00
edc0635813 IBM/VisualAge also supports SFINAE
[SVN r29474]
2005-06-08 08:30:37 +00:00
eca24d4e5a Revised test cases were too strict for boken compilers, add a note instead, and only run the full tests for functioning compilers.
[SVN r29435]
2005-06-05 10:36:17 +00:00
24f89286a7 Stop passing UDT's through ellipsis - it messes up strictly conforming compilers (EDG and Metrowerks).
Tighten up the tests for function and member [function] types.


[SVN r29431]
2005-06-04 16:01:17 +00:00
0d1dd10357 Avoid VC6 bug: don't use a common name like "binder" it throws VC6 if it's used elsewhere in the program.
[SVN r29249]
2005-05-27 17:00:27 +00:00
810b1a9372 HP aCC can't cope with the new warning supression code in this release, just disable it for now until someone can figure out a proper fix, or until HP fix their compiler....
[SVN r28988]
2005-05-17 11:49:35 +00:00
d9ef904fa1 Added VC++ intrinsic support.
Added intrinsic-hook docs.


[SVN r28824]
2005-05-11 14:32:21 +00:00
955177b624 Change static assertion so that it doesn't cause a warning with VC8.
[SVN r28772]
2005-05-09 16:19:05 +00:00
30571abccc Added warning for "desirable" results that don't come true.
Cleaned up test types: they should be either "all-trivial" or "all-non-trivial".
Added new test cases for has_nothrow* traits.
Fixed test cases for has_virtual_destructor.


[SVN r28662]
2005-05-05 16:24:46 +00:00
c0c0da2eb6 Added intrinsic support for has_nothrow* traits.
Enabled intrinsic support for VC8.


[SVN r28660]
2005-05-05 16:18:00 +00:00
33b763e752 Don't provide T[] specializations for CodeWarrior as it can't differentiate between T[n] and T[].
[SVN r28480]
2005-04-26 05:05:21 +00:00
cf105d7630 Improve testing: ensure that aligned_storage<>::type really is a POD type.
[SVN r28476]
2005-04-25 16:42:47 +00:00
74e3b91d8f Make sure that aligned_storage<>::type really is a POD type.
[SVN r28475]
2005-04-25 16:42:08 +00:00
7c8c40f0fa Fix up docs to point to new BoostBook versions.
[SVN r28460]
2005-04-24 12:01:56 +00:00
ee95ccb724 Use the correct config macro to check for is_abstract.
[SVN r28421]
2005-04-22 16:10:12 +00:00
0ad3ce3405 Workaround for gcc-3.4.2
[SVN r28420]
2005-04-22 15:45:10 +00:00
ff5d236eeb Only enable __stdcall function support when _MSC_EXTENSIONS is defined (rather than _MSC_VER).
[SVN r28388]
2005-04-21 16:07:56 +00:00
55b227c621 Fixes for is_base_and_derived when compiling with /vmg on VC7.1.
[SVN r28387]
2005-04-21 15:58:33 +00:00
bfa2c80b6a Added extra test for newly discovered VC7.1 bug.
[SVN r28386]
2005-04-21 15:55:43 +00:00
c5d028b87e Fixed library information in docs.
Updated examples to match new docs.


[SVN r28289]
2005-04-17 10:45:13 +00:00
a94ec173f1 Added new style docs.
[SVN r28279]
2005-04-16 16:29:33 +00:00
3086f4144f Need to include the correct MPL helper-header to #undef macros after use.
[SVN r28277]
2005-04-16 12:44:26 +00:00
9ca0221b86 Testing __stdcall etc functions with is_member_function_pointer doesn't work with Borland C++, so disable it.
[SVN r27943]
2005-04-03 10:05:04 +00:00
2de95cfbf7 Fixed broken compiler workaround logic (it was previously the wrong way around).
[SVN r27863]
2005-03-29 11:17:30 +00:00
8513618762 Updated is_convertible test cases to check polymorphic-type conversions.
Added more test types to testing header.
Changed utility code to use new test header.


[SVN r27807]
2005-03-24 18:20:18 +00:00
6a9d90291d Fixed is_convertible to use the correct config macro before using is_abstract.
Removed dead file.


[SVN r27806]
2005-03-24 18:18:36 +00:00
8622528d91 Modified function testing to make it configuration-friendly, future changes should require no more than a config macro change.
[SVN r27773]
2005-03-23 11:22:52 +00:00
b026d4b530 Modified type_traits to work better with abstract type, and to supress warnings when converting between builtin types.
Modified is_member_function_pointer and is_function to work with functions containing elipsis, and with __stdcall, __fastcall, and __cdecl function types.
Tidied up is_reference, removing dead code.
Updated tests to exercise the new code.


[SVN r27709]
2005-03-16 17:06:22 +00:00
7ef0acbb18 Sunpro 5.7 fixes from Steve Clamage
[SVN r27695]
2005-03-16 12:22:48 +00:00
6e31d51033 aCC does not allow UDT's passed via an ellipsis
[SVN r27394]
2005-02-15 21:40:26 +00:00
cccfc979be *** empty log message ***
[SVN r27364]
2005-02-13 22:29:22 +00:00
b4bd9ff9df *** empty log message ***
[SVN r27323]
2005-02-11 17:25:57 +00:00
3f8c89fde4 Changed include order to fix Borland 5.5.1 compiler errors (and yes just changing the order is enough to fix the issue - it should really make no difference).
[SVN r27307]
2005-02-10 12:53:20 +00:00
3bfee8baa6 Added a couple of extra tests
[SVN r27146]
2005-02-05 12:49:41 +00:00
17e53bc1be Unified new and old versions of aligned_storage.
[SVN r27145]
2005-02-05 12:49:06 +00:00
30693414d1 pre-processor logic was previously incorrect (missing !).
[SVN r27144]
2005-02-05 12:42:22 +00:00
8b40505dfa Include the right headers!
[SVN r27056]
2005-02-03 13:54:51 +00:00
710d73bed8 Fix for old and broken EDG compilers
[SVN r27055]
2005-02-03 13:54:18 +00:00
fa671bba10 gcc fix.
[SVN r26987]
2005-02-01 11:01:02 +00:00
642bcf966f Enable more tests to build with the TR1 version of type_traits.
Fix missing anchor in docs.


[SVN r26968]
2005-01-31 17:07:47 +00:00
0349d29c67 Mode aligned_storage<>::type report true to is_pod.
[SVN r26960]
2005-01-31 13:50:40 +00:00
0a79e9cb27 Added missing tests, made std test mode TR1 conforming.
[SVN r26959]
2005-01-31 13:49:34 +00:00
119a76547b Bring type traits into line with TR1
[SVN r26937]
2005-01-30 15:47:46 +00:00
07c3946e77 Make is_enum work with types that can not be converted to references (incomplete arrays for example).
[SVN r26936]
2005-01-30 15:41:12 +00:00
945a5e3c82 Make is_abstract work with non-object types (function and incomplete type for example).
[SVN r26935]
2005-01-30 15:40:10 +00:00
8fa22b8024 Modified to use BOOST_NO_IS_ABSTRACT
[SVN r26427]
2004-12-04 13:38:57 +00:00
22d2d9b641 Updated to use BOOST_NO_IS_ABSTRACT.
[SVN r26424]
2004-12-04 12:05:42 +00:00
bbbd77d3e9 fixed out-of-sync comment
[SVN r26405]
2004-12-02 18:16:19 +00:00
42877c1d1b GCC 2.x workaround extended to GCC < 3.2.3
[SVN r26404]
2004-12-02 18:13:29 +00:00
d1958e02f8 Added additional tests for abstract template types.
[SVN r26357]
2004-11-29 16:51:31 +00:00
7dc55473ad Added fix for abstract template types (the fix forces instantiation of the template, and corrects problems with gcc-3.4 and VC7.1).
[SVN r26356]
2004-11-29 16:49:48 +00:00
2b9a6d5351 merge RC_1_32_0 fixes
[SVN r26333]
2004-11-28 04:44:21 +00:00
23278c28f2 Renamed member function foo in is_polymorphic test code, to prevent warnings when the template argument has a function named "foo".
[SVN r25734]
2004-10-15 12:16:54 +00:00
3893bcc538 c++boost.gif -> boost.png replacement
[SVN r25573]
2004-10-05 15:45:52 +00:00
9ca727623b missing #include
[SVN r25471]
2004-09-29 10:18:53 +00:00
6ac28e8e19 fixed Intel Linux pp bug about <: incorrectly treated as a digraph
[SVN r25078]
2004-09-14 09:53:05 +00:00
ad5fc1a2ac workaround buggy preprocessors
[SVN r24914]
2004-09-05 10:03:28 +00:00
e0b3b0418a 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]
2004-09-04 10:34:49 +00:00
8f2d14c5c9 merge new MPL version from 'mplbook' branch
[SVN r24874]
2004-09-02 15:41:37 +00:00
3cdf8c8ed2 Fix for gcc on Win32.
Tidied up macro/config usage.


[SVN r24745]
2004-08-26 10:42:36 +00:00
17c699a256 Fix for DMC compiler
[SVN r24743]
2004-08-26 10:40:39 +00:00
4e54b5db92 Fix int/size_t issues
[SVN r24711]
2004-08-24 13:50:03 +00:00
fa928962a6 MDC fixes from Daniel James
[SVN r24663]
2004-08-23 11:39:22 +00:00
55e2d27da4 License update
[SVN r24598]
2004-08-19 15:23:47 +00:00
ed97beb51f More V2 Jamfile tweaks.
[SVN r23764]
2004-07-19 07:12:45 +00:00
8b6ba77ba4 Added missing copyright
[SVN r23724]
2004-07-18 10:22:19 +00:00
b3d31b8e24 Renamed member check to avoid conflict with MacOS macro of the same name.
[SVN r22890]
2004-05-22 10:36:05 +00:00
39ce140cf7 Added comment on Intel compiler problems.
[SVN r22712]
2004-05-01 10:32:58 +00:00
9c48f6f31e This file is no longer needed, as Jamfile enumerates the test files itself.
[SVN r22335]
2004-02-20 11:25:21 +00:00
d2828d68c9 GLOB rule needs absolute path when called from boost-root/status (ie when the current directory is not this directory).
[SVN r22334]
2004-02-20 11:23:16 +00:00
ffb50c36ac Rewitten test program infrastructure so that it does not depend upon Boost.Test (which causes cyclic rebuild dependencies).
[SVN r22326]
2004-02-19 13:40:07 +00:00
b291a5b304 port to IBM VisualAge
[SVN r22314]
2004-02-18 17:45:53 +00:00
d425460fb1 Updated compiler compatibility for is_enum.
[SVN r22256]
2004-02-13 13:18:46 +00:00
8638d203ac Minor typos fix.
[SVN r22149]
2004-02-03 12:42:35 +00:00
2d74fe9a03 Added support for unbounded arrays
Added long long support to type_with_alignment (AIX fix).


[SVN r21965]
2004-01-26 12:20:03 +00:00
cc007d4c92 Added extra test cases for unbounded arrays
[SVN r21962]
2004-01-26 12:17:07 +00:00
4acd9c06fc DM fixes
[SVN r21930]
2004-01-25 21:34:09 +00:00
c3724f6bea Workaround an Intel bug; added tests for it too.
[SVN r21883]
2004-01-23 00:07:25 +00:00
7f3b917cea Added workaround for gcc3.4
[SVN r21727]
2004-01-14 13:27:20 +00:00
5359f483bc Workaround for GCC2
[SVN r21695]
2004-01-13 19:04:15 +00:00
dca7128b46 Added is_abstract.
[SVN r21668]
2004-01-13 11:08:00 +00:00
76cac3e5dd Added needed copyrights
[SVN r21624]
2004-01-12 13:19:06 +00:00
113a49560e added is_abstract trait
[SVN r21622]
2004-01-12 12:46:59 +00:00
3db3f894df Gcc specific workaround does not work for EDG based compilers, even if they define __GNUC__.
[SVN r21597]
2004-01-11 15:58:28 +00:00
32f2d33eed Added fixes for gcc, to fix remaining regressions with is_class/is_convertible and is_enum
[SVN r21513]
2004-01-06 13:37:10 +00:00
ad627feb41 Added needed extra macro parameter - previous commit was incorrect.
[SVN r21416]
2003-12-29 13:08:17 +00:00
999e74e6db Added extras requirements for type properties.
[SVN r21415]
2003-12-29 12:58:21 +00:00
592f7512af Fixed some issues thrown up by CW9.1:
Some type had trivial operations that were not flagged as such.
Some incomplete types were passed to templates that require a complete type as a precondition.


[SVN r21414]
2003-12-29 11:39:40 +00:00
673f2e35d9 Intel 8 gets mixed up by is_polymorphic test code - use same workaround as MSVC.
[SVN r21361]
2003-12-21 15:54:44 +00:00
970a90b365 Changed boost::true_type/false_type to mpl::true_/false_
[SVN r21335]
2003-12-19 12:11:55 +00:00
1d0e43de3d Patched out JM's BPL-breaking change
[SVN r21289]
2003-12-16 14:16:01 +00:00
0081a5017d Previous version of integral_constant broke on any number of compilers, should now be fixed.
[SVN r21283]
2003-12-16 11:14:17 +00:00
2bce5b2c26 MIPSpro 7.3.1 workaround, as suggested by David Abrahams (thanks!)
[SVN r21275]
2003-12-15 17:20:28 +00:00
b55dc5cc24 Added true_type and false_type to aid user-defined specialisations.
[SVN r21269]
2003-12-15 12:01:53 +00:00
8aaa85b7c3 Added true_type and false_type to make user-defined specialisations easier to write.
[SVN r21268]
2003-12-15 11:58:20 +00:00
9c45fdc67a Minor doc fixes
[SVN r21245]
2003-12-13 12:58:25 +00:00
3145bd52fe DigitalMars fixes
[SVN r21242]
2003-12-13 10:06:06 +00:00
7bbae4111d index.htm renamed index.html
[SVN r21231]
2003-12-11 23:31:15 +00:00
8ec31e802e Potential fix for Intel/Win32
[SVN r21170]
2003-12-07 17:11:11 +00:00
4ae0967156 Removed digraph
[SVN r21169]
2003-12-07 14:31:12 +00:00
f165299dd0 - Revert to David A.'s code, that *almost* worked perfectly
- Add partial specialization of is_pod for lower_alignment<N>


[SVN r21166]
2003-12-06 23:27:28 +00:00
755f23ceea Mark all of the has_one_T structures that we use POD types
[SVN r21142]
2003-12-04 22:21:54 +00:00
fc577f2a2d Restore vc6/7 compatibility; reduce template instantiations.
[SVN r21121]
2003-12-03 13:49:08 +00:00
2ff80eac58 Updated license terms
[SVN r21120]
2003-12-03 13:34:11 +00:00
1924600d9e Include boost/detail/workaround.hpp before using BOOST_WORKAROUND
[SVN r21100]
2003-12-03 01:40:41 +00:00
777e629b4d Added support for the new Borland 6.0 compiler.
[SVN r21036]
2003-12-01 11:53:22 +00:00
949d126e75 stripped tabs
[SVN r21012]
2003-11-30 13:08:35 +00:00
7cd3d12f92 remove tabs
[SVN r20987]
2003-11-28 15:19:31 +00:00
3fe5c5fe0e Roll back Intel-breaking changes that were intended to fix Intel.
[SVN r20888]
2003-11-20 21:37:33 +00:00
372d08277f Commit unary_traits/binary_traits compatibility patch by Thomas Witt
[SVN r20712]
2003-11-07 00:23:00 +00:00
176f89e901 obsolete workaround gcc under OS 10 removed
[SVN r20705]
2003-11-06 16:41:55 +00:00
314d866dc9 Use GCC aligned attribute to simplify type_with_alignment
[SVN r20690]
2003-11-06 01:25:30 +00:00
5e66227e35 Changed header include form so that it won't break bjam dependency analysis anymore.
[SVN r20636]
2003-11-04 11:32:42 +00:00
8ed1eb51be Changed email address to john@johnmaddock.co.uk
[SVN r20472]
2003-10-24 11:13:42 +00:00
e77b6884a7 Last fix can't be applied to Borland's compiler.
[SVN r20276]
2003-10-07 11:59:42 +00:00
b509fb943a Changed over to new boost license
[SVN r20275]
2003-10-07 10:51:54 +00:00
f737ceb667 Add V2 Jamfile
[SVN r20271]
2003-10-07 08:10:42 +00:00
416038f37d Use conforming is_class for EDG compilers
Make is_enum work for class types which are convertible to anything at
all (on many compilers).

smart_ptr library workarounds for __MWERKS__ (must use member function
pointer for unspecified_bool_type).


[SVN r20244]
2003-10-02 17:49:06 +00:00
9c7099c693 Typo fix.
[SVN r20113]
2003-09-19 07:40:06 +00:00
df11683ba2 Use the import rule
[SVN r19968]
2003-09-08 17:38:49 +00:00
43e9e5c7ef - <> includes to "" includes
- add extra spacing around template parameters


[SVN r19911]
2003-09-03 15:19:12 +00:00
2ffc663dd5 Also check structs with a single element of varying types when searching for a type with a particular alignment.
[SVN r19908]
2003-09-02 22:41:10 +00:00
42f271a4dc 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
d8914e583b improve Intel 7.0/01 performance
[SVN r19384]
2003-07-31 01:16:32 +00:00
ae7423f9ac Partial fix for Intel 8.0
[SVN r19321]
2003-07-27 13:00:27 +00:00
eb1c21ad4c use *almost* ideal world implementation of is_convertible_basic_impl for IBM VisualAge compiler
[SVN r19293]
2003-07-24 07:41:44 +00:00
5ae6927668 Various fixes and MSVC6 workaround.
[SVN r19120]
2003-07-14 23:04:31 +00:00
35e8b1e042 use BOOST_NESTED_TEMPLATE
[SVN r19064]
2003-07-11 16:57:35 +00:00
d234acc0c7 introduce BOOST_TT_NO_BROKEN_COMPILER_SPEC to opt out the workaround
[SVN r18879]
2003-06-27 16:13:36 +00:00
b7b12865fb Added warning in the case that no intrinsic support is available.
[SVN r18878]
2003-06-27 16:01:09 +00:00
afc8b2c0c7 chg tag to <note>...</note>
[SVN r18787]
2003-06-12 14:30:53 +00:00
b76189ce85 Added warning in the case that no intrinsic support is available.
[SVN r18779]
2003-06-11 12:19:31 +00:00
76ad487517 Added new macro definition: BOOST_HAS_TYPE_TRAITS_INTRINSICS
[SVN r18778]
2003-06-11 12:12:18 +00:00
37ed08578f Added boost::detail::max_align to Borland-specific implementation.
[SVN r18746]
2003-06-09 22:16:19 +00:00
26b87b8ca0 Moved align_t inside union.
[SVN r18674]
2003-06-05 05:15:04 +00:00
3706d50459 Fix in friend declarations.
[SVN r18661]
2003-06-04 04:39:18 +00:00
677e70fec6 Added const and volatile versions for remove pointer
[SVN r18606]
2003-05-30 11:00:04 +00:00
9cada59f67 Migrated from Sandbox CVS.
[SVN r18578]
2003-05-28 08:05:16 +00:00
b34dbf1312 PowerPC doesn't require strict alignment; therefore we can tolerate types with a default alignment which does not evenly divide any alignment of a POD type we can think of.
[SVN r18553]
2003-05-26 21:15:04 +00:00
54405cf729 stripped tabs from files
[SVN r18526]
2003-05-24 11:14:53 +00:00
786733ac67 Use the recently added BOOST_INTEL macro
[SVN r18511]
2003-05-23 11:53:49 +00:00
ce172f356b Added check for BOOST_DISABLE_WIN32
[SVN r18510]
2003-05-23 11:44:57 +00:00
fb5108780d Use one fewer instantiations for is_pod than we used to.
[SVN r18488]
2003-05-21 22:09:37 +00:00
85cda0604e Added bug fix for case that a polymorphic class has a member named "foo".
[SVN r18481]
2003-05-21 11:17:09 +00:00
323dde4110 Remove all warnings for Intel compiler on Linux as it is already done on Windows
[SVN r18432]
2003-05-18 11:12:24 +00:00
4b7ec4a6ba Previous "fix" included a bug,now fixed.
[SVN r18291]
2003-04-23 10:47:33 +00:00
002c331fdb warning suppression for gcc
[SVN r18273]
2003-04-17 11:20:13 +00:00
f9b5fa44f4 Pick the first type that has the right alignment. The types are roughly ordered
based on size, so this prevents the alignment type from being much larger than
it should be.


[SVN r18258]
2003-04-16 13:36:07 +00:00
a7321a4260 Added function_traits include.
[SVN r18239]
2003-04-12 10:31:40 +00:00
311bcd7a5a Fixed gcc warning suppression
[SVN r18206]
2003-04-08 10:50:26 +00:00
5ddd3757f7 Added warning suppression tests
[SVN r18203]
2003-04-08 10:47:54 +00:00
8f20b24bb5 Bump workaround version number
[SVN r18044]
2003-03-22 13:34:52 +00:00
4a88d0ef16 revert to 1.5 revision
[SVN r17966]
2003-03-17 20:05:45 +00:00
7e82ad2441 Remove #ifndef/#else/#endif block that has the same code in both paths
[SVN r17942]
2003-03-15 23:18:34 +00:00
bf70e2aced Sunpro can't cope with latest is_base_and_derived implementation
added gcc warning suppression to is_class


[SVN r17911]
2003-03-14 12:54:43 +00:00
3013105b1e no message
[SVN r17907]
2003-03-14 07:48:55 +00:00
3f87dccb57 Updated description
[SVN r17898]
2003-03-13 22:01:48 +00:00
138df12e67 Fixed for VA6, it has problems with the overloads for is_mem_fun_pointer_impl(), too.
[SVN r17851]
2003-03-12 15:15:01 +00:00
9f8b4048b4 is_polymorphic font, 2 spelling errors (Fredrik Blomqvist)
[SVN r17850]
2003-03-12 14:51:23 +00:00
6318e7f127 size_t_c -> size_t renaming
[SVN r17794]
2003-03-09 23:42:58 +00:00
36e538bd42 Added dangling_reference FAQ
Various idiomatic MPL cleanups in indirect_traits.hpp
raw_function support
Patches for CWPro7.2
Patches to pass tests under Python 2.3 with the new bool type.
Tests for member operators returning const objects
Fixes for testing Boost.Python under Cygwin


[SVN r17777]
2003-03-08 03:53:19 +00:00
bde1254ebf fix Borland failures
[SVN r17774]
2003-03-08 01:05:08 +00:00
d36390dff7 use BOOST_WORKAROUND macro (as requested by David Abrahams)
[SVN r17773]
2003-03-08 01:01:11 +00:00
5f5d22fb8a MIPSpro compatibility
[SVN r17772]
2003-03-08 00:25:47 +00:00
1dbaf58f35 VC++ 7.1 RC3 fix (Carl Daniel)
[SVN r17769]
2003-03-07 17:29:26 +00:00
40a632a04e MPL names/directory structure refactoring
[SVN r17651]
2003-02-25 23:11:41 +00:00
13cece3bae more refactoring corrections
[SVN r17611]
2003-02-23 22:21:15 +00:00
f8af2cbce6 clean up mistake in refactoring
[SVN r17601]
2003-02-23 14:54:46 +00:00
cbce3789a0 make implementation less stressful for MSVC 6.5/7.0
[SVN r17599]
2003-02-23 05:41:17 +00:00
2b71faafb6 Fixes for Comeau with Borland as backend.
[SVN r17588]
2003-02-22 13:40:23 +00:00
52032cf9dd VC++ 7.1 build 2292 needs this change
[SVN r17519]
2003-02-19 01:54:25 +00:00
21d7b7699e Fixed is_scalar docs.
[SVN r17456]
2003-02-16 12:19:48 +00:00
9dda999d6c Reverted to previous version for Borland C++ Builder 5
[SVN r17228]
2003-02-05 12:13:48 +00:00
973bbc1164 Changed is_POD to is_pod
[SVN r17162]
2003-02-02 12:17:47 +00:00
084bd0ab1b Added description of mechanism (from Terje)
[SVN r17161]
2003-02-02 12:16:42 +00:00
0572dd3713 Updated tests to stress new is_convertible and is_base_and_derived improvements.
Updated docs accordingly.


[SVN r17147]
2003-02-01 12:12:08 +00:00
524468f579 Widened the range of types that may be passed to is_convertible.
Extended is_base_and_derived to cope with ambiguous base classes
and non-public base classes.


[SVN r17146]
2003-02-01 12:11:10 +00:00
9ad8445156 Changed some file names (previously they were too long for some platforms to cope with).
[SVN r16850]
2003-01-10 12:14:57 +00:00
469c0f29e0 Function types are compound types.
[SVN r16792]
2003-01-08 11:28:06 +00:00
555a9f4039 Simplified implementation to !is_fundamental
[SVN r16747]
2003-01-04 12:59:22 +00:00
98467ea686 Updated test library names, and simplified testing rules
[SVN r16712]
2002-12-28 12:50:46 +00:00
04984055d5 add or update See www.boost.org comments
[SVN r16708]
2002-12-27 16:51:53 +00:00
91ef105c63 Account for my older vc7.1 beta version
[SVN r16701]
2002-12-25 23:43:45 +00:00
531442b4f1 Add some tests against array types.
[SVN r16628]
2002-12-16 23:57:20 +00:00
a9c64bba20 ISO-friendly lambda
[SVN r16572]
2002-12-09 08:08:30 +00:00
e8b42afe69 msvc fixes
[SVN r16481]
2002-12-02 19:03:39 +00:00
ef03d3bef0 massive improvement in internal structure overflows (though not a cure yet).
[SVN r16479]
2002-12-02 15:40:17 +00:00
9329678518 Further suppressed internal structure overflow problems
[SVN r16478]
2002-12-02 14:59:50 +00:00
bbb571febb Suppress some GCC warnings
[SVN r16443]
2002-11-27 16:39:14 +00:00
6fe2742c15 Squash internal structure overflows
[SVN r16382]
2002-11-23 21:29:55 +00:00
3c5b4f6ab8 add missing typename
[SVN r16358]
2002-11-21 08:46:49 +00:00
6e4f49afc6 Fixed is_polymorphic for cv-qualified class types
[SVN r16339]
2002-11-20 12:08:15 +00:00
814e55ff5e Fixes for array types on GCC 2.9x
[SVN r16197]
2002-11-11 18:38:58 +00:00
cf508a63da Fixed link to mailing list
[SVN r16186]
2002-11-10 11:57:13 +00:00
9586ee5966 changed no_type to a struct
[SVN r16161]
2002-11-08 12:41:24 +00:00
021ee1971a Added better pp check
[SVN r16143]
2002-11-07 12:56:29 +00:00
73a6e46a1a removed BOOST_IS_ENUM
[SVN r16142]
2002-11-07 12:53:54 +00:00
1472db4c06 intel 7.0 fixes
[SVN r16139]
2002-11-07 01:13:02 +00:00
e0a3d316cc Sun patch
[SVN r16131]
2002-11-06 11:53:07 +00:00
bd7e6c0c18 Stopped testing std::ios_base (it's not always polymorphic, even though it should be).
[SVN r16114]
2002-11-05 12:51:16 +00:00
46652e39e6 missing ||
[SVN r16100]
2002-11-04 18:15:57 +00:00
f49d7192a7 Commented out a couple of corner case tests
[SVN r16092]
2002-11-04 12:49:23 +00:00
f70b52cdc0 Fixed test name
[SVN r16091]
2002-11-04 12:37:26 +00:00
ad38d7a133 Enabled new is_convertible version for a couple of compilers only, may actually work this time...
[SVN r16090]
2002-11-04 12:35:26 +00:00
d3484d9b84 Added Borland specific fixes for dropped cv-qualifiers.
[SVN r16089]
2002-11-04 12:34:33 +00:00
4b2788fdcb Added Borland specific fixes for references to arrays.
[SVN r16088]
2002-11-04 12:24:50 +00:00
ee2b66b31f Added missing include
[SVN r16087]
2002-11-04 12:24:17 +00:00
bac27107b7 Reverted default implementation to old version,
the new version doesn't quite work for all the cases required.


[SVN r16082]
2002-11-03 12:35:22 +00:00
026434c941 removed definition of intrinsics, these are now defined elsewhere.
[SVN r16081]
2002-11-03 11:57:54 +00:00
208f56cd68 Fixed spelling of metrowerks traits class intrinsics
[SVN r16080]
2002-11-03 11:44:48 +00:00
012d6ed522 Disabled MWCW intrinsic for now.
[SVN r16051]
2002-11-02 11:36:56 +00:00
bb241cc1e2 Modified function test overloads so as not to produce ambiguities with some compilers.
[SVN r16049]
2002-11-02 11:32:03 +00:00
3353896f3d Fix some of JM's "fixes". He can come back and "fix" them again later
if he doesn't like these ;-)


[SVN r16048]
2002-11-02 02:43:10 +00:00
f9f4952fef gcc 3 fix for function types.
[SVN r16040]
2002-11-01 12:31:42 +00:00
ba8d0a6df7 Added is_polymorphic docs.
[SVN r16039]
2002-11-01 12:16:11 +00:00
a1cb3d8550 Moved intrinsic compiler support to a separate file "boost/type_traits/intrinsic.hpp"
[SVN r16038]
2002-11-01 12:15:26 +00:00
d23af42bc3 Updated is_convertible tests.
Updated docs to reflec most of the recent changes.


[SVN r16032]
2002-10-31 12:35:28 +00:00
a44fafcd68 Changed is_POD.hpp to is_pod.hpp
[SVN r16031]
2002-10-31 12:33:22 +00:00
dbe91fcc3a Committed experimental version that doesn't pass UDT's through (...)
[SVN r16030]
2002-10-31 12:32:52 +00:00
38f7de18d8 changed is_POD.hpp to is_pod.hpp
[SVN r16023]
2002-10-30 12:35:17 +00:00
4481e52842 reinstated separate test file for tricky incomplete types (is_enum doesn't always work with incomplete types)
[SVN r16021]
2002-10-30 12:32:46 +00:00
6fd18f08d0 Added some typecasts to try and fix IBM compiler errors.
[SVN r16014]
2002-10-29 12:43:24 +00:00
cdc8512d63 Updated tests to reflect what really does fail with broken compilers.
[SVN r16013]
2002-10-29 12:14:14 +00:00
612eea170c Added intel C++ fixes to is_integral
Added non-throwing destructors to is_polymorphic internal testers


[SVN r16011]
2002-10-29 12:06:06 +00:00
ac20374243 minor fix for integer_traits,
changed is_pod.hpp include to is_POD.hpp as a temporary fix


[SVN r15996]
2002-10-27 12:16:39 +00:00
214c319cbc Undone name change
[SVN r15995]
2002-10-27 11:49:52 +00:00
a4f0ca7ff0 Undone abortive name change
[SVN r15994]
2002-10-27 11:45:17 +00:00
8a40e1474f Changed is_POD.hpp to is_pod.hpp (first try!).
[SVN r15993]
2002-10-27 11:30:07 +00:00
015c5aff8f Added is_polymorphic.
[SVN r15987]
2002-10-26 11:44:42 +00:00
6c67b3bbc0 Added copyright declarations.
[SVN r15986]
2002-10-26 11:35:35 +00:00
406b57c444 Added is_polymorphic.
[SVN r15985]
2002-10-26 11:35:02 +00:00
ff4614a2a0 Undone previous fixes for gcc >= 3
[SVN r15983]
2002-10-25 11:59:36 +00:00
6af3ce77b5 Fixed case sensitivity of is_POD.hpp header name.
[SVN r15982]
2002-10-25 10:41:55 +00:00
1efa8a8319 Added new type traits tests.
[SVN r15974]
2002-10-24 10:18:05 +00:00
0ffcc1f82e Misc. fixes mostly as a result of the new test programs.
[SVN r15973]
2002-10-24 10:14:13 +00:00
9dd512ac83 file iteration fixes
[SVN r15936]
2002-10-15 20:21:08 +00:00
3e40fe2c5b minor Borland fix
[SVN r15434]
2002-09-18 04:44:32 +00:00
d5669c55ea some cleanup
[SVN r15349]
2002-09-15 23:50:33 +00:00
8ab81a2e6a Bring MPL v2 to the main trunk
[SVN r15347]
2002-09-15 22:13:24 +00:00
d42475aa35 Whoops! Checked in too soon!
[SVN r15337]
2002-09-15 18:47:43 +00:00
8ff8efdba7 Another bugfix
[SVN r15336]
2002-09-15 18:46:21 +00:00
f29eb40c5b bugfix
[SVN r15335]
2002-09-15 18:18:36 +00:00
1f83862245 Workaround VC7 bug.
[SVN r15283]
2002-09-12 23:46:45 +00:00
84431c1e32 Distinguish between VC++ versions
[SVN r15127]
2002-09-01 14:57:40 +00:00
a4c44749cb Fixed build issues with new unit test framework.
[SVN r15079]
2002-08-24 11:25:42 +00:00
1aa23ac1ce Fixes for C++ Builder 7 (Kylix)
[SVN r15077]
2002-08-24 11:24:13 +00:00
b74f038624 #include <boost/test/execution_monitor.hpp> for new Boost.Test version
[SVN r14772]
2002-08-10 21:52:10 +00:00
1151a7593a Added add_cv docs.
[SVN r14730]
2002-08-07 10:47:12 +00:00
1ba525e29d Add support for retrieving the arity of a function type without partial
specialization. Document and test this


[SVN r14694]
2002-08-05 13:57:24 +00:00
8f8e96630c function_traits_test.cpp:
- Test the function_traits template


[SVN r14673]
2002-08-05 02:01:06 +00:00
ac4289bd6c index.htm:
- Added documentation for function_traits class template


[SVN r14672]
2002-08-05 02:00:26 +00:00
9788a1455d function_traits.hpp:
- Added function_traits template that returns arity, result type, and
    argument types for a function type.


[SVN r14671]
2002-08-05 01:59:53 +00:00
b8b462622b function_traits.hpp
[SVN r14670]
2002-08-05 01:57:33 +00:00
7be10f011f Add type_with_alignment to Type Traits Headers section
[SVN r14669]
2002-08-05 01:27:30 +00:00
15ec877a06 removed illegal default parameters from is_const_helper and is_volatile_helper
[SVN r14625]
2002-07-27 11:42:51 +00:00
57085fa2fd Rip out mistaken "fix" based on John Maddock's advice
[SVN r14446]
2002-07-14 11:47:42 +00:00
6ae020bb5c Fix unversioned VC++ checks
[SVN r14436]
2002-07-13 12:26:19 +00:00
957183842d Fixed copyright notice
[SVN r14394]
2002-07-10 10:55:04 +00:00
5d13b168b3 rollback to prev. version
[SVN r14348]
2002-07-08 11:30:33 +00:00
0076e5f3e2 mpl_v2 refactoring
[SVN r14347]
2002-07-08 11:27:39 +00:00
a909c9c929 Make it work standalone
[SVN r14067]
2002-06-02 05:40:57 +00:00
e0b24e8baa respect <sysinclude>
[SVN r13995]
2002-05-21 16:24:07 +00:00
ab9f92f970 Lots of documentation updates, plus the associated code shuffling needed to expose the right things to users
[SVN r13975]
2002-05-19 04:57:44 +00:00
58b0a1c266 Removed tabs, fixed end of files.
[SVN r13803]
2002-05-10 11:35:38 +00:00
390fc256eb Updated EDG expected failures
[SVN r13741]
2002-05-08 10:37:33 +00:00
9a6f5dc39f Added new config macro BOOST_HAS_MS_INT64 to detect presence of __int64 data type.
Modified boost source to use BOOST_HAS_LONG_LONG and BOOST_HAS_MS_INT64
   where appropriate to do so.


[SVN r13714]
2002-05-07 11:24:29 +00:00
7977b71a5e Fixed integral constant expression bug.
[SVN r13683]
2002-05-06 10:34:36 +00:00
e0bfa608ce Fixes for Borland C++ Builder 6
[SVN r13662]
2002-05-04 11:03:42 +00:00
2c5d50d193 Fixed broken links.
[SVN r13574]
2002-04-27 11:05:49 +00:00
c4f487229a Workarounds for VC7.01
[SVN r13565]
2002-04-26 14:15:33 +00:00
ea84470847 Disabled the new is_class for BOOST_MSVC==1301
[SVN r13543]
2002-04-22 18:02:11 +00:00
10b04fb413 More conformance fixes
[SVN r13494]
2002-04-15 16:30:53 +00:00
db10a86c04 Conformance fixes for CWPro8
[SVN r13487]
2002-04-15 03:47:59 +00:00
fea7fc1a3a kill unused parameter warning
[SVN r13486]
2002-04-15 02:42:32 +00:00
415b3247dc register expected failures for Pro7.2
[SVN r13485]
2002-04-15 02:31:33 +00:00
36005cdb14 Fixes for CWPro8 boundary
[SVN r13484]
2002-04-15 02:22:38 +00:00
e41ec3d33a Fixes for CWPro7.2
[SVN r13449]
2002-04-11 18:59:28 +00:00
ae1023cdd0 Suppress warnings for conforming compilers
[SVN r13429]
2002-04-10 13:45:58 +00:00
e87486cf7b alignment_traits.hpp:
- lots of parentheses for Borland C++

type_traits_test.hpp:
  - More parentheses for Borland C++
  - Move 'align_t' out of type_with_alignment test function 'do_it' (because Borland C++ wants it that way)


[SVN r13419]
2002-04-10 04:01:47 +00:00
55e37c0fa0 alignment_traits.hpp:
- Slight modification to Fernando Cacciola's fix to type_with_alignment, for
    the Borland C++ compiler.


[SVN r13417]
2002-04-10 03:50:08 +00:00
6c02c10d7e Disabled warning 4121 (alignment sensitive to packing) on MSVC.
[SVN r13365]
2002-04-04 13:21:55 +00:00
47f23f8b4f type_with_alignment<> class template, docs and testcases
[SVN r13360]
2002-04-03 15:50:34 +00:00
cd1556d599 Removed test of questionable legality.
[SVN r13358]
2002-04-03 11:06:01 +00:00
4bf4852012 Changed behaviour of add_pointer tests to match revised add_pointer semantics.
[SVN r13245]
2002-03-22 11:28:45 +00:00
989d554adc Added fixes so that at least some of the tests can be run under Borland
[SVN r13244]
2002-03-22 11:27:44 +00:00
5ff78759b4 Updated add_pointer docs.
[SVN r13243]
2002-03-22 11:26:31 +00:00
0b4cea1a65 Added needed include for standalone usage
[SVN r13242]
2002-03-22 11:25:32 +00:00
be17f6c2a9 Changed behaviour of add_pointer with arrays.
[SVN r13241]
2002-03-22 11:25:01 +00:00
d8fbf9e9de Tidied up Borland implementation
[SVN r13240]
2002-03-22 11:24:28 +00:00
f1ae54e40a Fixed __int64 detection
[SVN r13224]
2002-03-19 11:30:35 +00:00
2f0e29b4bc Added is_member_function_pointer location.
[SVN r13214]
2002-03-17 12:21:56 +00:00
318bcae72e warning suppression for vc7
[SVN r13209]
2002-03-15 14:15:28 +00:00
9994e68bc8 Many fixes for MSVC6, esp. with ABCs
[SVN r13188]
2002-03-14 02:20:40 +00:00
bd42bfe736 Considerably simplified is_array for MSVC
is_array now works with ABCs!


[SVN r13187]
2002-03-13 22:29:48 +00:00
4f7c036ba9 Considerably simplified is_reference for MSVC
is_reference and is_enum now works with ABCs!


[SVN r13186]
2002-03-13 22:16:06 +00:00
4fe73d6f02 Added add_cv definition
[SVN r13121]
2002-03-07 12:06:44 +00:00
79417d9a29 Updated docs to include add_cv.
[SVN r13120]
2002-03-07 12:05:42 +00:00
ab1421b4da update expected failures for Solaris and EDG compilers
[SVN r13100]
2002-03-05 20:41:16 +00:00
5e8187b321 Improved gcc version check
[SVN r13074]
2002-03-04 12:41:05 +00:00
3ff3c46800 Improved gcc version detection
[SVN r13073]
2002-03-04 12:39:14 +00:00
dfcd99c89a Fixed gcc version detection
[SVN r13072]
2002-03-04 12:37:33 +00:00
1c8cc4d22f add missing semicolon
[SVN r13052]
2002-03-03 21:34:04 +00:00
b50cc8e4f6 add missing semicolon in last checkin
[SVN r13051]
2002-03-03 21:32:10 +00:00
5b0657508c Added comments about usage of cr_type typedef.
[SVN r12992]
2002-03-01 12:25:11 +00:00
1eccbcddba Updated expected failures
[SVN r12972]
2002-02-28 00:25:32 +00:00
3bb2f6a885 Suppress __ICL 5 warnings
[SVN r12969]
2002-02-28 00:23:09 +00:00
ecaab696b7 Suppress nasty GCC warnings
[SVN r12968]
2002-02-28 00:22:31 +00:00
1f0a9440b0 Fixed test count failures for gcc 3.1,
Fixed pathname in Jamfile.


[SVN r12953]
2002-02-27 12:40:52 +00:00
1307a897df updated expected failures for MWERKS
[SVN r12920]
2002-02-24 02:48:54 +00:00
3294d07126 Added an explicit cast to suppress warnings
[SVN r12919]
2002-02-24 02:38:45 +00:00
bddf43c4c1 Added a few more specializations to suppress GCC warnings
[SVN r12918]
2002-02-24 02:37:36 +00:00
f132cbf95c eliminate types with implicit conversion to pointers for is_array
[SVN r12914]
2002-02-23 20:52:30 +00:00
0da8ae4f17 Added tests to eliminate types with implicit conversion to pointers for is_array
[SVN r12913]
2002-02-23 20:49:05 +00:00
862508b9aa oops, bug fix
[SVN r12890]
2002-02-22 05:29:56 +00:00
9ef3324c86 No MSVC failures anymore!
[SVN r12889]
2002-02-22 03:01:19 +00:00
7191a5eaea ----------------------------------------------------------------------
Fixed is_POD for array types on compilers without partial
specialization. Caused tests to fail when the number of failures
doesn't exactly meet expectations.

Modified Files:
	boost/type_traits/object_traits.hpp
	boost/type_traits/type_traits_test.hpp
	libs/type_traits/tests/object_type_traits_test.cpp
----------------------------------------------------------------------


[SVN r12887]
2002-02-22 01:04:45 +00:00
d419537e15 Added incomplete_type test case.
[SVN r12801]
2002-02-14 12:55:35 +00:00
57f8b8fe9c Need to include <cstring> to get memset
[SVN r12774]
2002-02-09 16:35:34 +00:00
1afdc58d44 Always say "private noncopyable" to avoid warnings.
[SVN r12762]
2002-02-08 20:08:15 +00:00
c3b4b469a5 Added missing header include.
[SVN r12755]
2002-02-08 12:40:57 +00:00
90fc4f311f Allow indirect reference/pointer returns
[SVN r12659]
2002-02-03 03:05:39 +00:00
26fcfa4616 Fixed is_reference<T const volatile>::value for compilers without partial specialization.
[SVN r12654]
2002-02-02 23:23:42 +00:00
bc5c28bd3c New smart pointer documentation. Related clean-up of the smart pointer
library. Changing includes to include the new individual smart pointer
headers. Replacing old smart pointer library with an include of the new
smart pointer headers. Simplify ifdefs that involve the member templates
macros now that BOOST_MSVC6_MEMBER_TEMPLATES is also guaranteed to bet
set for platforms that have full member templates.


[SVN r12647]
2002-02-02 18:36:12 +00:00
2822c3752f added empty_type_t1 default constructor to keep MSVC silent
[SVN r12646]
2002-02-02 16:22:17 +00:00
7504f83ee0 Slightly more robust test cases rule out some wrongheaded implementation ideas
[SVN r12617]
2002-02-01 04:35:47 +00:00
6ce582379a Suppress warnings with GCC
[SVN r12595]
2002-01-31 05:08:53 +00:00
1bc7d114b2 Renamed "count" to "specializations" because GCC 3.0.3 reports an ambiguity otherwise
[SVN r12594]
2002-01-31 04:00:21 +00:00
cdb8730a93 Fixed Jamfile path
[SVN r12576]
2002-01-30 12:18:16 +00:00
82c8d15179 object_traits.hpp:
- Stateless types must be empty


[SVN r12564]
2002-01-30 03:39:17 +00:00
b270745d4a index.htm:
- Document is_stateless type trait


[SVN r12563]
2002-01-30 03:38:17 +00:00
964ec6c642 object_traits.hpp:
- A type has to be a class and have a trivial default constructor to be
    stateless


[SVN r12562]
2002-01-30 03:18:45 +00:00
226abdf852 object_traits.hpp:
- Add is_stateless trait


[SVN r12558]
2002-01-30 01:58:58 +00:00
3d45932549 Fixed is_convertible to work with cv-void types.
[SVN r12367]
2002-01-20 12:22:23 +00:00
48196cee54 Fix for __MWERKS__
[SVN r12361]
2002-01-19 18:58:14 +00:00
3cff038f78 Added location information for is_base_and_derived
[SVN r12355]
2002-01-19 13:05:03 +00:00
0e0afca36d Fixed location of is_base_and_derived
[SVN r12354]
2002-01-19 13:01:51 +00:00
77c0127cc6 Fixed is_base_and_derived to work correctly with non-class types.
Moved to object_traits.hpp from conversion_traits.hpp


[SVN r12353]
2002-01-19 13:00:45 +00:00
b57557b3c3 Fixed previously broken is_base_and_derived tests,
moved them from is_convertible_test to object_type_traits_test


[SVN r12352]
2002-01-19 12:59:34 +00:00
b33bcd5f1f Stripped tabs from source
[SVN r12351]
2002-01-19 12:38:14 +00:00
249fab960e Added some missing caveats
[SVN r12267]
2002-01-10 12:45:29 +00:00
23b292cccd Updated tests
[SVN r12249]
2002-01-08 13:00:42 +00:00
c6fbfb05d2 Fixed MSVC warnings when using -Gr
Fixed Borland warnings in conversion_traits.hpp


[SVN r12247]
2002-01-08 12:59:19 +00:00
e650f59e68 Adjustments to test expected failures, after type_traits updates.
[SVN r12241]
2002-01-07 12:58:57 +00:00
bcd934c959 Added extra partial specialisations to is_member_function_pointer
to accound for cv-qualified member-functions


[SVN r12240]
2002-01-07 12:58:09 +00:00
7a8b460ce8 Added traits classes:
is_base_and_derived
	has_nothrow_construct
	has_nothrow_copy
	has_nothrow_assign


[SVN r12213]
2002-01-04 12:45:46 +00:00
0482816876 Added is_member_function_pointer
[SVN r12212]
2002-01-04 11:10:52 +00:00
cdb95f1786 Added is_member_function_pointer template
[SVN r12211]
2002-01-04 11:10:09 +00:00
57c83a61e5 Fixed eroneous comment
[SVN r12153]
2001-12-27 12:21:24 +00:00
894e2e1beb Added some explanetary comments
[SVN r12148]
2001-12-26 11:19:38 +00:00
262616a267 Updated is_function test program to a (hopefully) more portable solution.
[SVN r12141]
2001-12-22 12:13:15 +00:00
e94b5d6989 fixed comment
[SVN r12039]
2001-12-13 18:15:57 +00:00
a926ee3ba5 Added MSVC warning suppression
[SVN r12038]
2001-12-13 18:13:42 +00:00
80c838ef88 Removed erroneous comment on is_member_pointer
[SVN r11851]
2001-12-02 12:30:44 +00:00
0d1575c0b7 add definition for integral constants initialized in-class
[SVN r11723]
2001-11-18 17:32:19 +00:00
bf11510e71 Fixed example to work with VC7b2
[SVN r11625]
2001-11-07 12:37:29 +00:00
d750ec6e09 updated SunCC to 6.u2 (C++ 5.3)
[SVN r11600]
2001-11-05 21:00:03 +00:00
4fdcd2d6ea non-named parameter version of some BGL algorithms
some VC++ compiler stuff


[SVN r11576]
2001-11-04 23:24:12 +00:00
f0158e1d23 add "typename"s to last change
[SVN r11497]
2001-10-31 21:42:57 +00:00
f81e702ca9 Updated expected error counts
[SVN r11487]
2001-10-31 13:04:19 +00:00
fd25f67373 Added support for native SGI type traits via BOOST_HAS_SGI_TYPE_TRAITS
[SVN r11486]
2001-10-31 13:03:10 +00:00
caad76e496 use BOOST_HAS_LONG_LONG
[SVN r11461]
2001-10-28 21:19:05 +00:00
5ccf152ade Added a is_member_pointer test for a pointer to const member function
[SVN r11456]
2001-10-27 14:47:33 +00:00
4639e6f922 composite_traits.hpp:
- Updated is_member_pointer_helper to work for pointers to cv-qualified
          member functions when BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION

type_traits_test.hpp:
	- Test a pointer to const member function


[SVN r11455]
2001-10-27 14:46:46 +00:00
34710e5c5d Updated preprocessor logic to use BOOST_HAS_LONG_LONG
[SVN r11399]
2001-10-18 11:33:52 +00:00
a6d05d35e8 Updated test results for sunpro 5.3
[SVN r11358]
2001-10-08 11:34:10 +00:00
616ab1ec7b Misc fixes for sunpro 5.3
[SVN r11357]
2001-10-08 11:33:02 +00:00
617c71d2f7 Get rid of some unused parameters to avoid warnings.
[SVN r11213]
2001-09-22 19:36:14 +00:00
405addeb82 First round of config fixes
[SVN r11146]
2001-09-19 11:48:51 +00:00
ac2c3977a4 Fixed possible bug in is_empty for types that are not default constructible
[SVN r10965]
2001-08-30 10:55:48 +00:00
95e4b818c5 Added Jamfile, + one test case for is_empty
[SVN r10964]
2001-08-30 10:54:57 +00:00
39108ae4a4 changed member "bind" to "n_bind" to fix problem with upcoming binder library.
[SVN r10611]
2001-07-14 11:08:53 +00:00
0434be849e add (unused) template value parameter
[SVN r10483]
2001-06-29 19:36:37 +00:00
a78ae715d2 Changed function usage to try and make the code portable and standard conforming - may not rigorously test anymore though in some cases (VC6 for eg).
[SVN r10419]
2001-06-25 11:27:54 +00:00
6cd3109ff5 added bool and wchar_t fixes
[SVN r10417]
2001-06-25 11:25:20 +00:00
03dcc2f848 renamed member "check" to avoid conflict with Mac macro of same name.
[SVN r10352]
2001-06-16 11:56:14 +00:00
3f168fe158 Added gcc fix for is_convertible code (code was ill formed when the argment was a function reference)
[SVN r10305]
2001-06-10 11:07:18 +00:00
2925d47a36 Fix for Sun 5.1 compiler
[SVN r10088]
2001-05-11 10:48:29 +00:00
a31664dd61 removed spurious semicolon
[SVN r10066]
2001-05-08 11:37:04 +00:00
efeefc22b0 Sun 5.1 fix
[SVN r10065]
2001-05-08 11:36:19 +00:00
a7d0712cb2 Fixes for Sun C++ 5.1
[SVN r10060]
2001-05-08 11:16:35 +00:00
08be220827 Fixes for VC6 + compressed_pair
[SVN r10059]
2001-05-08 11:13:28 +00:00
230bd5762f add trivial HP aCC compiler workaround
[SVN r10049]
2001-05-07 21:18:24 +00:00
0bb9f97e12 Removed use of member templates for MWCW 5.x compatiblilty
[SVN r10010]
2001-05-05 10:59:06 +00:00
ea3db514e1 Fixed preprocessor logic to cope with compilers that have no member template support
[SVN r10007]
2001-05-03 11:05:08 +00:00
9c6b64b295 Rewritten compressed_pair regression script to test everything in a more methodical way
[SVN r10000]
2001-05-01 11:17:02 +00:00
4b95679ab5 added support for boost test runtime environment
[SVN r9996]
2001-04-30 11:30:46 +00:00
20c5f86692 updated url's
[SVN r9993]
2001-04-30 11:28:03 +00:00
8b214b7ef7 modified to use boost test runtime environment
[SVN r9992]
2001-04-30 11:27:10 +00:00
0baf80a003 Fix broken hyperlinks
[SVN r9980]
2001-04-25 13:22:53 +00:00
797875a3aa Change all eGroups references to YahooGroups
[SVN r9979]
2001-04-25 00:24:50 +00:00
6d1a6ccb6c Fixed copyright in conversion_traits.hpp, updated acknowledgements in docs
[SVN r9859]
2001-04-22 11:29:28 +00:00
596e7a94f1 Updated copyright declarations
[SVN r9842]
2001-04-21 12:05:19 +00:00
c63ac58736 added integral constant expression links, added tentative fix to is_function_test for older EDG based compilers
[SVN r9833]
2001-04-18 11:28:53 +00:00
9d392f1cdd Sunpro fixes (can't cope with NESTED_TEST)
[SVN r9720]
2001-04-05 11:35:31 +00:00
00cac66d90 added newline at end of files to prevent warnings from compilers
[SVN r9695]
2001-04-03 04:29:29 +00:00
38cef1f983 Added boost-wide <limits> woraround
[SVN r9688]
2001-04-01 11:59:18 +00:00
41daf6eb63 Fixed problems with type conversions, and removed some illegal ;'s
[SVN r9685]
2001-03-30 11:57:05 +00:00
27cffefbd7 Fixed expected errors with gcc
[SVN r9684]
2001-03-30 11:55:23 +00:00
111d40e909 added add_const/add_volatile/is_function
Fixed is_const/is_volatile to work with reference types
Fixed is_object to work with function types.
Fixed is_enum/is_empty to work with incomplete/abstract/function types


[SVN r9640]
2001-03-25 10:34:35 +00:00
04d2519bdd Modified to include new sub-header <boost/type_traits/function_traits.hpp>
[SVN r9639]
2001-03-25 10:32:25 +00:00
23e280ffe4 Type_traits: Added add_const/add_volatile/is_fucntion tests.
Updated docs for new templates.
              Updated test programs to test abstract base classes.


[SVN r9638]
2001-03-25 10:31:16 +00:00
546727c5f3 1.21.0 run up including fixing broken links
[SVN r9523]
2001-03-09 14:36:41 +00:00
c3ba753ca1 Tentative fixes for SunPro compiler
[SVN r9520]
2001-03-09 12:34:52 +00:00
92fe7669e4 MWCW fixes for type_traits test programs
[SVN r9441]
2001-03-05 12:03:55 +00:00
67cce8ee47 Type fixes, added missing remove_cv docs
[SVN r9440]
2001-03-05 11:46:22 +00:00
fc45bf3964 type_traits: more tentative EDG compiler fixes...
[SVN r9321]
2001-02-24 13:04:56 +00:00
a4007ce6ea more tentative type_traits fixes for EDG front end
[SVN r9289]
2001-02-20 12:56:26 +00:00
8c6c6fd022 More type_traits tweeks.
[SVN r9287]
2001-02-20 12:17:55 +00:00
7d0bb036ac Fixed for MSVC
[SVN r9277]
2001-02-19 16:38:14 +00:00
57fe48fade Oops!
[SVN r9276]
2001-02-19 16:28:06 +00:00
d6e0ea6f48 Added #include <climits>
[SVN r9275]
2001-02-19 16:26:51 +00:00
fabed28540 more type traits updates:
Header includes get BOOST_ prefix,
BOOST_DECL_MC dropped in favour of new BOOST_STATIC_CONSTANT (from config.hpp),
operator ! dropped in favour of boost::type_traits::ice_not template.


[SVN r9270]
2001-02-19 12:52:30 +00:00
ab2358913c use ice_not<> instead of logical not "!" to work around problems with
early EDG (for example, IRIX CC and Compaq C++)


[SVN r9255]
2001-02-18 16:16:02 +00:00
7b57ce4392 using ice_not<> instead of logical not "!" helps IRIX and Compaq C++
[SVN r9254]
2001-02-18 16:07:01 +00:00
5785944f54 Moved <cstddef> include to <boost/type_traits/fwd.hpp> as its required by all the new type traits headers..
[SVN r9252]
2001-02-18 12:24:46 +00:00
6927397756 type_traits: regression failure fixes from type traits changes...
[SVN r9249]
2001-02-18 11:43:01 +00:00
964625b851 add <cstddef> for std::size_t
[SVN r9248]
2001-02-17 22:10:12 +00:00
f3976d8060 Added new type traits files.
[SVN r9238]
2001-02-17 12:25:45 +00:00
6fda1821b2 added acknowledgement to Andrei for conversion
[SVN r9211]
2001-02-15 15:20:20 +00:00
cb93c87f4f added acknowledgement to Andrei for the conversion class
[SVN r9210]
2001-02-15 15:18:38 +00:00
67224e443c All final 1.20.2 changes, including fixing broken hyperlinks
[SVN r9071]
2001-02-10 14:42:14 +00:00
b6dcd7ac0c fixed bizarre g++ 2.95.2 bug in is_convertible, discovered while
trying to compile counting_iterator_test.cpp. Removed the empty
body of the constructor for accept_any


[SVN r8932]
2001-02-04 22:02:55 +00:00
c98df29cea type_traits #2 updates - almost release version now
[SVN r8889]
2001-02-03 12:01:06 +00:00
fd7d4efb22 second attempt at a fix for the is_convertible g++ warning
[SVN r8836]
2001-01-31 20:05:03 +00:00
8ae858cc79 rolled back g++ fix, since it didn't work
[SVN r8832]
2001-01-31 18:28:51 +00:00
ed10188083 fixed expected compiler failures
[SVN r8825]
2001-01-31 11:35:01 +00:00
a9d7c53394 Some fixes to is_convertible to get rid of the g++ warning.
This included:
  - changes to is_convertible under g++ #ifdef
  - added parenthesis around body of BOOST_IS_CLASS macro
  - a specialization of is_array for const arrays


[SVN r8822]
2001-01-31 02:15:10 +00:00
de81a21597 type_traits: updated type-transformations
[SVN r8777]
2001-01-27 11:31:58 +00:00
11f69e0ec0 Fixes for void specialisations
[SVN r8751]
2001-01-24 12:16:16 +00:00
905a17a1c1 type_traits: updated with checks that cv-void specialisations are working correctly
[SVN r8727]
2001-01-23 11:44:44 +00:00
f6c5afb5b6 Fixed tests for long long to detect its presence on GCC
[SVN r8701]
2001-01-22 03:48:35 +00:00
a394b44150 Fixed is_same<T,U> so it would work with T == void or U == void
Suppressed some warnings in from_not_void_conversion<> for MSVC
Fixed a spelling error


[SVN r8665]
2001-01-21 05:23:36 +00:00
bb21fc7f1d minor fixes for expected errors
[SVN r8654]
2001-01-20 12:28:08 +00:00
44e7ba3801 test results for Linux
[SVN r8529]
2001-01-07 22:26:09 +00:00
819 changed files with 86027 additions and 6812 deletions

57
.circleci/config.yml Normal file
View File

@ -0,0 +1,57 @@
version: 2
jobs:
build:
environment:
- BOOST_LIBRARY=type_traits
- CXX_STANDARD=gnu++11
docker:
- image: gcc:7
steps:
- checkout
- run:
name: Setting up Environment
command: |
echo 'export BOOST="$HOME/boost-local"' >> $BASH_ENV
if [ $CIRCLE_BRANCH = "master" ]; then
echo 'export BOOST_BRANCH="master"' >> $BASH_ENV;
else
echo 'export BOOST_BRANCH="develop"' >> $BASH_ENV;
fi
echo 'export BOOST_REMOVE="$BOOST/boost/libs/$BOOST_LIBRARY"' >> $BASH_ENV
HOME_SED_=$(echo $HOME | sed -e 's/\//\\\//g')
echo 'export HOME_SED=$HOME_SED_' >> $BASH_ENV
- run:
name: install pre dependencies
command: |
apt-get update -yqq
apt-get install git xsltproc docbook-xsl docbook-xml -y
- run:
name: Initializing git repo for boost
command: |
echo BOOST=$BOOST BOOST_REMOVE=$BOOST_REMOVE BOOST_LIBRARY=$BOOST_LIBRARY BOOST_BRANCH=$BOOST_BRANCH PWD=$PWD
mkdir $BOOST
cd $BOOST
git clone --single-branch --branch $BOOST_BRANCH https://github.com/boostorg/boost.git
cd boost
git submodule update --init --merge
rm -rf $BOOST_REMOVE
mv $HOME/project $BOOST_REMOVE
- run:
name: Bootstrapping boost-build
command: |
cd $BOOST/boost && ./bootstrap.sh && ./b2 headers
echo "using xsltproc ;" | tee $HOME/user-config.jam
echo "using boostbook : /usr/share/xml/docbook/stylesheet/docbook-xsl : /usr/share/sgml/docbook/dtd/xml/4.2 ;" | tee -a $HOME/user-config.jam
- run:
name: Building inspect
command: |
cd $BOOST/boost/tools/inspect/build && ../../../b2 -j2 address-model=64 architecture=x86 toolset=gcc cxxflags="-std=gnu++14" release dist-bin
- run:
name: Building docs
command: |
cd $BOOST_REMOVE/doc && rm -rf html && ../../../b2 -j2 address-model=64 architecture=x86 toolset=gcc cxxflags="-std=gnu++14" release
- run:
name: Running Inspect
command: |
cd $BOOST_REMOVE && ../../dist/bin/inspect -text

54
.drone.star Normal file
View File

@ -0,0 +1,54 @@
# Use, modification, and distribution are
# subject to the Boost Software License, Version 1.0. (See accompanying
# file LICENSE.txt)
#
# Copyright Rene Rivera 2020.
# For Drone CI we use the Starlark scripting language to reduce duplication.
# As the yaml syntax for Drone CI is rather limited.
#
#
globalenv={}
linuxglobalimage="cppalliance/droneubuntu1604:1"
windowsglobalimage="cppalliance/dronevs2019"
def main(ctx):
return [
linux_cxx("TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98,0x Job 1", "g++", packages="g++-4.4", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.4', 'CXXSTD': '98,0x'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x Job 2", "g++", packages="g++-4.6", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.6', 'CXXSTD': '03,0x'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11 Job 3", "g++-4.7", packages="g++-4.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.7', 'CXXSTD': '03,11'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11 Job 4", "g++-4.8", packages="g++-4.8", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.8', 'CXXSTD': '03,11'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11 Job 5", "g++-4.9", packages="g++-4.9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.9', 'CXXSTD': '03,11'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z Job 6", "g++-5", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '03,11,14,1z'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z Job 7", "g++-5", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '03,11,14,1z', 'CXXSTD_DIALECT': 'cxxstd-dialect=gnu'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z Job 8", "g++-6", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '03,11,14,1z'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z Job 9", "g++-6", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '03,11,14,1z', 'CXXSTD_DIALECT': 'cxxstd-dialect=gnu'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17 Job 10", "g++-7", packages="g++-7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '03,11,14,17'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17 Job 11", "g++-8", packages="g++-8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': '03,11,14,17'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-9 CXXSTD=03,11,14,17 Job 12", "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '03,11,14,17,2a'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc COMPILER=g++-10 CXXSTD=03,11,14,17,20 Job 13", "g++-10", packages="g++-10", image="cppalliance/droneubuntu2004:1", buildtype="boost", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': '03,11,14,17,20'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03, Job 15", "clang++", packages="clang-3.5", llvm_os="precise", llvm_ver="3.5", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.5', 'CXXSTD': '03,11,14,1z'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03, Job 16", "clang++", packages="clang-3.6", llvm_os="precise", llvm_ver="3.6", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.6', 'CXXSTD': '03,11,14,1z'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03, Job 17", "clang++", packages="clang-3.7", llvm_os="precise", llvm_ver="3.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.7', 'CXXSTD': '03,11,14,1z'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03, Job 18", "clang++-3.8", packages="clang-3.8", llvm_os="precise", llvm_ver="3.8", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.8', 'CXXSTD': '03,11,14,1z'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03, Job 19", "clang++-3.9", packages="clang-3.9", llvm_os="precise", llvm_ver="3.9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.9', 'CXXSTD': '03,11,14,1z'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03, Job 20", "clang++-4.0", packages="clang-4.0", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-4.0', 'CXXSTD': '03,11,14,1z'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03, Job 21", "clang++-5.0", packages="clang-5.0", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-5.0', 'CXXSTD': '03,11,14,1z'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-5.0 -stdlib=libc++ CXXSTD=03,11,14 Job 22", "clang++-5.0 -stdlib=libc++", packages="libc++-dev clang-5.0", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", image=linuxglobalimage, environment={'COMPILER': 'clang++-5.0 -stdlib=libc++', 'TOOLSET': 'clang', 'CXXSTD': '03,11,14'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,1z, Job 23", "clang++-6.0", packages="clang-6.0", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-6.0', 'CXXSTD': '03,11,14,1z'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-6.0 -stdlib=libc++ CXXSTD=03,11,14 Job 24", "clang++-6.0 -stdlib=libc++", packages="clang-6.0 libc++-dev", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", image=linuxglobalimage, environment={'COMPILER': 'clang++-6.0 -stdlib=libc++', 'TOOLSET': 'clang', 'CXXSTD': '03,11,14'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11,14,1z Job 25", "clang++-7", packages="clang-7", llvm_os="xenial", llvm_ver="7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': '03,11,14,1z'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-8 CXXSTD=03,11,14,17 2a Job 26", "clang++-8", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '03,11,14,17,2a'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-9 CXXSTD=03,11,14,17,2a Job 27", "clang++-9", packages="clang-9", llvm_os="xenial", llvm_ver="9", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-9', 'CXXSTD': '03,11,14,17,2a'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang COMPILER=clang++-10 CXXSTD=03,11,14,17,20 Job 28", "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '03,11,14,17,20'}, globalenv=globalenv),
osx_cxx("XCode-11.7 CXXSTD=03,11,14,17,2a Job 29", "clang++", packages="", buildtype="boost", xcode_version="11.7", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,17,2a', 'DRONE_JOB_OS_NAME': 'osx'}, globalenv=globalenv),
osx_cxx("XCode-10.2 CXXSTD=03,11,14,17,2a Job 30", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,17,2a', 'DRONE_JOB_OS_NAME': 'osx'}, globalenv=globalenv),
osx_cxx("XCode-9.4 CXXSTD=03,11,14,1z Job 31", "clang++", packages="", buildtype="boost", xcode_version="9.4", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_OS_NAME': 'osx'}, globalenv=globalenv),
osx_cxx("XCode-9.0 CXXSTD=03,11,14,1z Job 32", "clang++", packages="", buildtype="boost", xcode_version="9", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_OS_NAME': 'osx'}, globalenv=globalenv),
osx_cxx("XCode-8.3 CXXSTD=03,11,14,1z Job 33", "clang++", packages="", buildtype="boost", xcode_version="8.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_OS_NAME': 'osx'}, globalenv=globalenv),
osx_cxx("XCode-8.0 CXXSTD=03,11,14,1z Job 34", "clang++", packages="", buildtype="boost", xcode_version="8", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_OS_NAME': 'osx'}, globalenv=globalenv),
osx_cxx("XCode-7.3 CXXSTD=03,11,14,1z Job 35", "clang++", packages="", buildtype="boost", xcode_version="7.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_OS_NAME': 'osx'}, globalenv=globalenv),
]
# from https://github.com/boostorg/boost-ci
load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx")

3
.drone/after-success.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash

3
.drone/before-install.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash

3
.drone/before-script.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash

56
.drone/boost.sh Executable file
View File

@ -0,0 +1,56 @@
#!/bin/bash
set -ex
export TRAVIS_BUILD_DIR=$(pwd)
export DRONE_BUILD_DIR=$(pwd)
export TRAVIS_BRANCH=$DRONE_BRANCH
export VCS_COMMIT_ID=$DRONE_COMMIT
export GIT_COMMIT=$DRONE_COMMIT
export REPO_NAME=$DRONE_REPO
export PATH=~/.local/bin:/usr/local/bin:$PATH
echo '==================================> BEFORE_INSTALL'
. .drone/before-install.sh
echo '==================================> INSTALL'
cd ..
git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
git submodule update --init tools/build
git submodule update --init tools/boost_install
git submodule update --init libs/headers
git submodule update --init libs/config
git submodule update --init libs/assert
git submodule update --init libs/bind
git submodule update --init libs/core
git submodule update --init libs/detail
git submodule update --init libs/function
git submodule update --init libs/integer
git submodule update --init libs/move
git submodule update --init libs/mpl
git submodule update --init libs/preprocessor
git submodule update --init libs/static_assert
git submodule update --init libs/throw_exception
git submodule update --init libs/type_index
git submodule update --init libs/utility
cp -r $TRAVIS_BUILD_DIR/* libs/type_traits
./bootstrap.sh
./b2 headers
echo '==================================> BEFORE_SCRIPT'
. $DRONE_BUILD_DIR/.drone/before-script.sh
echo '==================================> SCRIPT'
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
IFS=','
for CXXLOCAL in $CXXSTD; do (cd libs/config/test && ../../../b2 config_info_travis_install toolset=$TOOLSET cxxstd=$CXXLOCAL $CXXSTD_DIALECT && echo With Standard Version $CXXLOCAL && ./config_info_travis && rm ./config_info_travis) done
unset IFS
./b2 libs/type_traits/test toolset=$TOOLSET cxxstd=$CXXSTD $CXXSTD_DIALECT
echo '==================================> AFTER_SUCCESS'
. $DRONE_BUILD_DIR/.drone/after-success.sh

482
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,482 @@
# Copyright 2020 Evan Miller
# Copyright 2020 Matt Borland
# Copyright 2021 John Maddock
# 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)
name: CI
on:
push:
branches:
- master
- develop
pull_request:
release:
types: [published, created, edited]
jobs:
ubuntu-focal:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
compiler: [ g++-9, g++-10, clang++-9, clang++-10 ]
standard: [ c++03, c++11, c++14, c++17, c++2a, gnu++03, gnu++11, gnu++14, gnu++17, gnu++2a ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
commit-filter-separator: ';'
fail-fast: true
- name: Set TOOLSET
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
- name: Add repository
continue-on-error: true
id: addrepo
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Retry Add Repo
continue-on-error: true
id: retry1
if: steps.addrepo.outcome=='failure'
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Retry Add Repo 2
continue-on-error: true
id: retry2
if: steps.retry1.outcome=='failure'
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install g++-9 g++-10 clang-9 clang-10 libgmp-dev libmpfr-dev libfftw3-dev
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: cp -r $GITHUB_WORKSPACE/* libs/type_traits
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py type_traits
working-directory: ../boost-root
- name: Bootstrap
run: ./bootstrap.sh
working-directory: ../boost-root
- name: Generate headers
run: ./b2 headers
working-directory: ../boost-root
- name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} : <cxxflags>-std=${{ matrix.standard }} ;" > ~/user-config.jam'
working-directory: ../boost-root
- name: Config info install
run: ../../../b2 config_info_travis_install toolset=$TOOLSET
working-directory: ../boost-root/libs/config/test
- name: Config info
run: ./config_info_travis
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET
working-directory: ../boost-root/libs/type_traits/test
ubuntu-bionic:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
compiler: [ g++-7, g++-8, clang++-7, clang++-8 ]
standard: [ c++03, c++11, c++14, c++17, gnu++03, gnu++11, gnu++14, gnu++17 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
commit-filter-separator: ';'
fail-fast: true
- name: Set TOOLSET
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
- name: Add repository
continue-on-error: true
id: addrepo
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Retry Add Repo
continue-on-error: true
id: retry1
if: steps.addrepo.outcome=='failure'
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Retry Add Repo 2
continue-on-error: true
id: retry2
if: steps.retry1.outcome=='failure'
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install g++-7 g++-8 clang-7 clang-8 libgmp-dev libmpfr-dev libfftw3-dev
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: cp -r $GITHUB_WORKSPACE/* libs/type_traits
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py type_traits
working-directory: ../boost-root
- name: Bootstrap
run: ./bootstrap.sh
working-directory: ../boost-root
- name: Generate headers
run: ./b2 headers
working-directory: ../boost-root
- name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} : <cxxflags>-std=${{ matrix.standard }} ;" > ~/user-config.jam'
working-directory: ../boost-root
- name: Config info install
run: ../../../b2 config_info_travis_install toolset=$TOOLSET
working-directory: ../boost-root/libs/config/test
- name: Config info
run: ./config_info_travis
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET
working-directory: ../boost-root/libs/type_traits/test
macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
toolset: [ clang ]
standard: [ "03", 11, 14, 17, 2a ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[linux];[Linux];[LINUX]'
commit-filter-separator: ';'
fail-fast: true
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: cp -r $GITHUB_WORKSPACE/* libs/type_traits
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py type_traits
working-directory: ../boost-root
- name: Bootstrap
run: ./bootstrap.sh
working-directory: ../boost-root
- name: Generate headers
run: ./b2 headers
working-directory: ../boost-root
- name: Config info install
run: ../../../b2 config_info_travis_install toolset=${{ matrix.toolset }} cxxstd=${{ matrix.standard }}
working-directory: ../boost-root/libs/config/test
- name: Config info
run: ./config_info_travis
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=${{ matrix.toolset }} cxxstd=${{ matrix.standard }}
working-directory: ../boost-root/libs/type_traits/test
windows_gcc:
runs-on: windows-latest
defaults:
run:
shell: cmd
env:
ARGS: toolset=${{ matrix.toolset }} address-model=64 cxxstd=${{ matrix.standard }}
strategy:
fail-fast: false
matrix:
standard: [ 11, 14, 17 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[apple];[Apple];[APPLE];[linux];[Linux];[LINUX]'
commit-filter-separator: ';'
fail-fast: true
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\type_traits
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py type_traits
working-directory: ../boost-root
- name: Bootstrap
run: bootstrap
working-directory: ../boost-root
- name: Generate headers
run: b2 headers
working-directory: ../boost-root
- name: Config info install
run: ..\..\..\b2 config_info_travis_install cxxstd=${{ matrix.standard }} toolset=gcc
working-directory: ../boost-root/libs/config/test
- name: Config info
run: config_info_travis
working-directory: ../boost-root/libs/config/test
- name: Test
run: ..\..\..\b2 --hash cxxstd=${{ matrix.standard }} toolset=gcc
working-directory: ../boost-root/libs/type_traits/test
windows_msvc_14_0:
runs-on: windows-2019
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
standard: [ 14, 17 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[apple];[Apple];[APPLE];[linux];[Linux];[LINUX]'
commit-filter-separator: ';'
fail-fast: true
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\type_traits
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py type_traits
working-directory: ../boost-root
- name: Bootstrap
run: bootstrap
working-directory: ../boost-root
- name: Generate headers
run: b2 headers
working-directory: ../boost-root
- name: Config info install
run: ..\..\..\b2 config_info_travis_install cxxstd=${{ matrix.standard }} toolset=msvc-14.0
working-directory: ../boost-root/libs/config/test
- name: Config info
run: config_info_travis
working-directory: ../boost-root/libs/config/test
- name: Test
run: ..\..\..\b2 --hash cxxstd=${{ matrix.standard }} toolset=msvc-14.0 define=CI_SUPPRESS_KNOWN_ISSUES
working-directory: ../boost-root/libs/type_traits/test
windows_msvc_14_2:
runs-on: windows-2019
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
standard: [ 14, 17, latest ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[apple];[Apple];[APPLE];[linux];[Linux];[LINUX]'
commit-filter-separator: ';'
fail-fast: true
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\type_traits
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py type_traits
working-directory: ../boost-root
- name: Bootstrap
run: bootstrap
working-directory: ../boost-root
- name: Generate headers
run: b2 headers
working-directory: ../boost-root
- name: Config info install
run: ..\..\..\b2 config_info_travis_install cxxstd=${{ matrix.standard }} toolset=msvc-14.2
working-directory: ../boost-root/libs/config/test
- name: Config info
run: config_info_travis
working-directory: ../boost-root/libs/config/test
- name: Test
run: ..\..\..\b2 --hash cxxstd=${{ matrix.standard }} toolset=msvc-14.2 define=CI_SUPPRESS_KNOWN_ISSUES
working-directory: ../boost-root/libs/type_traits/test
windows_msvc_14_3:
runs-on: windows-2022
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
standard: [ 14, 17, latest ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[apple];[Apple];[APPLE];[linux];[Linux];[LINUX]'
commit-filter-separator: ';'
fail-fast: true
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\type_traits
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py type_traits
working-directory: ../boost-root
- name: Bootstrap
run: bootstrap
working-directory: ../boost-root
- name: Generate headers
run: b2 headers
working-directory: ../boost-root
- name: Config info install
run: ..\..\..\b2 config_info_travis_install cxxstd=${{ matrix.standard }} toolset=msvc-14.3
working-directory: ../boost-root/libs/config/test
- name: Config info
run: config_info_travis
working-directory: ../boost-root/libs/config/test
- name: Test
run: ..\..\..\b2 --hash cxxstd=${{ matrix.standard }} toolset=msvc-14.3 define=CI_SUPPRESS_KNOWN_ISSUES
working-directory: ../boost-root/libs/type_traits/test
windows_msvc_14_2_clr:
runs-on: windows-2019
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
standard: [ 14, 17 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[apple];[Apple];[APPLE];[linux];[Linux];[LINUX]'
commit-filter-separator: ';'
fail-fast: true
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\type_traits
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py type_traits
working-directory: ../boost-root
- name: Bootstrap
run: bootstrap
working-directory: ../boost-root
- name: Generate headers
run: b2 headers
working-directory: ../boost-root
- name: Config info install
run: ..\..\..\b2 config_info_travis_install cxxstd=${{ matrix.standard }} toolset=msvc-14.2 cxxflags=-clr asynch-exceptions=on
working-directory: ../boost-root/libs/config/test
- name: Config info
run: config_info_travis
working-directory: ../boost-root/libs/config/test
- name: Test
run: ..\..\..\b2 --hash cxxstd=${{ matrix.standard }} toolset=msvc-14.2 define=CI_SUPPRESS_KNOWN_ISSUES cxxflags=-clr asynch-exceptions=on
working-directory: ../boost-root/libs/type_traits/test
ubuntu-cuda:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
standard: [ 11, 14, 17 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: Jimver/cuda-toolkit@v0.2.4
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
commit-filter-separator: ';'
fail-fast: true
- name: Add repository
continue-on-error: true
id: addrepo
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Retry Add Repo
continue-on-error: true
id: retry1
if: steps.addrepo.outcome=='failure'
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Retry Add Repo 2
continue-on-error: true
id: retry2
if: steps.retry1.outcome=='failure'
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install clang-10
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: cp -r $GITHUB_WORKSPACE/* libs/type_traits
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py type_traits
working-directory: ../boost-root
- name: Bootstrap
run: ./bootstrap.sh
working-directory: ../boost-root
- name: Generate headers
run: ./b2 headers
working-directory: ../boost-root
- name: nvcc version
run: nvcc --version
working-directory: ../boost-root/libs/config/test
- name: Testing nvcc
run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cpp" && nvcc -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cpp || break -1; done
working-directory: ../boost-root/libs/type_traits/test
- name: Testing nvcc+clang
run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cpp" && nvcc --compiler-bindir=clang++ -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cpp || break -1; done
working-directory: ../boost-root/libs/type_traits/test
- name: Create .cu files
run: for file in $(cat cuda/cuda_tests.txt); do cp $file.cpp $file.cu; done
working-directory: ../boost-root/libs/type_traits/test
- name: Testing nvcc on .cu files
run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cu" && nvcc -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cu || break -1; done
working-directory: ../boost-root/libs/type_traits/test
- name: Testing nvcc+clang on .cu files
run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cu" && nvcc --compiler-bindir=clang++ -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cu || break -1; done
working-directory: ../boost-root/libs/type_traits/test
- name: Testing clang on .cu files
run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cu" && clang++ -nocudalib --no-cuda-version-check --cuda-gpu-arch=sm_75 -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cu || break -1; done
working-directory: ../boost-root/libs/type_traits/test
- name: Testing nvcc on .cu files
run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cu" && nvcc -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_CUDA_DEVICE $file.cu || break -1; done
working-directory: ../boost-root/libs/type_traits/test
- name: Testing clang on .cu files
run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cu" && clang++ -nocudalib --no-cuda-version-check --cuda-gpu-arch=sm_75 -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_CUDA_DEVICE $file.cu || break -1; done
working-directory: ../boost-root/libs/type_traits/test

38
CMakeLists.txt Normal file
View File

@ -0,0 +1,38 @@
# Copyright 2018 Mike Dev
# Copyright 2019 Peter Dimov
# 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
if(NOT DEFINED IDF_TARGET)
# We support CMake 3.5, but prefer 3.16 policies and behavior
cmake_minimum_required(VERSION 3.5...3.16)
project(boost_type_traits VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
add_library(boost_type_traits INTERFACE)
add_library(Boost::type_traits ALIAS boost_type_traits)
target_include_directories(boost_type_traits INTERFACE include)
target_link_libraries(boost_type_traits
INTERFACE
Boost::config
Boost::static_assert
)
else()
FILE(GLOB_RECURSE headers include/*.h include/*.hpp)
idf_component_register(
SRCS
${headers}
INCLUDE_DIRS
include
REQUIRES
boost_config
boost_static_assert
)
endif()

47
README.md Normal file
View File

@ -0,0 +1,47 @@
Boost TypeTraits Library
============================
The Boost type-traits library contains a set of very specific traits classes, each of which encapsulate a single trait
from the C++ type system; for example, is a type a pointer or a reference type? Or does a type have a trivial constructor, or a const-qualifier?
The type-traits classes share a unified design: each class inherits from the type true_type if the type has the specified property and inherits from false_type otherwise.
The type-traits library also contains a set of classes that perform a specific transformation on a type; for example, they can remove a top-level const or
volatile qualifier from a type. Each class that performs a transformation defines a single typedef-member type that is the result of the transformation.
The full documentation is available on [boost.org](http://www.boost.org/doc/libs/release/libs/type_traits/index.html).
| | Master | Develop |
|------------------|----------|-------------|
| Travis | [![Build Status](https://travis-ci.org/boostorg/type_traits.svg?branch=master)](https://travis-ci.org/boostorg/type_traits) | [![Build Status](https://travis-ci.org/boostorg/type_traits.svg)](https://travis-ci.org/boostorg/type_traits) |
| Appveyor | [![Build status](https://ci.appveyor.com/api/projects/status/lwjqu4087qiolje8/branch/master?svg=true)](https://ci.appveyor.com/project/jzmaddock/type-traits/branch/master) | [![Build status](https://ci.appveyor.com/api/projects/status/lwjqu4087qiolje8/branch/develop?svg=true)](https://ci.appveyor.com/project/jzmaddock/type-traits/branch/develop) |
## Support, bugs and feature requests ##
Bugs and feature requests can be reported through the [Gitub issue tracker](https://github.com/boostorg/type_traits/issues)
(see [open issues](https://github.com/boostorg/type_traits/issues) and
[closed issues](https://github.com/boostorg/type_traits/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed)).
You can submit your changes through a [pull request](https://github.com/boostorg/type_traits/pulls).
There is no mailing-list specific to Boost TypeTraits, although you can use the general-purpose Boost [mailing-list](http://lists.boost.org/mailman/listinfo.cgi/boost-users) using the tag [type_traits].
## Development ##
Clone the whole boost project, which includes the individual Boost projects as submodules ([see boost+git doc](https://github.com/boostorg/boost/wiki/Getting-Started)):
git clone https://github.com/boostorg/boost
cd boost
git submodule update --init
The Boost TypeTraits Library is located in `libs/type_traits/`.
### Running tests ###
First, make sure you are in `libs/type_traits/test`.
You can either run all the tests listed in `Jamfile.v2` or run a single test:
../../../b2 <- run all tests
../../../b2 config_info <- single test

19
cxx_type_traits.htm Normal file
View File

@ -0,0 +1,19 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="refresh" content="0; URL=doc/html/boost_typetraits/background.html">
<!-- boostinspect:nounlinked -->
</head>
<body><P>
Automatic redirection failed, please go to
<a href="doc/html/boost_typetraits/background.html">doc/html/boost_typetraits/background.html.</a></P>
<P>Copyright&nbsp;John Maddock 2006</P>
<P>Distributed under the Boost Software License, Version 1.0. (See accompanying file <A href="../../LICENSE_1_0.txt">
LICENSE_1_0.txt</A> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</A>).</P>
</body>
</html>

View File

@ -1,43 +0,0 @@
// (C) Copyright John Maddock 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.
#include <boost/type_traits/alignment_traits.hpp>
#include <boost/utility.hpp>
#ifdef __BORLANDC__
#pragma hrdstop
#endif
#include "boost/type_traits/type_traits_test.hpp"
NESTED_DECL(alignment_of)
int main(int argc, char* argv[])
{
NESTED_TEST(alignment_of, int)
NESTED_TEST(alignment_of, int_constructible)
align_test(int);
align_test(char);
align_test(double);
align_test(int[4]);
align_test(int(*)(int));
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
align_test(char&);
align_test(char (&)(int));
align_test(char(&)[4]);
#endif
align_test(int*);
//align_test(const int);
align_test(VB);
align_test(VD);
return check_result(argc, argv);
}
//
// define the number of failures expected for given compilers:
unsigned int expected_failures = 0;

View File

@ -1,197 +0,0 @@
// (C) Copyright John Maddock 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.
#include <boost/type_traits/arithmetic_traits.hpp>
#include <boost/utility.hpp>
#ifdef __BORLANDC__
#pragma hrdstop
#endif
#include "boost/type_traits/type_traits_test.hpp"
NESTED_DECL(is_void)
NESTED_DECL(is_integral)
NESTED_DECL(is_float)
NESTED_DECL(is_arithmetic)
NESTED_DECL(is_fundamental)
int main(int argc, char* argv[])
{
NESTED_TEST(is_void, void)
NESTED_TEST(is_void, int)
NESTED_TEST(is_integral, int)
NESTED_TEST(is_integral, float)
NESTED_TEST(is_float, void)
NESTED_TEST(is_float, double)
NESTED_TEST(is_arithmetic, void)
NESTED_TEST(is_arithmetic, int)
NESTED_TEST(is_fundamental, UDT)
NESTED_TEST(is_fundamental, int)
value_test(true, boost::is_void<void>::value)
value_test(true, boost::is_void<const void>::value)
value_test(true, boost::is_void<volatile void>::value)
value_test(true, boost::is_void<const volatile void>::value)
value_test(false, boost::is_void<int>::value)
value_test(false, boost::is_integral<UDT>::value)
value_test(false, boost::is_integral<void>::value)
value_test(true, boost::is_integral<bool>::value)
value_test(true, boost::is_integral<char>::value)
value_test(true, boost::is_integral<signed char>::value)
value_test(true, boost::is_integral<unsigned char>::value)
value_test(true, boost::is_integral<wchar_t>::value)
value_test(true, boost::is_integral<short>::value)
value_test(true, boost::is_integral<unsigned short>::value)
value_test(true, boost::is_integral<int>::value)
value_test(true, boost::is_integral<unsigned int>::value)
value_test(true, boost::is_integral<long>::value)
value_test(true, boost::is_integral<unsigned long>::value)
value_test(false, boost::is_integral<float>::value)
value_test(false, boost::is_integral<double>::value)
value_test(false, boost::is_integral<long double>::value)
#ifdef ULLONG_MAX
value_test(true, boost::is_integral<long long>::value)
value_test(true, boost::is_integral<unsigned long long>::value)
#endif
#if defined(__BORLANDC__) || defined(_MSC_VER)
value_test(true, boost::is_integral<__int64>::value)
value_test(true, boost::is_integral<unsigned __int64>::value)
#endif
//const qualified ints:
value_test(true, boost::is_integral<const bool>::value)
value_test(true, boost::is_integral<const char>::value)
value_test(true, boost::is_integral<const signed char>::value)
value_test(true, boost::is_integral<const unsigned char>::value)
value_test(true, boost::is_integral<const wchar_t>::value)
value_test(true, boost::is_integral<const short>::value)
value_test(true, boost::is_integral<const unsigned short>::value)
value_test(true, boost::is_integral<const int>::value)
value_test(true, boost::is_integral<const unsigned int>::value)
value_test(true, boost::is_integral<const long>::value)
value_test(true, boost::is_integral<const unsigned long>::value)
#ifdef ULLONG_MAX
value_test(true, boost::is_integral<const long long>::value)
value_test(true, boost::is_integral<const unsigned long long>::value)
#endif
#if defined(__BORLANDC__) || defined(_MSC_VER)
value_test(true, boost::is_integral<const __int64>::value)
value_test(true, boost::is_integral<const unsigned __int64>::value)
#endif
// volatile qualified ints:
value_test(true, boost::is_integral<volatile bool>::value)
value_test(true, boost::is_integral<volatile char>::value)
value_test(true, boost::is_integral<volatile signed char>::value)
value_test(true, boost::is_integral<volatile unsigned char>::value)
value_test(true, boost::is_integral<volatile wchar_t>::value)
value_test(true, boost::is_integral<volatile short>::value)
value_test(true, boost::is_integral<volatile unsigned short>::value)
value_test(true, boost::is_integral<volatile int>::value)
value_test(true, boost::is_integral<volatile unsigned int>::value)
value_test(true, boost::is_integral<volatile long>::value)
value_test(true, boost::is_integral<volatile unsigned long>::value)
#ifdef ULLONG_MAX
value_test(true, boost::is_integral<volatile long long>::value)
value_test(true, boost::is_integral<volatile unsigned long long>::value)
#endif
#if defined(__BORLANDC__) || defined(_MSC_VER)
value_test(true, boost::is_integral<volatile __int64>::value)
value_test(true, boost::is_integral<volatile unsigned __int64>::value)
#endif
//const qualified ints:
value_test(true, boost::is_integral<const volatile bool>::value)
value_test(true, boost::is_integral<const volatile char>::value)
value_test(true, boost::is_integral<const volatile signed char>::value)
value_test(true, boost::is_integral<const volatile unsigned char>::value)
value_test(true, boost::is_integral<const volatile wchar_t>::value)
value_test(true, boost::is_integral<const volatile short>::value)
value_test(true, boost::is_integral<const volatile unsigned short>::value)
value_test(true, boost::is_integral<const volatile int>::value)
value_test(true, boost::is_integral<const volatile unsigned int>::value)
value_test(true, boost::is_integral<const volatile long>::value)
value_test(true, boost::is_integral<const volatile unsigned long>::value)
#ifdef ULLONG_MAX
value_test(true, boost::is_integral<const volatile long long>::value)
value_test(true, boost::is_integral<const volatile unsigned long long>::value)
#endif
#if defined(__BORLANDC__) || defined(_MSC_VER)
value_test(true, boost::is_integral<const volatile __int64>::value)
value_test(true, boost::is_integral<const volatile unsigned __int64>::value)
#endif
value_test(true, boost::is_float<const volatile float>::value)
value_test(true, boost::is_float<const volatile double>::value)
value_test(true, boost::is_float<const volatile long double>::value)
value_test(true, boost::is_float<volatile float>::value)
value_test(true, boost::is_float<volatile double>::value)
value_test(true, boost::is_float<volatile long double>::value)
value_test(true, boost::is_float<const float>::value)
value_test(true, boost::is_float<const double>::value)
value_test(true, boost::is_float<const long double>::value)
value_test(true, boost::is_float<float>::value)
value_test(true, boost::is_float<double>::value)
value_test(true, boost::is_float<long double>::value)
value_test(false, boost::is_float<int>::value)
value_test(false, boost::is_float<void>::value)
value_test(false, boost::is_float<UDT>::value)
value_test(false, boost::is_arithmetic<UDT>::value)
value_test(false, boost::is_arithmetic<void>::value)
value_test(true, boost::is_arithmetic<bool>::value)
value_test(true, boost::is_arithmetic<char>::value)
value_test(true, boost::is_arithmetic<signed char>::value)
value_test(true, boost::is_arithmetic<unsigned char>::value)
value_test(true, boost::is_arithmetic<wchar_t>::value)
value_test(true, boost::is_arithmetic<short>::value)
value_test(true, boost::is_arithmetic<unsigned short>::value)
value_test(true, boost::is_arithmetic<int>::value)
value_test(true, boost::is_arithmetic<unsigned int>::value)
value_test(true, boost::is_arithmetic<long>::value)
value_test(true, boost::is_arithmetic<unsigned long>::value)
value_test(true, boost::is_arithmetic<float>::value)
value_test(true, boost::is_arithmetic<double>::value)
value_test(true, boost::is_arithmetic<long double>::value)
#ifdef ULLONG_MAX
value_test(true, boost::is_arithmetic<long long>::value)
value_test(true, boost::is_arithmetic<unsigned long long>::value)
#endif
#if defined(__BORLANDC__) || defined(_MSC_VER)
value_test(true, boost::is_arithmetic<__int64>::value)
value_test(true, boost::is_arithmetic<unsigned __int64>::value)
#endif
value_test(false, boost::is_fundamental<UDT>::value)
value_test(true, boost::is_fundamental<void>::value)
value_test(true, boost::is_fundamental<bool>::value)
value_test(true, boost::is_fundamental<char>::value)
value_test(true, boost::is_fundamental<signed char>::value)
value_test(true, boost::is_fundamental<unsigned char>::value)
value_test(true, boost::is_fundamental<wchar_t>::value)
value_test(true, boost::is_fundamental<short>::value)
value_test(true, boost::is_fundamental<unsigned short>::value)
value_test(true, boost::is_fundamental<int>::value)
value_test(true, boost::is_fundamental<unsigned int>::value)
value_test(true, boost::is_fundamental<long>::value)
value_test(true, boost::is_fundamental<unsigned long>::value)
value_test(true, boost::is_fundamental<float>::value)
value_test(true, boost::is_fundamental<double>::value)
value_test(true, boost::is_fundamental<long double>::value)
#ifdef ULLONG_MAX
value_test(true, boost::is_fundamental<long long>::value)
value_test(true, boost::is_fundamental<unsigned long long>::value)
#endif
#if defined(__BORLANDC__) || defined(_MSC_VER)
value_test(true, boost::is_fundamental<__int64>::value)
value_test(true, boost::is_fundamental<unsigned __int64>::value)
#endif
return check_result(argc, argv);
}
//
// define the number of failures expected for given compilers:
unsigned int expected_failures = 0;

View File

@ -1,111 +0,0 @@
// (C) Copyright John Maddock 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.
#include <boost/type_traits/composite_traits.hpp>
#include <boost/utility.hpp>
#ifdef __BORLANDC__
#pragma hrdstop
#endif
#include "boost/type_traits/type_traits_test.hpp"
NESTED_DECL(is_array)
NESTED_DECL(is_pointer)
NESTED_DECL(is_reference)
int main(int argc, char* argv[])
{
NESTED_TEST(is_array, int)
NESTED_TEST(is_array, int[2])
NESTED_TEST(is_array, int[3][4])
NESTED_TEST(is_array, int const [5])
NESTED_TEST(is_array, int(&)[2])
NESTED_TEST(is_array, int (*)(double))
NESTED_TEST(is_pointer, int)
NESTED_TEST(is_pointer, int*)
NESTED_TEST(is_reference, int)
NESTED_TEST(is_reference, int&)
value_test(false, boost::is_array<int>::value)
value_test(false, boost::is_array<int*>::value)
value_test(false, boost::is_array<const int*>::value)
value_test(false, boost::is_array<const volatile int*>::value)
value_test(false, boost::is_array<int*const>::value)
value_test(false, boost::is_array<const int*volatile>::value)
value_test(false, boost::is_array<const volatile int*const>::value)
value_test(true, boost::is_array<int[2]>::value)
value_test(true, boost::is_array<const int[2]>::value)
value_test(true, boost::is_array<const volatile int[2]>::value)
value_test(true, boost::is_array<int[2][3]>::value)
value_test(true, boost::is_array<UDT[2]>::value)
value_test(false, boost::is_array<int(&)[2]>::value)
value_test(false, boost::is_array<f1>::value)
value_test(false, boost::is_pointer<int>::value)
value_test(false, boost::is_pointer<int&>::value)
value_test(true, boost::is_pointer<int*>::value)
value_test(true, boost::is_pointer<const int*>::value)
value_test(true, boost::is_pointer<volatile int*>::value)
value_test(true, boost::is_pointer<non_pointer*>::value)
// these were false in previous versions (JM 20 Dec 2000):
value_test(true, boost::is_pointer<int*const>::value)
value_test(true, boost::is_pointer<int*volatile>::value)
value_test(true, boost::is_pointer<int*const volatile>::value)
// JM 02 Oct 2000:
value_test(false, boost::is_pointer<non_pointer>::value)
value_test(false, boost::is_pointer<int*&>::value)
value_test(false, boost::is_pointer<int(&)[2]>::value)
value_test(false, boost::is_pointer<int[2]>::value)
value_test(false, boost::is_pointer<char[sizeof(void*)]>::value)
value_test(true, boost::is_pointer<f1>::value)
value_test(true, boost::is_pointer<f2>::value)
value_test(true, boost::is_pointer<f3>::value)
// Steve: was 'true', should be 'false', via 3.9.2p3
value_test(false, boost::is_pointer<mf1>::value)
value_test(false, boost::is_pointer<mf2>::value)
value_test(false, boost::is_pointer<mf3>::value)
value_test(false, boost::is_pointer<mf4>::value)
value_test(false, boost::is_reference<bool>::value)
value_test(true, boost::is_reference<int&>::value)
value_test(true, boost::is_reference<const int&>::value)
value_test(true, boost::is_reference<volatile int &>::value)
value_test(true, boost::is_reference<const volatile int &>::value)
value_test(true, boost::is_reference<r_type>::value)
value_test(true, boost::is_reference<cr_type>::value)
value_test(true, boost::is_reference<const UDT&>::value)
value_test(false, boost::is_member_pointer<f1>::value)
value_test(false, boost::is_member_pointer<f2>::value)
value_test(false, boost::is_member_pointer<f3>::value)
value_test(false, boost::is_member_pointer<void*>::value)
value_test(true, boost::is_member_pointer<mf1>::value)
value_test(true, boost::is_member_pointer<mf2>::value)
value_test(true, boost::is_member_pointer<mf3>::value)
value_test(true, boost::is_member_pointer<mf4>::value)
value_test(false, boost::is_enum<int>::value)
value_test(true, boost::is_enum<enum_UDT>::value)
value_test(false, boost::is_enum<int_convertible>::value)
value_test(false, boost::is_enum<int&>::value)
return check_result(argc, argv);
}
//
// define the number of failures expected for given compilers:
#ifdef __BORLANDC__
unsigned int expected_failures = 2;
#elif defined(__GNUC__)
unsigned int expected_failures = 1; // can't handle cv-qualified references
#elif defined(BOOST_MSVC)
unsigned int expected_failures = 1;
#else
unsigned int expected_failures = 0;
#endif

View File

@ -1,118 +0,0 @@
<html>
<head>
<title>
Compiler Status: win32
</title>
</head>
<body bgcolor="#ffffff" text="#000000">
<h1><img border border="0" src="../c++boost.gif" width="277" height="86"></h1>
<h1>Compiler Status: win32</h1>
</p>
<p><b>Run Date:</b> 01 Jan 2001 12:44 GMT</p>
<p>
<table border="1" cellspacing="0" cellpadding="5">
<tr>
<td>Program</td>
<td>Test<br>Type</td>
<td>GNU<br>GCC<br>2.95.2</td>
<td>Borland<br>BCC<br>5.5.1</td>
<td>Microsoft<br>VC++<br>6.0 SP4</td>
<td>Microsoft<br>VC++<br>6.0 SP4<br>STLport<br>4.0</td>
</tr>
<tr>
<td><a href="libs/type_traits/alignment_test.cpp">libs/type_traits/alignment_test.cpp</a></td>
<td>run</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
</tr>
<tr>
<td><a href="libs/type_traits/arithmetic_traits_test.cpp">libs/type_traits/arithmetic_traits_test.cpp</a></td>
<td>run</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
</tr>
<tr>
<td><a href="libs/type_traits/composite_traits_test.cpp">libs/type_traits/composite_traits_test.cpp</a></td>
<td>run</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
</tr>
<tr>
<td><a href="libs/type_traits/cv_traits_test.cpp">libs/type_traits/cv_traits_test.cpp</a></td>
<td>run</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
</tr>
<tr>
<td><a href="libs/type_traits/is_convertible_test.cpp">libs/type_traits/is_convertible_test.cpp</a></td>
<td>run</td>
<td>Pass</td>
<td><font color="#FF0000">Fail</font></td>
<td>Pass</td>
<td>Pass</td>
</tr>
<tr>
<td><a href="libs/type_traits/is_same_test.cpp">libs/type_traits/is_same_test.cpp</a></td>
<td>run</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
</tr>
<tr>
<td><a href="libs/type_traits/object_type_traits_test.cpp">libs/type_traits/object_type_traits_test.cpp</a></td>
<td>run</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
</tr>
<tr>
<td><a href="libs/type_traits/transform_traits_test.cpp">libs/type_traits/transform_traits_test.cpp</a></td>
<td>run</td>
<td>Pass</td>
<td>Pass</td>
<td><font color="#FF0000">Fail</font></td>
<td><font color="#FF0000">Fail</font></td>
</tr>
<tr>
<td><a href="libs/type_traits/trivial_destructor_example.cpp">libs/type_traits/trivial_destructor_example.cpp</a></td>
<td>compile</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
</tr>
<tr>
<td><a href="libs/type_traits/copy_example.cpp">libs/type_traits/copy_example.cpp</a></td>
<td>compile</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
</tr>
<tr>
<td><a href="libs/type_traits/fill_example.cpp">libs/type_traits/fill_example.cpp</a></td>
<td>compile</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
<td>Pass</td>
</tr>
<tr>
<td><a href="libs/type_traits/iter_swap_example.cpp">libs/type_traits/iter_swap_example.cpp</a></td>
<td>compile</td>
<td>Pass</td>
<td>Pass</td>
<td><font color="#FF0000">Fail</font></td>
<td><font color="#FF0000">Fail</font></td>
</tr>
</table>

View File

@ -1,50 +0,0 @@
// (C) Copyright John Maddock 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.
#include <boost/type_traits/cv_traits.hpp>
#include <boost/utility.hpp>
#ifdef __BORLANDC__
#pragma hrdstop
#endif
#include "boost/type_traits/type_traits_test.hpp"
NESTED_DECL(is_const)
NESTED_DECL(is_volatile)
int main(int argc, char* argv[])
{
NESTED_TEST(is_const, int)
NESTED_TEST(is_const, const int)
NESTED_TEST(is_const, volatile int)
NESTED_TEST(is_volatile, int)
NESTED_TEST(is_volatile, const int)
NESTED_TEST(is_volatile, volatile int)
value_test(false, boost::is_const<void>::value)
value_test(true, boost::is_const<const void>::value)
value_test(false, boost::is_const<int>::value)
value_test(true, boost::is_const<const int>::value)
value_test(true, boost::is_const<const UDT>::value)
value_test(true, boost::is_const<const volatile UDT>::value)
value_test(false, boost::is_volatile<void>::value)
value_test(true, boost::is_volatile<volatile void>::value)
value_test(false, boost::is_volatile<int>::value)
value_test(true, boost::is_volatile<volatile int>::value)
value_test(true, boost::is_volatile<volatile UDT>::value)
value_test(true, boost::is_volatile<volatile UDT>::value)
return check_result(argc, argv);
}
//
// define the number of failures expected for given compilers:
#ifdef BOOST_MSVC
unsigned int expected_failures = 2;
#else
unsigned int expected_failures = 0;
#endif

View File

@ -1,23 +0,0 @@
// (C) Copyright Boost.org 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.
// See http://www.boost.org for most recent version including documentation.
// See boost/detail/call_traits.hpp and boost/detail/ob_call_traits.hpp
// for full copyright notices.
#ifndef BOOST_CALL_TRAITS_HPP
#define BOOST_CALL_TRAITS_HPP
#ifndef BOOST_CONFIG_HPP
#include <boost/config.hpp>
#endif
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#include <boost/detail/ob_call_traits.hpp>
#else
#include <boost/detail/call_traits.hpp>
#endif
#endif // BOOST_CALL_TRAITS_HPP

View File

@ -1,427 +0,0 @@
// Boost config.hpp configuration header file ------------------------------//
// (C) Copyright Boost.org 1999. 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.
// See http://www.boost.org for most recent version.
// Boost config.hpp policy and rationale documentation has been moved to
// http://www.boost.org/libs/config
// Revision History (excluding minor changes for specific compilers)
// 31 Dec 00 BOOST_NO_CV_SPECIALIZATIONS
// BOOST_NO_CV_VOID_SPECIALIZATIONS (John Maddock)
// 17 Nov 00 BOOST_NO_AUTO_PTR (John Maddock)
// 4 Oct 00 BOOST_NO_STD_MIN_MAX (Jeremy Siek)
// 29 Sep 00 BOOST_NO_INTEGRAL_INT64_T (Jens Maurer)
// 25 Sep 00 BOOST_NO_STD_ALLOCATOR (Jeremy Siek)
// 18 SEP 00 BOOST_NO_SLIST, BOOST_NO_HASH,
// BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
// BOOST_NO_LIMITS (Jeremy Siek)
// 1 Sep 00 BOOST_NO_PRIVATE_IN_AGGREGATE added. (Mark Rodgers)
// 23 Jul 00 Fixed spelling of BOOST_NO_INCLASS_MEMBER_INITIALIZATION in
// comment (Dave Abrahams).
// 10 Jul 00 BOOST_NO_POINTER_TO_MEMBER_CONST added (Mark Rodgers)
// 26 Jun 00 BOOST_NO_STD_ITERATOR, BOOST_MSVC_STD_ITERATOR,
// BOOST_NO_STD_ITERATOR_TRAITS, BOOST_NO_USING_TEMPLATE,
// added (Jeremy Siek)
// 20 Jun 00 BOOST_MSVC added (Aleksey Gurtovoy)
// 14 Jun 00 BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS (Jens M.)
// 22 Mar 00 BOOST_MSVC6_MEMBER_TEMPLATES added (Dave Abrahams)
// 18 Feb 00 BOOST_NO_INCLASS_MEMBER_INITIALIZATION added (Jens Maurer)
// 26 Jan 00 Borland compiler support added (John Maddock)
// 26 Jan 00 Sun compiler support added (J<>rg Schaible)
// 30 Dec 99 BOOST_NMEMBER_TEMPLATES compatibility moved here from
// smart_ptr.hpp. (Dave Abrahams)
// 15 Nov 99 BOOST_NO_OPERATORS_IN_NAMESPACE,
// BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION added (Beman Dawes)
// 11 Oct 99 BOOST_NO_STDC_NAMESPACE refined; <cstddef> supplied
// 29 Sep 99 BOOST_NO_STDC_NAMESPACE added (Ed Brey)
// 24 Sep 99 BOOST_DECL added (Ed Brey)
// 10 Aug 99 Endedness flags added, GNU CC support added
// 22 Jul 99 Initial version
#ifndef BOOST_CONFIG_HPP
#define BOOST_CONFIG_HPP
// Conformance Flag Macros -------------------------------------------------//
//
// Conformance flag macros should identify the absence of C++ Standard
// conformance rather than its presence. This ensures that standard conforming
// compilers do not require a lot of configuration flag macros. It places the
// burden where it should be, on non-conforming compilers. In the future,
// hopefully, less rather than more conformance flags will have to be defined.
// BOOST_NO_CV_SPECIALIZATIONS: if template specialisations for cv-qualified types
// conflict with a specialistaion for unqualififed type.
// BOOST_NO_CV_VOID_SPECIALIZATIONS: if template specialisations for cv-void types
// conflict with a specialistaion for void.
// BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS: Template value
// parameters cannot have a dependent type, for example
// "template<class T, typename T::type value> class X { ... };"
// BOOST_NO_INCLASS_MEMBER_INITIALIZATION: Compiler violates std::9.4.2/4.
// BOOST_NO_INT64_T: <boost/cstdint.hpp> does not support 64-bit integer
// types. (Set by <boost/cstdint.hpp> rather than <boost/config.hpp>).
// BOOST_NO_INTEGRAL_INT64_T: int64_t as defined by <boost/cstdint.hpp> is
// not an integral type.
// BOOST_NO_MEMBER_TEMPLATES: Member template functions not fully supported.
// Also see BOOST_MSVC6_MEMBER_TEMPLATES in the Compiler Control section below.
// BOOST_NO_MEMBER_TEMPLATE_FRIENDS: Member template friend syntax
// ("template<class P> friend class frd;") described in the C++ Standard,
// 14.5.3, not supported.
// BOOST_NO_OPERATORS_IN_NAMESPACE: Compiler requires inherited operator
// friend functions to be defined at namespace scope, then using'ed to boost.
// Probably GCC specific. See boost/operators.hpp for example.
// BOOST_NO_POINTER_TO_MEMBER_CONST: The compiler does not correctly handle
// pointers to const member functions, preventing use of these in overloaded
// function templates. See boost/functional.hpp for example.
// BOOST_NO_PRIVATE_IN_AGGREGATE: The compiler misreads 8.5.1, treating classes
// as non-aggregate if they contain private or protected member functions.
// BOOST_NO_STD_ITERATOR: The C++ implementation fails to provide the
// std::iterator class.
// BOOST_NO_STD_ITERATOR_TRAITS: The compiler does not provide a standard
// compliant implementation of std::iterator_traits. Note that
// the compiler may still have a non-standard implementation.
// BOOST_NO_STDC_NAMESPACE: The contents of C++ standard headers for C library
// functions (the <c...> headers) have not been placed in namespace std.
// Because the use of std::size_t is so common, a specific workaround for
// <cstddef> (and thus std::size_t) is provided in this header (see below).
// For other <c...> headers, a workaround must be provided in the boost header:
//
// #include <cstdlib> // for abs
// #ifdef BOOST_NO_STDC_NAMESPACE
// namespace std { using ::abs; }
// #endif
// BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION. Class template partial
// specialization (14.5.4 [temp.class.spec]) not supported.
// BOOST_NO_USING_TEMPLATE: The compiler will not accept a using declaration
// that imports a template from the global namespace into a named namespace.
// Probably Borland specific.
// BOOST_NO_AUTO_PTR: If the compiler / library supplies non-standard or broken
// std::auto_ptr.
// Compiler Control or Information Macros ----------------------------------//
//
// Compilers often supply features outside of the C++ Standard which need to be
// controlled or detected. As usual, reasonable default behavior should occur
// if any of these macros are not defined.
// BOOST_DECL: Certain compilers for Microsoft operating systems require
// non-standard class and function decoration if dynamic load library linking
// is desired. BOOST_DECL supplies that decoration, defaulting to a nul string
// so that it is harmless when not required. Boost does not encourage the use
// of BOOST_DECL - it is non-standard and to be avoided if practical to do so.
// BOOST_DECL_EXPORTS: User defined, BOOST_DECL_EXPORTS causes BOOST_DECL to
// be defined as __declspec(dllexport) rather than __declspec(dllimport).
// BOOST_MSVC6_MEMBER_TEMPLATES: Microsoft Visual C++ 6.0 has enough member
// template idiosyncrasies (being polite) that BOOST_NO_MEMBER_TEMPLATES is
// defined for this compiler. BOOST_MSVC6_MEMBER_TEMPLATES is defined to allow
// compiler specific workarounds.
// BOOST_MSVC: defined as _MSC_VER for the Microsoft compiler only. In general,
// boost headers should test for a specific conformance flag macro (for
// example, BOOST_NO_MEMBER_TEMPLATE_FRIENDS) rather than a specific compiler.
// VC++ is a special case, however, since many libraries try to support it yet
// it has so many conformance issues that sometimes it is just easier to test
// for it directly. On the other hand, the obvious way to do this doesn't work,
// as many non-Microsoft compilers define _MSC_VER. Thus BOOST_MSVC.
// BOOST_MSVC_STD_ITERATOR: Microsoft's broken version of std::iterator
// is being used.
// BOOST_SYSTEM_HAS_STDINT_H: There are no 1998 C++ Standard headers <stdint.h>
// or <cstdint>, although the 1999 C Standard does include <stdint.h>.
// If <stdint.h> is present, <boost/stdint.h> can make good use of it,
// so a flag is supplied (signalling presence; thus the default is not
// present, conforming to the current C++ standard).
// BOOST_NO_SLIST: The C++ implementation does not provide the slist class.
// BOOST_NO_HASH: The C++ implementation does not provide the hash_set
// or hash_map classes.
// BOOST_STD_EXTENSION_NAMESPACE: The name of the namespace in which the slist,
// hash_set and/or hash_map templates are defined in this implementation (if any).
// BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS: The standard library does not provide
// templated iterator constructors for its containers.
// BOOST_NO_LIMITS: The C++ implementation does not provide the <limits> header.
// BOOST_NO_INTRINSIC_WCHAR_T: The C++ implementation does not provide wchar_t,
// or it is really a synonym for another integral type. Use this symbol to
// decide whether it is appropriate to explicitly specialize a template on
// wchar_t if there is already a specialization for other integer types.
// BOOST_NO_STD_ALLOCATOR: The C++ standard library does not provide
// a standards conforming std::allocator.
// BOOST_NO_STD_MIN_MAX: The C++ standard library does not provide
// the min() and max() template functions that should be in <algorithm>.
// Compilers are listed in alphabetic order (except VC++ last - see below)---//
// GNU CC (also known as GCC and G++) --------------------------------------//
# if defined __GNUC__
# if __GNUC__ == 2 && __GNUC_MINOR__ == 91
// egcs 1.1 won't parse smart_ptr.hpp without this:
# define BOOST_NO_AUTO_PTR
# endif
# if __GNUC__ == 2 && __GNUC_MINOR__ <= 95
# include <iterator> // not sure this is the right way to do this -JGS
# if !defined(_CXXRT_STD) && !defined(__SGI_STL) // need to ask Dietmar about this -JGS
# define BOOST_NO_STD_ITERATOR
# define BOOST_NO_LIMITS
# endif
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
# define BOOST_NO_OPERATORS_IN_NAMESPACE
# endif
# if __GNUC__ == 2 && __GNUC_MINOR__ <= 8
# define BOOST_NO_MEMBER_TEMPLATES
# endif
// Kai C++ ------------------------------------------------------------------//
#elif defined __KCC
# define BOOST_NO_SLIST
# define BOOST_NO_HASH
// Greenhills C++ -----------------------------------------------------------//
#elif defined __ghs
# define BOOST_NO_SLIST
# define BOOST_NO_HASH
// Borland ------------------------------------------------------------------//
#elif defined __BORLANDC__
# define BOOST_NO_SLIST
# define BOOST_NO_HASH
# if __BORLANDC__ <= 0x0551
# define BOOST_NO_INTEGRAL_INT64_T
# define BOOST_NO_PRIVATE_IN_AGGREGATE
# endif
# if __BORLANDC__ <= 0x0550
// Borland C++ Builder 4 and 5:
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
# define BOOST_NO_USING_TEMPLATE
# if __BORLANDC__ == 0x0550
// Borland C++ Builder 5, command-line compiler 5.5:
# define BOOST_NO_OPERATORS_IN_NAMESPACE
# endif
# endif
# if defined BOOST_DECL_EXPORTS
# define BOOST_DECL __declspec(dllexport)
# else
# define BOOST_DECL __declspec(dllimport)
# endif
# define BOOST_NO_CV_SPECIALIZATIONS
# define BOOST_NO_CV_VOID_SPECIALIZATIONS
// Intel -------------------------------------------------------------------//
# elif defined __ICL
# include <iterator> // not sure this is the right way to do this -JGS
# if __SGI_STL_PORT >= 0x400 || __SGI_STL_PORT >= 0x321 && defined(__STL_USE_NAMESPACES)
// a perfectly good implementation of std::iterator is supplied
# elif defined(__SGI_STL_ITERATOR)
# define BOOST_NO_STD_ITERATOR // No std::iterator in this case
# else // assume using dinkumware's STL that comes with VC++ 6.0
# define BOOST_MSVC_STD_ITERATOR
# define BOOST_NO_STD_ITERATOR_TRAITS
# define BOOST_NO_STDC_NAMESPACE
# define BOOST_NO_SLIST
# define BOOST_NO_HASH
# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
# define BOOST_NO_STD_ALLOCATOR
# define BOOST_NO_STD_MIN_MAX
# endif
// Metrowerks CodeWarrior --------------------------------------------------//
# elif defined __MWERKS__
# if __MWERKS__ <= 0x4000
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
# endif
# if __MWERKS__ <= 0x2301
# define BOOST_NO_POINTER_TO_MEMBER_CONST
# endif
# if __MWERKS__ >= 0x2300
# define BOOST_SYSTEM_HAS_STDINT_H
# endif
# if defined BOOST_DECL_EXPORTS
# define BOOST_DECL __declspec(dllexport)
# else
# define BOOST_DECL __declspec(dllimport)
# endif
# define BOOST_STD_EXTENSION_NAMESPACE Metrowerks
// Sun Workshop Compiler C++ ------------------------------------------------//
# elif defined __SUNPRO_CC
# if __SUNPRO_CC <= 0x500
# define BOOST_NO_MEMBER_TEMPLATES
# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# endif
// Microsoft Visual C++ (excluding Intel/EDG front end) --------------------//
//
// Must remain the last #elif since some other vendors (Metrowerks, for
// example) also #define _MSC_VER
# elif defined _MSC_VER
# define BOOST_MSVC _MSC_VER
// turn off the warnings before we #include anything
# pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info
# pragma warning( disable : 4503 ) // warning: decorated name length exceeded
# if _MSC_VER <= 1200 // 1200 == VC++ 6.0
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
# define BOOST_NO_PRIVATE_IN_AGGREGATE
# define BOOST_NO_INTEGRAL_INT64_T
# define BOOST_NO_INTRINSIC_WCHAR_T
// VC++ 6.0 has member templates but they have numerous problems including
// cases of silent failure, so for safety we define:
# define BOOST_NO_MEMBER_TEMPLATES
// For VC++ experts wishing to attempt workarounds, we define:
# define BOOST_MSVC6_MEMBER_TEMPLATES
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
# include <iterator> // not sure this is the right way to do this -JGS
# if __SGI_STL_PORT >= 0x400 || __SGI_STL_PORT >= 0x321 && defined(__STL_USE_NAMESPACES)
// a perfectly good implementation of std::iterator is supplied
# elif defined(__SGI_STL_ITERATOR)
# define BOOST_NO_STD_ITERATOR // No std::iterator in this case
# else
# define BOOST_MSVC_STD_ITERATOR 1
# define BOOST_NO_SLIST
# define BOOST_NO_HASH
# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
# define BOOST_NO_STD_ALLOCATOR
# ifndef _CPPLIB_VER
// Updated Dinkum library defines this, and provides
// its own min and max definitions.
# define BOOST_NO_STD_MIN_MAX
# undef min
# undef max
# endif
# ifndef NOMINMAX
// avoid spurious NOMINMAX redefinition warning
# define NOMINMAX
# endif
# endif
# define BOOST_NO_STD_ITERATOR_TRAITS
# define BOOST_NO_CV_VOID_SPECIALIZATIONS
// Make sure at least one standard library header is included so that library
// implementation detection will work, even if no standard headers have been
// included in front of a boost header. (Ed Brey 5 Jun 00)
# include <cstddef>
// Determine if the standard library implementation is already pulling names
// into std. STLport defines the following if so. (Ed Brey 5 Jun 00)
# ifndef __STL_IMPORT_VENDOR_CSTD
# define BOOST_NO_STDC_NAMESPACE
# endif
# endif
# if defined BOOST_DECL_EXPORTS
# define BOOST_DECL __declspec(dllexport)
# else
# define BOOST_DECL __declspec(dllimport)
# endif
# endif // Microsoft (excluding Intel/EDG frontend)
# ifndef BOOST_DECL
# define BOOST_DECL // default for compilers not needing this decoration.
# endif
// end of compiler specific portion ----------------------------------------//
#ifndef BOOST_STD_EXTENSION_NAMESPACE
# define BOOST_STD_EXTENSION_NAMESPACE std
#endif
// Check for old name "BOOST_NMEMBER_TEMPLATES" for compatibility -----------//
// Don't use BOOST_NMEMBER_TEMPLATES. It is deprecated and will be removed soon.
#if defined( BOOST_NMEMBER_TEMPLATES ) && !defined( BOOST_NO_MEMBER_TEMPLATES )
#define BOOST_NO_MEMBER_TEMPLATES
#endif
// BOOST_NO_STDC_NAMESPACE workaround --------------------------------------//
//
// Because std::size_t usage is so common, even in boost headers which do not
// otherwise use the C library, the <cstddef> workaround is included here so
// that ugly workaround code need not appear in many other boost headers.
// NOTE WELL: This is a workaround for non-conforming compilers; <cstddef>
// must still be #included in the usual places so that <cstddef> inclusion
// works as expected with standard conforming compilers. The resulting
// double inclusion of <cstddef> is harmless.
# ifdef BOOST_NO_STDC_NAMESPACE
# include <cstddef>
namespace std { using ::ptrdiff_t; using ::size_t; }
// using ::wchar_t; removed since wchar_t is a C++ built-in type (Ed Brey)
# endif
#ifdef BOOST_NO_STD_MIN_MAX
namespace std {
template <class _Tp>
inline const _Tp& min(const _Tp& __a, const _Tp& __b) {
return __b < __a ? __b : __a;
}
template <class _Tp>
inline const _Tp& max(const _Tp& __a, const _Tp& __b) {
return __a < __b ? __b : __a;
}
#ifdef BOOST_MSVC
inline long min(long __a, long __b) {
return __b < __a ? __b : __a;
}
inline long max(long __a, long __b) {
return __a < __b ? __b : __a;
}
#endif
}
#endif
#endif // BOOST_CONFIG_HPP

View File

@ -1,138 +0,0 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 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.
// See http://www.boost.org for most recent version including documentation.
// call_traits: defines typedefs for function usage
// (see libs/utility/call_traits.htm)
/* Release notes:
23rd July 2000:
Fixed array specialization. (JM)
Added Borland specific fixes for reference types
(issue raised by Steve Cleary).
*/
#ifndef BOOST_DETAIL_CALL_TRAITS_HPP
#define BOOST_DETAIL_CALL_TRAITS_HPP
#ifndef BOOST_CONFIG_HPP
#include <boost/config.hpp>
#endif
#ifndef BOOST_TYPE_TRAITS_HPP
#include <boost/type_traits.hpp>
#endif
namespace boost{
namespace detail{
template <typename T, bool isp, bool b1, bool b2>
struct ct_imp
{
typedef const T& param_type;
};
template <typename T, bool isp>
struct ct_imp<T, isp, true, true>
{
typedef T const param_type;
};
template <typename T, bool b1, bool b2>
struct ct_imp<T, true, b1, b2>
{
typedef T const param_type;
};
}
template <typename T>
struct call_traits
{
public:
typedef T value_type;
typedef T& reference;
typedef const T& const_reference;
//
// C++ Builder workaround: we should be able to define a compile time
// constant and pass that as a single template parameter to ct_imp<T,bool>,
// however compiler bugs prevent this - instead pass three bool's to
// ct_imp<T,bool,bool,bool> and add an extra partial specialisation
// of ct_imp to handle the logic. (JM)
typedef typename detail::ct_imp<T, ::boost::is_pointer<typename remove_const<T>::type>::value, ::boost::is_arithmetic<typename remove_const<T>::type>::value, sizeof(T) <= sizeof(void*)>::param_type param_type;
};
template <typename T>
struct call_traits<T&>
{
typedef T& value_type;
typedef T& reference;
typedef const T& const_reference;
typedef T& param_type; // hh removed const
};
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x551)
// these are illegal specialisations; cv-qualifies applied to
// references have no effect according to [8.3.2p1],
// C++ Builder requires them though as it treats cv-qualified
// references as distinct types...
template <typename T>
struct call_traits<T&const>
{
typedef T& value_type;
typedef T& reference;
typedef const T& const_reference;
typedef T& param_type; // hh removed const
};
template <typename T>
struct call_traits<T&volatile>
{
typedef T& value_type;
typedef T& reference;
typedef const T& const_reference;
typedef T& param_type; // hh removed const
};
template <typename T>
struct call_traits<T&const volatile>
{
typedef T& value_type;
typedef T& reference;
typedef const T& const_reference;
typedef T& param_type; // hh removed const
};
#endif
template <typename T, std::size_t N>
struct call_traits<T [N]>
{
private:
typedef T array_type[N];
public:
// degrades array to pointer:
typedef const T* value_type;
typedef array_type& reference;
typedef const array_type& const_reference;
typedef const T* const param_type;
};
template <typename T, std::size_t N>
struct call_traits<const T [N]>
{
private:
typedef const T array_type[N];
public:
// degrades array to pointer:
typedef const T* value_type;
typedef array_type& reference;
typedef const array_type& const_reference;
typedef const T* const param_type;
};
}
#endif // BOOST_DETAIL_CALL_TRAITS_HPP

View File

@ -1,125 +0,0 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 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.
// See http://www.boost.org for most recent version including documentation.
//
// Crippled version for crippled compilers:
// see libs/utility/call_traits.htm
//
/* Release notes:
01st October 2000:
Fixed call_traits on VC6, using "poor man's partial specialisation",
using ideas taken from "Generative programming" by Krzysztof Czarnecki
& Ulrich Eisenecker.
*/
#ifndef BOOST_OB_CALL_TRAITS_HPP
#define BOOST_OB_CALL_TRAITS_HPP
#ifndef BOOST_CONFIG_HPP
#include <boost/config.hpp>
#endif
#ifndef BOOST_TYPE_TRAITS_HPP
#include <boost/type_traits.hpp>
#endif
namespace boost{
#if defined(BOOST_MSVC6_MEMBER_TEMPLATES) || !defined(BOOST_NO_MEMBER_TEMPLATES)
//
// use member templates to emulate
// partial specialisation:
//
namespace detail{
template <class T>
struct standard_call_traits
{
typedef T value_type;
typedef T& reference;
typedef const T& const_reference;
typedef const T& param_type;
};
template <class T>
struct simple_call_traits
{
typedef T value_type;
typedef T& reference;
typedef const T& const_reference;
typedef const T param_type;
};
template <class T>
struct reference_call_traits
{
typedef T value_type;
typedef T reference;
typedef T const_reference;
typedef T param_type;
};
template <bool simple, bool reference>
struct call_traits_chooser
{
template <class T>
struct rebind
{
typedef standard_call_traits<T> type;
};
};
template <>
struct call_traits_chooser<true, false>
{
template <class T>
struct rebind
{
typedef simple_call_traits<T> type;
};
};
template <>
struct call_traits_chooser<false, true>
{
template <class T>
struct rebind
{
typedef reference_call_traits<T> type;
};
};
} // namespace detail
template <typename T>
struct call_traits
{
private:
typedef detail::call_traits_chooser<(is_pointer<T>::value || is_arithmetic<T>::value) && sizeof(T) <= sizeof(void*), is_reference<T>::value> chooser;
typedef typename chooser::template rebind<T> bound_type;
typedef typename bound_type::type call_traits_type;
public:
typedef typename call_traits_type::value_type value_type;
typedef typename call_traits_type::reference reference;
typedef typename call_traits_type::const_reference const_reference;
typedef typename call_traits_type::param_type param_type;
};
#else
//
// sorry call_traits is completely non-functional
// blame your broken compiler:
//
template <typename T>
struct call_traits
{
typedef T value_type;
typedef T& reference;
typedef const T& const_reference;
typedef const T& param_type;
};
#endif // member templates
}
#endif // BOOST_OB_CALL_TRAITS_HPP

View File

@ -1,379 +0,0 @@
// Boost smart_ptr.hpp header file -----------------------------------------//
// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. 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.
// See http://www.boost.org for most recent version including documentation.
// Revision History
// 19 Oct 00 Make shared_ptr ctor from auto_ptr explicit. (Robert Vugts)
// 24 Jul 00 Change throw() to // never throws. See lib guidelines
// Exception-specification rationale. (Beman Dawes)
// 22 Jun 00 Remove #if continuations to fix GCC 2.95.2 problem (Beman Dawes)
// 1 Feb 00 Additional shared_ptr BOOST_NO_MEMBER_TEMPLATES workarounds
// (Dave Abrahams)
// 31 Dec 99 Condition tightened for no member template friend workaround
// (Dave Abrahams)
// 30 Dec 99 Moved BOOST_NMEMBER_TEMPLATES compatibility code to config.hpp
// (Dave Abrahams)
// 30 Nov 99 added operator ==, operator !=, and std::swap and std::less
// specializations for shared types (Darin Adler)
// 11 Oct 99 replaced op[](int) with op[](std::size_t) (Ed Brey, Valentin
// Bonnard), added shared_ptr workaround for no member template
// friends (Matthew Langston)
// 25 Sep 99 added shared_ptr::swap and shared_array::swap (Luis Coelho).
// 20 Jul 99 changed name to smart_ptr.hpp, #include <boost/config.hpp>,
// #include <boost/utility.hpp> and use boost::noncopyable
// 17 May 99 remove scoped_array and shared_array operator*() as
// unnecessary (Beman Dawes)
// 14 May 99 reorder code so no effects when bad_alloc thrown (Abrahams/Dawes)
// 13 May 99 remove certain throw() specifiers to avoid generated try/catch
// code cost (Beman Dawes)
// 11 May 99 get() added, conversion to T* placed in macro guard (Valentin
// Bonnard, Dave Abrahams, and others argued for elimination
// of the automatic conversion)
// 28 Apr 99 #include <memory> fix (Valentin Bonnard)
// 28 Apr 99 rename transfer() to share() for clarity (Dave Abrahams)
// 28 Apr 99 remove unsafe shared_array template conversions(Valentin Bonnard)
// 28 Apr 99 p(r) changed to p(r.px) for clarity (Dave Abrahams)
// 21 Apr 99 reset() self assignment fix (Valentin Bonnard)
// 21 Apr 99 dispose() provided to improve clarity (Valentin Bonnard)
// 27 Apr 99 leak when new throws fixes (Dave Abrahams)
// 21 Oct 98 initial Version (Greg Colvin/Beman Dawes)
#ifndef BOOST_SMART_PTR_HPP
#define BOOST_SMART_PTR_HPP
#include <boost/config.hpp> // for broken compiler workarounds
#include <cstddef> // for std::size_t
#include <memory> // for std::auto_ptr
#include <algorithm> // for std::swap
#include <boost/utility.hpp> // for boost::noncopyable
#include <functional> // for std::less
namespace boost {
// scoped_ptr --------------------------------------------------------------//
// scoped_ptr mimics a built-in pointer except that it guarantees deletion
// of the object pointed to, either on destruction of the scoped_ptr or via
// an explicit reset(). scoped_ptr is a simple solution for simple needs;
// see shared_ptr (below) or std::auto_ptr if your needs are more complex.
template<typename T> class scoped_ptr : noncopyable {
T* ptr;
public:
typedef T element_type;
explicit scoped_ptr( T* p=0 ) : ptr(p) {} // never throws
~scoped_ptr() { delete ptr; }
void reset( T* p=0 ) { if ( ptr != p ) { delete ptr; ptr = p; } }
T& operator*() const { return *ptr; } // never throws
T* operator->() const { return ptr; } // never throws
T* get() const { return ptr; } // never throws
#ifdef BOOST_SMART_PTR_CONVERSION
// get() is safer! Define BOOST_SMART_PTR_CONVERSION at your own risk!
operator T*() const { return ptr; } // never throws
#endif
}; // scoped_ptr
// scoped_array ------------------------------------------------------------//
// scoped_array extends scoped_ptr to arrays. Deletion of the array pointed to
// is guaranteed, either on destruction of the scoped_array or via an explicit
// reset(). See shared_array or std::vector if your needs are more complex.
template<typename T> class scoped_array : noncopyable {
T* ptr;
public:
typedef T element_type;
explicit scoped_array( T* p=0 ) : ptr(p) {} // never throws
~scoped_array() { delete [] ptr; }
void reset( T* p=0 ) { if ( ptr != p ) {delete [] ptr; ptr=p;} }
T* get() const { return ptr; } // never throws
#ifdef BOOST_SMART_PTR_CONVERSION
// get() is safer! Define BOOST_SMART_PTR_CONVERSION at your own risk!
operator T*() const { return ptr; } // never throws
#else
T& operator[](std::size_t i) const { return ptr[i]; } // never throws
#endif
}; // scoped_array
// shared_ptr --------------------------------------------------------------//
// An enhanced relative of scoped_ptr with reference counted copy semantics.
// The object pointed to is deleted when the last shared_ptr pointing to it
// is destroyed or reset.
template<typename T> class shared_ptr {
public:
typedef T element_type;
explicit shared_ptr(T* p =0) : px(p) {
try { pn = new long(1); } // fix: prevent leak if new throws
catch (...) { delete p; throw; }
}
shared_ptr(const shared_ptr& r) : px(r.px) { ++*(pn = r.pn); } // never throws
~shared_ptr() { dispose(); }
shared_ptr& operator=(const shared_ptr& r) {
share(r.px,r.pn);
return *this;
}
#if !defined( BOOST_NO_MEMBER_TEMPLATES )
template<typename Y>
shared_ptr(const shared_ptr<Y>& r) : px(r.px) { // never throws
++*(pn = r.pn);
}
#ifndef BOOST_NO_AUTO_PTR
template<typename Y>
explicit shared_ptr(std::auto_ptr<Y>& r) {
pn = new long(1); // may throw
px = r.release(); // fix: moved here to stop leak if new throws
}
#endif
template<typename Y>
shared_ptr& operator=(const shared_ptr<Y>& r) {
share(r.px,r.pn);
return *this;
}
#ifndef BOOST_NO_AUTO_PTR
template<typename Y>
shared_ptr& operator=(std::auto_ptr<Y>& r) {
// code choice driven by guarantee of "no effect if new throws"
if (*pn == 1) { delete px; }
else { // allocate new reference counter
long * tmp = new long(1); // may throw
--*pn; // only decrement once danger of new throwing is past
pn = tmp;
} // allocate new reference counter
px = r.release(); // fix: moved here so doesn't leak if new throws
return *this;
}
#endif
#else
#ifndef BOOST_NO_AUTO_PTR
explicit shared_ptr(std::auto_ptr<T>& r) {
pn = new long(1); // may throw
px = r.release(); // fix: moved here to stop leak if new throws
}
shared_ptr& operator=(std::auto_ptr<T>& r) {
// code choice driven by guarantee of "no effect if new throws"
if (*pn == 1) { delete px; }
else { // allocate new reference counter
long * tmp = new long(1); // may throw
--*pn; // only decrement once danger of new throwing is past
pn = tmp;
} // allocate new reference counter
px = r.release(); // fix: moved here so doesn't leak if new throws
return *this;
}
#endif
#endif
void reset(T* p=0) {
if ( px == p ) return; // fix: self-assignment safe
if (--*pn == 0) { delete px; }
else { // allocate new reference counter
try { pn = new long; } // fix: prevent leak if new throws
catch (...) {
++*pn; // undo effect of --*pn above to meet effects guarantee
delete p;
throw;
} // catch
} // allocate new reference counter
*pn = 1;
px = p;
} // reset
T& operator*() const { return *px; } // never throws
T* operator->() const { return px; } // never throws
T* get() const { return px; } // never throws
#ifdef BOOST_SMART_PTR_CONVERSION
// get() is safer! Define BOOST_SMART_PTR_CONVERSION at your own risk!
operator T*() const { return px; } // never throws
#endif
long use_count() const { return *pn; } // never throws
bool unique() const { return *pn == 1; } // never throws
void swap(shared_ptr<T>& other) // never throws
{ std::swap(px,other.px); std::swap(pn,other.pn); }
// Tasteless as this may seem, making all members public allows member templates
// to work in the absence of member template friends. (Matthew Langston)
// Don't split this line into two; that causes problems for some GCC 2.95.2 builds
#if defined(BOOST_NO_MEMBER_TEMPLATES) || !defined( BOOST_NO_MEMBER_TEMPLATE_FRIENDS )
private:
#endif
T* px; // contained pointer
long* pn; // ptr to reference counter
// Don't split this line into two; that causes problems for some GCC 2.95.2 builds
#if !defined( BOOST_NO_MEMBER_TEMPLATES ) && !defined( BOOST_NO_MEMBER_TEMPLATE_FRIENDS )
template<typename Y> friend class shared_ptr;
#endif
void dispose() { if (--*pn == 0) { delete px; delete pn; } }
void share(T* rpx, long* rpn) {
if (pn != rpn) {
dispose();
px = rpx;
++*(pn = rpn);
}
} // share
}; // shared_ptr
template<typename T, typename U>
inline bool operator==(const shared_ptr<T>& a, const shared_ptr<U>& b)
{ return a.get() == b.get(); }
template<typename T, typename U>
inline bool operator!=(const shared_ptr<T>& a, const shared_ptr<U>& b)
{ return a.get() != b.get(); }
// shared_array ------------------------------------------------------------//
// shared_array extends shared_ptr to arrays.
// The array pointed to is deleted when the last shared_array pointing to it
// is destroyed or reset.
template<typename T> class shared_array {
public:
typedef T element_type;
explicit shared_array(T* p =0) : px(p) {
try { pn = new long(1); } // fix: prevent leak if new throws
catch (...) { delete [] p; throw; }
}
shared_array(const shared_array& r) : px(r.px) // never throws
{ ++*(pn = r.pn); }
~shared_array() { dispose(); }
shared_array& operator=(const shared_array& r) {
if (pn != r.pn) {
dispose();
px = r.px;
++*(pn = r.pn);
}
return *this;
} // operator=
void reset(T* p=0) {
if ( px == p ) return; // fix: self-assignment safe
if (--*pn == 0) { delete [] px; }
else { // allocate new reference counter
try { pn = new long; } // fix: prevent leak if new throws
catch (...) {
++*pn; // undo effect of --*pn above to meet effects guarantee
delete [] p;
throw;
} // catch
} // allocate new reference counter
*pn = 1;
px = p;
} // reset
T* get() const { return px; } // never throws
#ifdef BOOST_SMART_PTR_CONVERSION
// get() is safer! Define BOOST_SMART_PTR_CONVERSION at your own risk!
operator T*() const { return px; } // never throws
#else
T& operator[](std::size_t i) const { return px[i]; } // never throws
#endif
long use_count() const { return *pn; } // never throws
bool unique() const { return *pn == 1; } // never throws
void swap(shared_array<T>& other) // never throws
{ std::swap(px,other.px); std::swap(pn,other.pn); }
private:
T* px; // contained pointer
long* pn; // ptr to reference counter
void dispose() { if (--*pn == 0) { delete [] px; delete pn; } }
}; // shared_array
template<typename T>
inline bool operator==(const shared_array<T>& a, const shared_array<T>& b)
{ return a.get() == b.get(); }
template<typename T>
inline bool operator!=(const shared_array<T>& a, const shared_array<T>& b)
{ return a.get() != b.get(); }
} // namespace boost
// specializations for things in namespace std -----------------------------//
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace std {
// Specialize std::swap to use the fast, non-throwing swap that's provided
// as a member function instead of using the default algorithm which creates
// a temporary and uses assignment.
template<typename T>
inline void swap(boost::shared_ptr<T>& a, boost::shared_ptr<T>& b)
{ a.swap(b); }
template<typename T>
inline void swap(boost::shared_array<T>& a, boost::shared_array<T>& b)
{ a.swap(b); }
// Specialize std::less so we can use shared pointers and arrays as keys in
// associative collections.
// It's still a controversial question whether this is better than supplying
// a full range of comparison operators (<, >, <=, >=).
template<typename T>
struct less< boost::shared_ptr<T> >
: binary_function<boost::shared_ptr<T>, boost::shared_ptr<T>, bool>
{
bool operator()(const boost::shared_ptr<T>& a,
const boost::shared_ptr<T>& b) const
{ return less<T*>()(a.get(),b.get()); }
};
template<typename T>
struct less< boost::shared_array<T> >
: binary_function<boost::shared_array<T>, boost::shared_array<T>, bool>
{
bool operator()(const boost::shared_array<T>& a,
const boost::shared_array<T>& b) const
{ return less<T*>()(a.get(),b.get()); }
};
} // namespace std
#endif // ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#endif // BOOST_SMART_PTR_HPP

View File

@ -1,57 +0,0 @@
// boost timer.hpp header file ---------------------------------------------//
// (C) Copyright Beman Dawes 1994-99. 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.
// See http://www.boost.org for most recent version including documentation.
// Revision History
// 25 Sep 99 elapsed_max() and elapsed_min() added (John Maddock)
// 16 Jul 99 Second beta
// 6 Jul 99 Initial boost version
#ifndef BOOST_TIMER_HPP
#define BOOST_TIMER_HPP
#include <boost/smart_ptr.hpp>
namespace boost {
// timer -------------------------------------------------------------------//
// A timer object measures elapsed time.
// It is recommended that implementations measure wall clock rather than CPU
// time since the intended use is performance measurement on systems where
// total elapsed time is more important than just process or CPU time.
// Warnings: The maximum measurable elapsed time may well be only 596.5+ hours
// due to implementation limitations. The accuracy of timings depends on the
// accuracy of timing information provided by the underlying platform, and
// this varies a great deal from platform to platform.
class timer {
public:
timer(); // postcondition: elapsed()==0
timer( const timer& src ); // post: elapsed()==src.elapsed()
~timer();
timer& operator=( const timer& src ); // post: elapsed()==src.elapsed()
void restart(); // post: elapsed()==0
double elapsed() const; // return elapsed time in seconds
double elapsed_max() const; // return estimated maximum value for elapsed()
// Portability warning: elapsed_max() may return too high a value on systems
// where std::clock_t overflows or resets at surprising values.
double elapsed_min() const; // return minimum value for elapsed()
private:
class _timer;
scoped_ptr<_timer> _imp; // hide implementation details
}; // timer
} // namespace boost
#endif // BOOST_TIMER_HPP

View File

@ -1,42 +0,0 @@
// (C) Copyright Boost.org 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.
// See http://www.boost.org for most recent version including documentation.
// See boost/detail/type_traits.hpp and boost/detail/ob_type_traits.hpp
// for full copyright notices.
#ifndef BOOST_TYPE_TRAITS_HPP
#define BOOST_TYPE_TRAITS_HPP
#include <boost/type_traits/fwd.hpp>
#include <boost/type_traits/ice.hpp>
#include <boost/type_traits/conversion_traits.hpp>
#include <boost/type_traits/arithmetic_traits.hpp>
#include <boost/type_traits/cv_traits.hpp>
#include <boost/type_traits/composite_traits.hpp>
#include <boost/type_traits/alignment_traits.hpp>
#include <boost/type_traits/object_traits.hpp>
#include <boost/type_traits/transform_traits.hpp>
#include <boost/type_traits/same_traits.hpp>
/**************************************************************************/
//
// undefine helper macro's:
//
#undef BOOST_IS_CLASS
#undef BOOST_IS_ENUM
#undef BOOST_IS_UNION
#undef BOOST_IS_POD
#undef BOOST_IS_EMPTY
#undef BOOST_HAS_TRIVIAL_CONSTRUCTOR
#undef BOOST_HAS_TRIVIAL_COPY
#undef BOOST_HAS_TRIVIAL_ASSIGN
#undef BOOST_HAS_TRIVIAL_DESTRUCTOR
#endif // BOOST_TYPE_TRAITS_HPP

View File

@ -1,66 +0,0 @@
// (C) Copyright John Maddock 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.
//
// defines alignment_of:
#ifndef ALIGNMENT_TYPE_TRAITS_HPP
#define ALIGNMENT_TYPE_TRAITS_HPP
#include <cstdlib>
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
namespace boost{
//
// get the alignment of some arbitrary type:
namespace detail{
template <class T>
struct alignment_of_hack
{
char c;
T t;
alignment_of_hack();
};
template <unsigned A, unsigned S>
struct alignment_logic
{
BOOST_DECL_MC(std::size_t, value, A < S ? A : S);
};
} // namespace detail
template <class T>
struct alignment_of
{
BOOST_DECL_MC(std::size_t, value,
(::boost::detail::alignment_logic<
sizeof(detail::alignment_of_hack<T>) - sizeof(T),
sizeof(T)
>::value));
};
//
// references have to be treated specially, assume
// that a reference is just a special pointer:
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <class T>
class alignment_of<T&>
{
public:
BOOST_DECL_MC(std::size_t, value, alignment_of<T*>::value);
};
#endif
} // namespace boost
#endif // ALIGNMENT_TYPE_TRAITS_HPP

View File

@ -1,262 +0,0 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 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.
//
// See http://www.boost.org for most recent version including documentation.
//
// defines traits classes for arithmetic types:
// is_void, is_integral, is_float, is_arithmetic, is_fundamental.
//
#ifndef ARITHMETIC_TYPE_TRAITS_HPP
#define ARITHMETIC_TYPE_TRAITS_HPP
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
#ifndef BOOST_FWD_TYPE_TRAITS_HPP
#include <boost/type_traits/fwd.hpp>
#endif
namespace boost{
//* is a type T void - is_void<T>
template <typename T> struct is_void{ BOOST_DECL_MC(bool, value, false); };
template <> struct is_void<void>{ BOOST_DECL_MC(bool, value, true); };
//* is a type T an integral type described in the standard (3.9.1p3)
template <typename T> struct is_integral
{ BOOST_DECL_MC(bool, value, false); };
template <> struct is_integral<unsigned char>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<unsigned short>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<unsigned int>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<unsigned long>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<signed char>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<signed short>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<signed int>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<signed long>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<char>
{ BOOST_DECL_MC(bool, value, true); };
#ifndef BOOST_MSVC
template <> struct is_integral<wchar_t>
{ BOOST_DECL_MC(bool, value, true); };
#endif
template <> struct is_integral<bool>
{ BOOST_DECL_MC(bool, value, true); };
#ifdef ULLONG_MAX
template <> struct is_integral<unsigned long long>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<long long>
{ BOOST_DECL_MC(bool, value, true); };
#endif
#if defined(__BORLANDC__) || defined(_MSC_VER) && !defined(__MWERKS__)
template <> struct is_integral<unsigned __int64>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<__int64>
{ BOOST_DECL_MC(bool, value, true); };
#endif
//* is a type T a floating-point type described in the standard (3.9.1p8)
template <typename T> struct is_float
{ BOOST_DECL_MC(bool, value, false); };
template <> struct is_float<float>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_float<double>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_float<long double>
{ BOOST_DECL_MC(bool, value, true); };
//
// declare cv-qualified specialisations of these templates only
// if BOOST_NO_CV_SPECIALIZATIONS is not defined:
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <> struct is_void<const void>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_void<volatile void>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_void<const volatile void>
{ BOOST_DECL_MC(bool, value, true); };
#endif
#ifndef BOOST_NO_CV_SPECIALIZATIONS
// const-variations:
template <> struct is_integral<const unsigned char>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const unsigned short>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const unsigned int>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const unsigned long>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const signed char>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const signed short>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const signed int>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const signed long>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const char>
{ BOOST_DECL_MC(bool, value, true); };
#ifndef BOOST_MSVC
template <> struct is_integral<const wchar_t>
{ BOOST_DECL_MC(bool, value, true); };
#endif
template <> struct is_integral<const bool>
{ BOOST_DECL_MC(bool, value, true); };
#ifdef ULLONG_MAX
template <> struct is_integral<const unsigned long long>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const long long>
{ BOOST_DECL_MC(bool, value, true); };
#endif // ULLONG_MAX
#if defined(__BORLANDC__) || defined(_MSC_VER) && !defined(__MWERKS__)
template <> struct is_integral<const unsigned __int64>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const __int64>
{ BOOST_DECL_MC(bool, value, true); };
#endif //__int64
template <> struct is_float<const float>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_float<const double>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_float<const long double>
{ BOOST_DECL_MC(bool, value, true); };
// volatile-variations:
template <> struct is_integral<volatile unsigned char>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<volatile unsigned short>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<volatile unsigned int>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<volatile unsigned long>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<volatile signed char>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<volatile signed short>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<volatile signed int>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<volatile signed long>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<volatile char>
{ BOOST_DECL_MC(bool, value, true); };
#ifndef BOOST_MSVC
template <> struct is_integral<volatile wchar_t>
{ BOOST_DECL_MC(bool, value, true); };
#endif
template <> struct is_integral<volatile bool>
{ BOOST_DECL_MC(bool, value, true); };
#ifdef ULLONG_MAX
template <> struct is_integral<volatile unsigned long long>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<volatile long long>
{ BOOST_DECL_MC(bool, value, true); };
#endif // ULLONG_MAX
#if defined(__BORLANDC__) || defined(_MSC_VER) && !defined(__MWERKS__)
template <> struct is_integral<volatile unsigned __int64>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<volatile __int64>
{ BOOST_DECL_MC(bool, value, true); };
#endif //__int64
template <> struct is_float<volatile float>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_float<volatile double>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_float<volatile long double>
{ BOOST_DECL_MC(bool, value, true); };
// const-volatile-variations:
template <> struct is_integral<const volatile unsigned char>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const volatile unsigned short>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const volatile unsigned int>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const volatile unsigned long>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const volatile signed char>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const volatile signed short>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const volatile signed int>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const volatile signed long>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const volatile char>
{ BOOST_DECL_MC(bool, value, true); };
#ifndef BOOST_MSVC
template <> struct is_integral<const volatile wchar_t>
{ BOOST_DECL_MC(bool, value, true); };
#endif
template <> struct is_integral<const volatile bool>
{ BOOST_DECL_MC(bool, value, true); };
#ifdef ULLONG_MAX
template <> struct is_integral<const volatile unsigned long long>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const volatile long long>
{ BOOST_DECL_MC(bool, value, true); };
#endif // ULLONG_MAX
#if defined(__BORLANDC__) || defined(_MSC_VER) && !defined(__MWERKS__)
template <> struct is_integral<const volatile unsigned __int64>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_integral<const volatile __int64>
{ BOOST_DECL_MC(bool, value, true); };
#endif //__int64
template <> struct is_float<const volatile float>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_float<const volatile double>
{ BOOST_DECL_MC(bool, value, true); };
template <> struct is_float<const volatile long double>
{ BOOST_DECL_MC(bool, value, true); };
#endif // BOOST_NO_CV_SPECIALIZATIONS
//* is a type T an arithmetic type described in the standard (3.9.1p8)
template <typename T>
struct is_arithmetic
{
BOOST_DECL_MC(bool, value,
(::boost::type_traits::ice_or<
::boost::is_integral<T>::value,
::boost::is_float<T>::value
>::value));
};
//* is a type T a fundamental type described in the standard (3.9.1)
template <typename T>
struct is_fundamental
{
BOOST_DECL_MC(bool, value,
(::boost::type_traits::ice_or<
::boost::is_arithmetic<T>::value,
::boost::is_void<T>::value
>::value));
};
} // namespace boost
#endif

View File

@ -1,357 +0,0 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 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.
//
// See http://www.boost.org for most recent version including documentation.
//
// defines traits classes for composite types:
// is_array, is_pointer, is_reference, is_member_pointer, is_enum, is_union.
//
// Some workarounds in here use ideas suggested from "Generic<Programming>:
// Mappings between Types and Values"
// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html).
// Mat Marcus and Jesse Jones posted a version of is_pointer very similar to this one
// on the boost list (Copyright 2000 Adobe Systems Incorporated and others.
// All rights reserved.).
// Fixes for is_array are based on a newgroup posting by Jonathan Lundquist.
#ifndef COMPOSITE_TYPE_TRAITS_HPP
#define COMPOSITE_TYPE_TRAITS_HPP
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
#ifndef BOOST_FWD_TYPE_TRAITS_HPP
#include <boost/type_traits/fwd.hpp>
#endif
#ifndef BOOST_CONVERSION_TYPE_TRAITS_HPP
#include <boost/type_traits/conversion_traits.hpp>
#endif
#ifndef CV_TYPE_TRAITS_HPP
#include <boost/type_traits/cv_traits.hpp>
#endif
#ifndef ARITHMETIC_TYPE_TRAITS_HPP
#include <boost/type_traits/arithmetic_traits.hpp>
#endif
namespace boost{
/**********************************************
*
* is_array
*
**********************************************/
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T> struct is_array
{ BOOST_DECL_MC(bool, value, false); };
template <typename T, std::size_t N> struct is_array<T[N]>
{ BOOST_DECL_MC(bool, value, true); };
template <typename T, std::size_t N> struct is_array<const T[N]>
{ BOOST_DECL_MC(bool, value, true); };
template <typename T, std::size_t N> struct is_array<volatile T[N]>
{ BOOST_DECL_MC(bool, value, true); };
template <typename T, std::size_t N> struct is_array<const volatile T[N]>
{ BOOST_DECL_MC(bool, value, true); };
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace detail{
struct pointer_helper
{
pointer_helper(const volatile void*);
};
yes_type is_pointer_helper(pointer_helper);
no_type is_pointer_helper(...);
template <class T>
yes_type is_pointer_helper3(T (*)(void));
template <class T, class A1>
yes_type is_pointer_helper3(T (*)(A1));
template <class T, class A1, class A2>
yes_type is_pointer_helper3(T (*)(A1, A2));
template <class T, class A1, class A2, class A3>
yes_type is_pointer_helper3(T (*)(A1, A2, A3));
no_type is_pointer_helper3(...);
yes_type is_array_helper(const volatile void*, const volatile void*);
template <class T>
no_type is_array_helper(T*const volatile*, const volatile void*);
no_type is_array_helper(...);
} // namespace detail
template <typename T>
struct is_array
{
private:
static T t;
public:
BOOST_DECL_MC(bool, value, (1 == sizeof(detail::is_array_helper(&t, t)))
& !is_reference<T>::value
& !(1 == sizeof(detail::is_pointer_helper3(t))) );
};
template <>
struct is_array<void>
{
BOOST_DECL_MC(bool, value, false);
};
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <>
struct is_array<const void>
{
BOOST_DECL_MC(bool, value, false);
};
template <>
struct is_array<volatile void>
{
BOOST_DECL_MC(bool, value, false);
};
template <>
struct is_array<const volatile void>
{
BOOST_DECL_MC(bool, value, false);
};
#endif
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
/**********************************************
*
* is_pointer
*
**********************************************/
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace detail{
template <typename T> struct is_pointer_helper
{ BOOST_DECL_MC(bool, value, false); };
template <typename T> struct is_pointer_helper<T*>
{ BOOST_DECL_MC(bool, value, true); };
template <typename T> struct is_pointer_helper<T*const>
{ BOOST_DECL_MC(bool, value, true); };
template <typename T> struct is_pointer_helper<T*volatile>
{ BOOST_DECL_MC(bool, value, true); };
template <typename T> struct is_pointer_helper<T*const volatile>
{ BOOST_DECL_MC(bool, value, true); };
} // namespace detail
template <typename T> struct is_pointer
{ BOOST_DECL_MC(bool, value, (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper<T>::value, !::boost::is_member_pointer<T>::value>::value)); };
#else
template <typename T>
struct is_pointer
{
private:
static T t;
public:
BOOST_DECL_MC(bool, value,
(::boost::type_traits::ice_and<
!::boost::is_reference<T>::value,
!::boost::is_array<T>::value,
(::boost::type_traits::ice_or<
(1 == sizeof(detail::is_pointer_helper(t))),
(1 == sizeof(detail::is_pointer_helper3(t)))
>::value)
>::value ) );
};
template <>
struct is_pointer <void>
{
BOOST_DECL_MC(bool, value, false);
};
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <>
struct is_pointer <const void>
{
BOOST_DECL_MC(bool, value, false);
};
template <>
struct is_pointer <volatile void>
{
BOOST_DECL_MC(bool, value, false);
};
template <>
struct is_pointer <const volatile void>
{
BOOST_DECL_MC(bool, value, false);
};
#endif
#endif
/**********************************************
*
* is_reference
*
**********************************************/
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T> struct is_reference
{ BOOST_DECL_MC(bool, value, false); };
template <typename T> struct is_reference<T&>
{ BOOST_DECL_MC(bool, value, true); };
#if defined(__BORLANDC__)
// these are illegal specialisations; cv-qualifies applied to
// references have no effect according to [8.3.2p1],
// C++ Builder requires them though as it treats cv-qualified
// references as distinct types...
template <typename T> struct is_reference<T&const>
{ BOOST_DECL_MC(bool, value, true); };
template <typename T> struct is_reference<T&volatile>
{ BOOST_DECL_MC(bool, value, true); };
template <typename T> struct is_reference<T&const volatile>
{ BOOST_DECL_MC(bool, value, true); };
#endif
#else
# ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable: 4181)
# endif // BOOST_MSVC
template <typename T> struct is_reference
{
private:
typedef T const volatile cv_t;
public:
BOOST_DECL_MC(bool, value, (::boost::type_traits::ice_or<!::boost::is_const<cv_t>::value, !::boost::is_volatile<cv_t>::value>::value));
};
template <> struct is_reference<void>
{
BOOST_DECL_MC(bool, value, false);
};
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <> struct is_reference<const void>
{ BOOST_DECL_MC(bool, value, false); };
template <> struct is_reference<volatile void>
{ BOOST_DECL_MC(bool, value, false); };
template <> struct is_reference<const volatile void>
{ BOOST_DECL_MC(bool, value, false); };
#endif
# ifdef BOOST_MSVC
# pragma warning(pop)
# endif // BOOST_MSVC
#endif
/**********************************************
*
* is_union
*
**********************************************/
template <typename T> struct is_union
{
private:
typedef typename remove_cv<T>::type cvt;
public:
BOOST_DECL_MC(bool, value, BOOST_IS_UNION(cvt));
};
/**********************************************
*
* is_enum
*
**********************************************/
namespace detail{
struct int_convertible
{
int_convertible(int);
};
} // namespace detail
#ifndef __BORLANDC__
template <typename T> struct is_enum
{
BOOST_DECL_MC(bool, value,
(::boost::type_traits::ice_and<
!::boost::is_arithmetic<T>::value,
!::boost::is_reference<T>::value,
::boost::is_convertible<T, detail::int_convertible>::value
>::value));
};
#else // __BORLANDC__
//
// buggy is_convertible prevents working
// implementation of is_enum:
template <typename T> struct is_enum
{
public:
BOOST_DECL_MC(bool, value, BOOST_IS_ENUM(T));
};
#endif
/**********************************************
*
* is_member_pointer
*
**********************************************/
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T> struct is_member_pointer
{ BOOST_DECL_MC(bool, value, false); };
template <typename T, typename U> struct is_member_pointer<U T::*>
{ BOOST_DECL_MC(bool, value, true); };
#ifdef __GNUC__
// gcc workaround (JM 02 Oct 2000)
template <typename T, typename U> struct is_member_pointer<U (T::*)(void)>
{ BOOST_DECL_MC(bool, value, true); };
template <typename T, typename U, typename A1> struct is_member_pointer<U (T::*)(A1)>
{ BOOST_DECL_MC(bool, value, true); };
template <typename T, typename U, typename A1, typename A2> struct is_member_pointer<U (T::*)(A1, A2)>
{ BOOST_DECL_MC(bool, value, true); };
template <typename T, typename U, typename A1, typename A2, typename A3> struct is_member_pointer<U (T::*)(A1, A2, A3)>
{ BOOST_DECL_MC(bool, value, true); };
template <typename T, typename U, typename A1, typename A2, typename A3, typename A4> struct is_member_pointer<U (T::*)(A1, A2, A3, A4)>
{ BOOST_DECL_MC(bool, value, true); };
template <typename T, typename U, typename A1, typename A2, typename A3, typename A4, typename A5> struct is_member_pointer<U (T::*)(A1, A2, A3, A4, A5)>
{ BOOST_DECL_MC(bool, value, true); };
#endif
#else
namespace detail{
template <class T, class U>
yes_type is_member_pointer_helper(T (U::*));
template <class T, class U>
yes_type is_member_pointer_helper(T (U::*)(void));
template <class T, class U, class A1>
yes_type is_member_pointer_helper(T (U::*)(A1));
template <class T, class U, class A1, class A2>
yes_type is_member_pointer_helper(T (U::*)(A1, A2));
template <class T, class U, class A1, class A2, class A3>
yes_type is_member_pointer_helper(T (U::*)(A1, A2, A3));
template <class T, class U, class A1, class A2, class A3, class A4>
yes_type is_member_pointer_helper(T (U::*)(A1, A2, A3, A4));
template <class T, class U, class A1, class A2, class A3, class A4, class A5>
yes_type is_member_pointer_helper(T (U::*)(A1, A2, A3, A4, A5));
no_type is_member_pointer_helper(...);
}
template <typename T>
struct is_member_pointer
{
private:
static T t;
public:
BOOST_DECL_MC(bool, value, (1 == sizeof(detail::is_member_pointer_helper(t))) );
};
template <>
struct is_member_pointer<void>
{
BOOST_DECL_MC(bool, value, false);
};
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <>
struct is_member_pointer<const void>
{
BOOST_DECL_MC(bool, value, false);
};
template <>
struct is_member_pointer<volatile void>
{
BOOST_DECL_MC(bool, value, false);
};
template <>
struct is_member_pointer<const volatile void>
{
BOOST_DECL_MC(bool, value, false);
};
#endif
#endif
} // namespace boost
#endif // COMPOSITE_TYPE_TRAITS_HPP

View File

@ -1,220 +0,0 @@
// Copyright (C) 2000 John Maddock (john_maddock@compuserve.com)
// Copyright (C) 2000 Jeremy Siek (jsiek@lsc.nd.edu)
// Copyright (C) 1999, 2000 Jaakko J<>rvi (jaakko.jarvi@cs.utu.fi)
//
// Permission to copy and use 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.
#ifndef BOOST_CONVERSION_TYPE_TRAITS_HPP
#define BOOST_CONVERSION_TYPE_TRAITS_HPP
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
#ifndef BOOST_FWD_TYPE_TRAITS_HPP
#include <boost/type_traits/fwd.hpp>
#endif
#ifndef ARITHMETIC_TYPE_TRAITS_HPP
#include <boost/type_traits/arithmetic_traits.hpp>
#endif
//
// is one type convertable to another?
//
// there are multiple versions of the is_convertible
// template, almost every compiler seems to require its
// own version:
namespace boost{
#ifdef BOOST_MSVC
//
// MS specific version:
//
namespace detail{
// This workaround is necessary to handle when From is void
// which is normally taken care of by the partial specialization
// of the is_convertible class.
using ::boost::type_traits::yes_type;
using ::boost::type_traits::no_type;
struct from_not_void_conversion {
template <class From, class To>
struct bind {
static no_type check(...);
static yes_type check(To);
public:
void foo(); // avoid warning about all members being private
static From from;
enum { exists = sizeof( check(from) ) == sizeof(yes_type) };
};
};
struct from_is_void_conversion {
template <class From, class To>
struct bind {
enum { exists = ::boost::is_void<To>::value };
};
};
template <class From>
struct conversion_helper {
typedef from_not_void_conversion type;
};
template <>
struct conversion_helper<void> {
typedef from_is_void_conversion type;
};
} // namespace detail
template <class From, class To>
struct is_convertible
{
typedef typename detail::conversion_helper<From>::type Selector;
typedef Selector::template bind<From,To> Conversion;
public:
enum { value = Conversion::exists };
};
#elif defined(__BORLANDC__)
//
// special version for Borland compilers
// this version breaks when used for some
// UDT conversions:
//
template <class From, class To>
struct is_convertible_helper
{
private:
// This workaround for Borland breaks the EDG C++ frontend,
// so we only use it for Borland.
template <class T>
struct checker
{
static type_traits::no_type check(...);
static type_traits::yes_type check(T);
};
static From from;
public:
static const bool value = sizeof( checker<To>::check(from) ) == sizeof(type_traits::yes_type);
void foo(); // avoid warning about all members being private
};
template <class From, class To>
struct is_convertible
{
private:
typedef is_convertible_helper<From, To> c_type;
enum{ v = c_type::value };
char force_it[v ? 1 : 2];
public:
static const bool value = is_convertible_helper<From, To>::value;
};
template <class From>
struct is_convertible<From, void>
{
static const bool value = false;
};
template <class To>
struct is_convertible<void, To>
{
static const bool value = false;
};
template <>
struct is_convertible<void, void>
{
static const bool value = true;
};
#elif defined(__GNUC__)
//
// special version for gcc compiler
//
namespace detail{
struct any_conversion
{
template <class T>
any_conversion(const T&);
};
template <class T>
struct checker
{
static boost::type_traits::no_type check(any_conversion ...);
static boost::type_traits::yes_type check(T, int);
};
} // namespace detail
template <class From, class To>
struct is_convertible
{
private:
static From from;
public:
static const bool value = sizeof( detail::checker<To>::check(from, 0) ) == sizeof(type_traits::yes_type);
void foo(); // avoid warning about all members being private
};
template <class From>
struct is_convertible<From, void>
{
static const bool value = false;
};
template <class To>
struct is_convertible<void, To>
{
static const bool value = false;
};
template <>
struct is_convertible<void, void>
{
static const bool value = true;
};
#else
template <class From, class To>
struct is_convertible
{
private:
static type_traits::no_type check(...);
static type_traits::yes_type check(To);
static From from;
public:
BOOST_DECL_MC(bool, value, sizeof( check(from) ) == sizeof(type_traits::yes_type));
void foo(); // avoid warning about all members being private
};
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <class From>
struct is_convertible<From, void>
{
BOOST_DECL_MC(bool, value, false);
};
template <class To>
struct is_convertible<void, To>
{
BOOST_DECL_MC(bool, value, false);
};
template <>
struct is_convertible<void, void>
{
BOOST_DECL_MC(bool, value, true);
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#endif // is_convertible
} // namespace boost
#endif // include guard

View File

@ -1,214 +0,0 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 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.
//
// See http://www.boost.org for most recent version including documentation.
//
// defines traits classes for cv-qualified types:
// is_const, is_volatile, remove_const, remove_volatile, remove_cv.
//
#ifndef CV_TYPE_TRAITS_HPP
#define CV_TYPE_TRAITS_HPP
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
#ifndef BOOST_FWD_TYPE_TRAITS_HPP
#include <boost/type_traits/fwd.hpp>
#endif
namespace boost{
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace detail{
//
// implementation helper:
//
template <class T>
struct cv_traits_imp{};
template <class T>
struct cv_traits_imp<T*>
{
BOOST_DECL_MC(bool, is_const, false);
BOOST_DECL_MC(bool, is_volatile, false);
typedef T unqualified_type;
};
template <class T>
struct cv_traits_imp<const T*>
{
BOOST_DECL_MC(bool, is_const, true);
BOOST_DECL_MC(bool, is_volatile, false);
typedef T unqualified_type;
};
template <class T>
struct cv_traits_imp<volatile T*>
{
BOOST_DECL_MC(bool, is_const, false);
BOOST_DECL_MC(bool, is_volatile, true);
typedef T unqualified_type;
};
template <class T>
struct cv_traits_imp<const volatile T*>
{
BOOST_DECL_MC(bool, is_const, true);
BOOST_DECL_MC(bool, is_volatile, true);
typedef T unqualified_type;
};
template <class T, bool is_vol>
struct remove_const_helper
{
typedef T type;
};
template <class T>
struct remove_const_helper<T, true>
{
typedef volatile T type;
};
template <class T, bool is_vol>
struct remove_volatile_helper
{
typedef T type;
};
template <class T>
struct remove_volatile_helper<T, true>
{
typedef const T type;
};
} // namespace detail
// * convert a type T to a non-volatile type - remove_volatile<T>
template <typename T>
struct remove_volatile
{
typedef typename detail::cv_traits_imp<T*>::unqualified_type uq_type;
typedef typename detail::remove_volatile_helper<uq_type, ::boost::is_const<T>::value>::type type;
};
template <typename T> struct remove_volatile<T&>{ typedef T& type; };
// * convert a type T to non-const type - remove_const<T>
template <typename T>
struct remove_const
{
typedef typename detail::cv_traits_imp<T*>::unqualified_type uq_type;
typedef typename detail::remove_const_helper<uq_type, ::boost::is_volatile<T>::value>::type type;
};
template <typename T> struct remove_const<T&>{ typedef T& type; };
// convert a type T to a non-cv-qualified type - remove_cv<T>
template <typename T>
struct remove_cv
{
typedef typename detail::cv_traits_imp<T*>::unqualified_type type;
};
template <typename T> struct remove_cv<T&>{ typedef T& type; };
//* is a type T declared const - is_const<T>
template <typename T>
struct is_const
{
BOOST_DECL_MC(bool, value, detail::cv_traits_imp<T*>::is_const);
};
//* is a type T declared volatile - is_volatile<T>
template <typename T>
struct is_volatile
{
BOOST_DECL_MC(bool, value, detail::cv_traits_imp<T*>::is_volatile);
};
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// The following three don't work:
template <typename T> struct remove_volatile{ typedef T type; };
template <typename T> struct remove_const{ typedef T type; };
template <typename T> struct remove_cv{ typedef T type; };
namespace detail{
using ::boost::type_traits::yes_type;
using ::boost::type_traits::no_type;
yes_type is_const_helper(const volatile void*);
no_type is_const_helper(volatile void *);
yes_type is_volatile_helper(const volatile void*);
no_type is_volatile_helper(const void *);
}
template <typename T>
struct is_const
{
private:
static T t;
public:
BOOST_DECL_MC(bool, value, (sizeof(detail::yes_type) == sizeof(detail::is_const_helper(&t))));
};
template <>
struct is_const<void>
{
BOOST_DECL_MC(bool, value, false);
};
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <>
struct is_const<const void>
{
BOOST_DECL_MC(bool, value, true);
};
template <>
struct is_const<volatile void>
{
BOOST_DECL_MC(bool, value, false);
};
template <>
struct is_const<const volatile void>
{
BOOST_DECL_MC(bool, value, true);
};
#endif
template <typename T>
struct is_volatile
{
private:
static T t;
public:
BOOST_DECL_MC(bool, value, (sizeof(detail::yes_type) == sizeof(detail::is_volatile_helper(&t))));
};
template <>
struct is_volatile<void>
{
BOOST_DECL_MC(bool, value, false);
};
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <>
struct is_volatile<const void>
{
BOOST_DECL_MC(bool, value, false);
};
template <>
struct is_volatile<volatile void>
{
BOOST_DECL_MC(bool, value, true);
};
template <>
struct is_volatile<const volatile void>
{
BOOST_DECL_MC(bool, value, true);
};
#endif
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace boost
#endif // CV_TYPE_TRAITS_HPP

View File

@ -1,138 +0,0 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 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.
//
// See http://www.boost.org for most recent version including documentation.
//
// forward declarations of type_traits classes
//
#ifndef BOOST_FWD_TYPE_TRAITS_HPP
#define BOOST_FWD_TYPE_TRAITS_HPP
#include <cstdlib>
#ifndef BOOST_CONFIG_HPP
#include <boost/config.hpp>
#endif
//
// Helper macros for builtin compiler support.
// If your compiler has builtin support for any of the following
// traits concepts, then redefine the appropriate macros to pick
// up on the compiler support:
//
// (these should largely ignore cv-qualifiers)
// BOOST_IS_CLASS(T) should evaluate to true if T is a class or struct type
// BOOST_IS_ENUM(T) should evaluate to true if T is an enumerator type
// BOOST_IS_UNION(T) should evaluate to true if T is a union type
// BOOST_IS_POD(T) should evaluate to true if T is a POD type
// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty struct or union
// BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
// BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
// BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
// BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect
#define BOOST_IS_CLASS(T) false
#define BOOST_IS_ENUM(T) false
#define BOOST_IS_UNION(T) false
#define BOOST_IS_POD(T) false
#define BOOST_IS_EMPTY(T) false
#define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) false
#define BOOST_HAS_TRIVIAL_COPY(T) false
#define BOOST_HAS_TRIVIAL_ASSIGN(T) false
#define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) false
namespace boost{
//
// forward declare all type traits templates here
//
// conversion_traits.hpp:
template <class From, class To>
struct is_convertible;
// alignment_traits.hpp:
template <class T>
struct alignment_of;
// arithmetic_traits.hpp:
template <class T>
struct is_void;
template <class T>
struct is_integral;
template <class T>
struct is_float;
template <class T>
struct is_arithmetic;
template <class T>
struct is_fundamental;
// cv_traits.hpp:
template <class T>
struct is_const;
template <class T>
struct is_volatile;
template <class T>
struct remove_const;
template <class T>
struct remove_volatile;
template <class T>
struct remove_cv;
// composite_traits.hpp:
template <class T>
struct is_array;
template <class T>
struct is_pointer;
template <class T>
struct is_reference;
template <class T>
struct is_member_pointer;
template <class T>
struct is_enum;
template <class T>
struct is_union;
// object_traits.hpp:
template <class T>
struct is_object;
template <class T>
struct is_scalar;
template <class T>
struct is_class;
template <class T>
struct is_compound;
template <class T>
struct is_POD;
template <class T>
struct has_trivial_constructor;
template <class T>
struct has_trivial_copy;
template <class T>
struct has_trivial_assign;
template <class T>
struct has_trivial_destructor;
template <class T>
struct is_empty;
// transform_traits.hpp:
template <class T>
struct remove_reference;
template <class T>
struct add_reference;
template <class T>
struct remove_bounds;
template <class T>
struct remove_pointer;
// same_traits.hpp:
template <class T, class U>
struct is_same;
} // namespace boost
#endif // BOOST_FWD_TYPE_TRAITS_HPP

View File

@ -1,75 +0,0 @@
// (C) Copyright John Maddock 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.
// See http://www.boost.org for most recent version including documentation.
//
// macros and helpers for working with integral-constant-expressions.
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#define BOOST_ICE_TYPE_TRAITS_HPP
#ifndef BOOST_CONFIG_HPP
#include <boost/config.hpp>
#endif
#ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
#define BOOST_DECL_MC(type, name, value) enum{name = value }
#define BOOST_DECL_MC2(type, name, v1, v2) enum{name = v1,v2 }
#else
#define BOOST_DECL_MC(type, name, value) static const type name = value
#define BOOST_DECL_MC2(type, name, v1, v2) static const type name = v1,v2
#endif
namespace boost{
namespace type_traits{
typedef char yes_type;
typedef double no_type;
template <bool b>
struct ice_not
{ BOOST_DECL_MC(bool, value, true); };
template <>
struct ice_not<true>
{ BOOST_DECL_MC(bool, value, false); };
template <bool b1, bool b2, bool b3 = false, bool b4 = false, bool b5 = false, bool b6 = false, bool b7 = false>
struct ice_or;
template <bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7>
struct ice_or
{
BOOST_DECL_MC(bool, value, true);
};
template <>
struct ice_or<false, false, false, false, false, false, false>
{
BOOST_DECL_MC(bool, value, false);
};
template <bool b1, bool b2, bool b3 = true, bool b4 = true, bool b5 = true>
struct ice_and;
template <bool b1, bool b2, bool b3, bool b4, bool b5>
struct ice_and
{
BOOST_DECL_MC(bool, value, false);
};
template <>
struct ice_and<true, true, true, true, true>
{
BOOST_DECL_MC(bool, value, true);
};
} // namespace type_traits
} // namespace boost
#endif // BOOST_ICE_TYPE_TRAITS_HPP

View File

@ -1,313 +0,0 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 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.
//
// See http://www.boost.org for most recent version including documentation.
//
// defines object traits classes:
// is_object, is_scalar, is_class, is_compound, is_POD,
// has_trivial_constructor, has_trivial_copy, has_trivial_assign,
// has_trivial_destructor, is_empty.
//
#ifndef OBJECT_TYPE_TRAITS_HPP
#define OBJECT_TYPE_TRAITS_HPP
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
#ifndef BOOST_FWD_TYPE_TRAITS_HPP
#include <boost/type_traits/fwd.hpp>
#endif
#ifndef COMPOSITE_TYPE_TRAITS_HPP
#include <boost/type_traits/composite_traits.hpp>
#endif
#ifndef ARITHMETIC_TYPE_TRAITS_HPP
#include <boost/type_traits/arithmetic_traits.hpp>
#endif
namespace boost{
/**********************************************
*
* is_object
*
**********************************************/
template <typename T>
struct is_object
{
BOOST_DECL_MC(bool, value,
(::boost::type_traits::ice_and<
!::boost::is_reference<T>::value,
!::boost::is_void<T>::value
>::value));
};
/**********************************************
*
* is_scalar
*
**********************************************/
template <typename T>
struct is_scalar
{
BOOST_DECL_MC(bool, value,
(::boost::type_traits::ice_or<
::boost::is_arithmetic<T>::value,
::boost::is_enum<T>::value,
::boost::is_pointer<T>::value,
::boost::is_member_pointer<T>::value
>::value));
};
/**********************************************
*
* is_class
*
**********************************************/
template <typename T>
struct is_class
{
BOOST_DECL_MC(bool, value,
(::boost::type_traits::ice_and<
!::boost::is_union<T>::value,
!::boost::is_scalar<T>::value,
!::boost::is_array<T>::value,
!::boost::is_reference<T>::value,
!::boost::is_void<T>::value
>::value));
};
/**********************************************
*
* is_compound
*
**********************************************/
template <typename T> struct is_compound
{
BOOST_DECL_MC(bool, value,
(::boost::type_traits::ice_or<
::boost::is_array<T>::value,
::boost::is_pointer<T>::value,
::boost::is_reference<T>::value,
::boost::is_class<T>::value,
::boost::is_union<T>::value,
::boost::is_enum<T>::value,
::boost::is_member_pointer<T>::value
>::value));
};
/**********************************************
*
* is_POD
*
**********************************************/
template <typename T> struct is_POD
{
BOOST_DECL_MC(bool, value,
(::boost::type_traits::ice_or<
::boost::is_scalar<T>::value,
BOOST_IS_POD(T)
>::value));
};
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T, std::size_t sz>
struct is_POD<T[sz]>
{
BOOST_DECL_MC(bool, value, ::boost::is_POD<T>::value);
};
#endif
/**********************************************
*
* has_trivial_constructor
*
**********************************************/
template <typename T>
struct has_trivial_constructor
{
BOOST_DECL_MC(bool, value,
(::boost::type_traits::ice_or<
::boost::is_POD<T>::value,
BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
>::value));
};
/**********************************************
*
* has_trivial_copy
*
**********************************************/
template <typename T>
struct has_trivial_copy
{
BOOST_DECL_MC(bool, value,
(::boost::type_traits::ice_and<
::boost::type_traits::ice_or<
::boost::is_POD<T>::value,
BOOST_HAS_TRIVIAL_COPY(T)
>::value,
!::boost::is_volatile<T>::value
>::value));
};
/**********************************************
*
* has_trivial_assign
*
**********************************************/
template <typename T>
struct has_trivial_assign
{
BOOST_DECL_MC(bool, value,
(::boost::type_traits::ice_and<
::boost::type_traits::ice_or<
::boost::is_POD<T>::value,
BOOST_HAS_TRIVIAL_ASSIGN(T)
>::value,
!::boost::is_const<T>::value,
!::boost::is_volatile<T>::value
>::value));
};
/**********************************************
*
* has_trivial_destructor
*
**********************************************/
template <typename T>
struct has_trivial_destructor
{
BOOST_DECL_MC(bool, value,
(::boost::type_traits::ice_or<
::boost::is_POD<T>::value,
BOOST_HAS_TRIVIAL_DESTRUCTOR(T)
>::value));
};
/**********************************************
*
* is_empty
*
**********************************************/
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace detail{
template <typename T>
struct empty_helper_t1 : public T
{
#ifdef __MWERKS__
empty_helper_t1(); // hh compiler bug workaround
#endif
int i[256];
};
struct empty_helper_t2 { int i[256]; };
template <typename T, bool b, bool b2>
struct empty_helper{ BOOST_DECL_MC(bool, value, false); };
template <typename T>
struct empty_helper<T, true, false>
{
BOOST_DECL_MC(bool, value,
(sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2)));
};
}
template <typename T>
struct is_empty
{
private:
typedef typename remove_cv<T>::type cvt;
public:
BOOST_DECL_MC(bool, value,
(::boost::type_traits::ice_or<
::boost::detail::empty_helper<T,
::boost::is_class<T>::value ,
::boost::is_convertible<T,int>::value
>::value,
BOOST_IS_EMPTY(cvt)
>::value));
};
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#if defined(BOOST_MSVC6_MEMBER_TEMPLATES) || !defined(BOOST_NO_MEMBER_TEMPLATES)
namespace detail{
template <typename T>
struct empty_helper_t1 : public T
{
int i[256];
};
struct empty_helper_t2 { int i[256]; };
template <typename T>
struct empty_helper_base
{
enum{ value = (sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2)) };
};
template <typename T>
struct empty_helper_nonbase
{
enum{ value = false };
};
template <bool base>
struct empty_helper_chooser
{
template <class T>
struct rebind
{
typedef empty_helper_nonbase<T> type;
};
};
template <>
struct empty_helper_chooser<true>
{
template <class T>
struct rebind
{
typedef empty_helper_base<T> type;
};
};
} // namespace detail
template <typename T>
struct is_empty
{
private:
typedef detail::empty_helper_chooser<
!is_convertible<T,int>::value
& !is_convertible<T,double>::value
& !is_pointer<T>::value
& !is_member_pointer<T>::value
& !is_array<T>::value
& !is_convertible<T, const volatile void*>::value> chooser;
typedef typename chooser::template rebind<T> bound_type;
typedef typename bound_type::type eh_type;
public:
enum{ value = eh_type::value | BOOST_IS_EMPTY(T) };
};
#else
template <typename T> struct is_empty
{ enum{ value = BOOST_IS_EMPTY(T) }; };
#endif // defined(BOOST_MSVC6_MEMBER_TEMPLATES) || !defined(BOOST_NO_MEMBER_TEMPLATES)
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace boost
#endif // OBJECT_TYPE_TRAITS_HPP

View File

@ -1,89 +0,0 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 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.
//
// See http://www.boost.org for most recent version including documentation.
//
// defines is_same:
#ifndef SAME_TRAITS_HPP
#define SAME_TRAITS_HPP
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
#ifndef BOOST_FWD_TYPE_TRAITS_HPP
#include <boost/type_traits/fwd.hpp>
#endif
#if !defined(COMPOSITE_TYPE_TRAITS_HPP) && defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#include <boost/type_traits/composite_traits.hpp>
#endif
namespace boost{
/**********************************************
*
* is_same
*
**********************************************/
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T, typename U>
struct is_same
{ BOOST_DECL_MC(bool, value, false); };
template <typename T>
struct is_same<T, T>
{ BOOST_DECL_MC(bool, value, true); };
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#ifdef BOOST_MSVC
namespace detail{
template<class T1>
struct is_same_part_1 {
template<class T2> struct part_2 { enum { value = false }; };
template<> struct part_2<T1> { enum { value = true }; };
};
} // namespace detail
template<class T1, class T2>
struct is_same : detail::is_same_part_1<T1>::template part_2<T2> {};
#else // BOOST_MSVC
namespace detail{
template <class T>
::boost::type_traits::yes_type is_same_helper(T*, T*);
::boost::type_traits::no_type is_same_helper(...);
}
template <typename T, typename U>
struct is_same
{
private:
static T t;
static U u;
public:
BOOST_DECL_MC(bool, value,
(::boost::type_traits::ice_and<
(sizeof(type_traits::yes_type) == sizeof(detail::is_same_helper(&t,&u))),
(::boost::is_reference<T>::value == ::boost::is_reference<U>::value),
(sizeof(T) == sizeof(U))
>::value));
};
#endif // BOOST_MSVC
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace boost
#endif // SAME_TRAITS_HPP

View File

@ -1,152 +0,0 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 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.
//
// See http://www.boost.org for most recent version including documentation.
//
// defines traits classes for transforming one type to another:
// remove_reference, add_reference, remove_bounds, remove_pointer.
//
#ifndef TRANSFORM_TRAITS_HPP
#define TRANSFORM_TRAITS_HPP
#ifndef BOOST_ICE_TYPE_TRAITS_HPP
#include <boost/type_traits/ice.hpp>
#endif
#ifndef BOOST_FWD_TYPE_TRAITS_HPP
#include <boost/type_traits/fwd.hpp>
#endif
#if !defined(COMPOSITE_TYPE_TRAITS_HPP) && defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#include <boost/type_traits/composite_traits.hpp>
#endif
namespace boost{
/**********************************************
*
* remove_reference
*
**********************************************/
template <typename T>
struct remove_reference
{ typedef T type; };
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T>
struct remove_reference<T&>
{ typedef T type; };
#endif
#if defined(__BORLANDC__) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
// these are illegal specialisations; cv-qualifies applied to
// references have no effect according to [8.3.2p1],
// C++ Builder requires them though as it treats cv-qualified
// references as distinct types...
template <typename T>
struct remove_reference<T&const>
{ typedef T type; };
template <typename T>
struct remove_reference<T&volatile>
{ typedef T type; };
template <typename T>
struct remove_reference<T&const volatile>
{ typedef T type; };
#endif
/**********************************************
*
* add_reference
*
**********************************************/
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T>
struct add_reference
{ typedef T& type; };
template <typename T>
struct add_reference<T&>
{ typedef T& type; };
#elif defined(BOOST_MSVC6_MEMBER_TEMPLATES) || !defined(BOOST_NO_MEMBER_TEMPLATES)
namespace detail{
template <bool>
struct reference_adder
{
template <class T>
struct rebind
{
typedef T& type;
};
};
template <>
struct reference_adder<true>
{
template <class T>
struct rebind
{
typedef T type;
};
};
} // namespace detail
template <typename T>
struct add_reference
{
private:
typedef typename detail::reference_adder< ::boost::is_reference<T>::value>::template rebind<T> binder;
public:
typedef typename binder::type type;
};
#else
template <typename T>
struct add_reference
{ typedef T& type; };
#endif
/**********************************************
*
* remove_bounds
*
**********************************************/
template <typename T>
struct remove_bounds
{ typedef T type; };
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T, std::size_t N>
struct remove_bounds<T[N]>
{ typedef T type; };
#endif
/**********************************************
*
* remove_pointer
*
**********************************************/
template <typename T>
struct remove_pointer
{ typedef T type; };
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T>
struct remove_pointer<T*>
{ typedef T type; };
template <typename T>
struct remove_pointer<T*const>
{ typedef T type; };
template <typename T>
struct remove_pointer<T*volatile>
{ typedef T type; };
template <typename T>
struct remove_pointer<T*const volatile>
{ typedef T type; };
#endif
} // namespace boost
#endif // TRANSFORM_TRAITS_HPP

View File

@ -1,324 +0,0 @@
// (C) Copyright John Maddock 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.
// common test code for type-traits tests
// WARNING: contains code as well as declarations!
#ifndef BOOST_TYPE_TRAITS_TEST_HPP
#define BOOST_TYPE_TRAITS_TEST_HPP
#include <iostream>
#include <typeinfo>
//
// define tests here
unsigned failures = 0;
unsigned test_count = 0;
//
// This must get defined within the test file.
// All compilers have bugs, set this to the number of
// regressions *expected* from a given compiler,
// if there are no workarounds for the bugs, *and*
// the regressions have been investigated.
//
extern unsigned int expected_failures;
//
// proc check_result()
// Checks that there were no regressions:
//
int check_result(int argc, char** argv)
{
std::cout << test_count << " tests completed, "
<< failures << " failures found, "
<< expected_failures << " failures expected from this compiler." << std::endl;
if((argc == 2)
&& (argv[1][0] == '-')
&& (argv[1][1] == 'a')
&& (argv[1][2] == 0))
{
std::cout << "Press any key to continue...";
std::cin.get();
}
return (failures == expected_failures) ? 0 : failures;
}
//
// this one is to verify that a constant is indeed a
// constant-integral-expression:
//
template <bool>
struct checker
{
static void check(bool, bool, const char*){ ++test_count; }
};
template <>
struct checker<false>
{
static void check(bool o, bool n, const char* name)
{
++test_count;
++failures;
std::cout << "checking value of " << name << "...failed" << std::endl;
std::cout << "\tfound: " << n << " expected " << o << std::endl;
}
};
template <class T, class U>
struct type_checker
{
static void check(const char* TT, const char* TU, const char* expression)
{
++test_count;
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
if((typeid(T) != typeid(U))
|| (::boost::is_reference<T>::value != ::boost::is_reference<U>::value)
|| (::boost::is_const<T>::value != ::boost::is_const<U>::value)
|| (::boost::is_volatile<T>::value != ::boost::is_volatile<U>::value))
{
#endif
++failures;
std::cout << "checking type of " << expression << "...failed" << std::endl;
std::cout << " expected type was " << TT << std::endl;
std::cout << " typeid(" << TT << ") was: " << typeid(T).name() << std::endl;
std::cout << " typeid(" << TU << ") was: " << typeid(U).name() << std::endl;
std::cout << " In template class " << typeid(type_checker<T,U>).name() << std::endl;
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
}
#endif
}
};
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <class T>
struct type_checker<T,T>
{
static void check(const char*, const char*, const char*)
{
++test_count;
}
};
#endif
#define value_test(v, x) checker<(v == x)>::check(v, x, #x);
#define value_fail(v, x) \
++test_count; \
++failures; \
std::cout << "checking value of " << #x << "...failed" << std::endl; \
std::cout << " " #x " does not compile on this compiler" << std::endl;
#define type_test(v, x) type_checker<v,x>::check(#v, #x, #x);
#define type_test3(v, x, z) type_checker<v,x,z>::check(#v, #x "," #z, #x "," #z);
template <class T>
struct test_align
{
struct padded
{
char c;
T t;
};
static void do_it()
{
padded p;
unsigned a = reinterpret_cast<char*>(&(p.t)) - reinterpret_cast<char*>(&p);
++test_count;
if(a != boost::alignment_of<T>::value)
{
++failures;
std::cout << "checking value of " << typeid(boost::alignment_of<T>).name() << "...failed" << std::endl;
std::cout << "\tfound: " << boost::alignment_of<T>::value << " expected " << a << std::endl;
}
}
};
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <class T>
struct test_align<T&>
{
static void do_it()
{
//
// we can't do the usual test because we can't take the address
// of a reference, so check that the result is the same as for a
// pointer type instead:
unsigned a = boost::alignment_of<T*>::value;
++test_count;
if(a != boost::alignment_of<T&>::value)
{
++failures;
std::cout << "checking value of " << typeid(boost::alignment_of<T&>).name() << "...failed" << std::endl;
std::cout << "\tfound: " << boost::alignment_of<T&>::value << " expected " << a << std::endl;
}
}
};
#endif
#define align_test(T) test_align<T>::do_it()
//
// the following code allows us to test that a particular
// template functions correctly when instanciated inside another template
// (some bugs only show up in that situation). For each template
// we declare one NESTED_DECL(classname) that sets up the template class
// and multiple NESTED_TEST(classname, template-arg) declarations, to carry
// the actual tests:
template <bool b>
struct nested_test
{
typedef nested_test type;
bool run_time_value;
const char* what;
nested_test(bool b2, const char* w) : run_time_value(b2), what(w) { check(); }
void check()
{
++test_count;
if(b != run_time_value)
{
++failures;
std::cerr << "Mismatch between runtime and compile time values in " << what << std::endl;
}
}
};
#define NESTED_DECL(what)\
template <class T> \
struct BOOST_TT_JOIN(nested_tester_,what){\
nested_test< (0 != ::boost::what<T>::value)> tester;\
BOOST_TT_JOIN(nested_tester_,what)(const char* s) : tester(::boost::what<T>::value, s){}\
};
#define NESTED_TEST(what, with)\
{BOOST_TT_JOIN(nested_tester_,what)<with> check(#what "<" #with ">");}
#define BOOST_TT_JOIN( X, Y ) BOOST_DO_TT_JOIN( X, Y )
#define BOOST_DO_TT_JOIN( X, Y ) X##Y
//
// define some types to test with:
//
enum enum_UDT{ one, two, three };
struct UDT
{
UDT();
~UDT();
UDT(const UDT&);
UDT& operator=(const UDT&);
int i;
void f1();
int f2();
int f3(int);
int f4(int, float);
};
typedef void(*f1)();
typedef int(*f2)(int);
typedef int(*f3)(int, bool);
typedef void (UDT::*mf1)();
typedef int (UDT::*mf2)();
typedef int (UDT::*mf3)(int);
typedef int (UDT::*mf4)(int, float);
typedef int (UDT::*mp);
// cv-qualifiers applied to reference types should have no effect
// declare these here for later use with is_reference and remove_reference:
# ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable: 4181)
# endif // BOOST_MSVC
typedef int& r_type;
typedef const r_type cr_type;
# ifdef BOOST_MSVC
# pragma warning(pop)
# endif // BOOST_MSVC
struct POD_UDT { int x; };
struct empty_UDT{ ~empty_UDT(){}; };
struct empty_POD_UDT{};
union union_UDT
{
int x;
double y;
~union_UDT();
};
union POD_union_UDT
{
int x;
double y;
};
union empty_union_UDT
{
~empty_union_UDT();
};
union empty_POD_union_UDT{};
class Base { };
class Deriverd : public Base { };
class NonDerived { };
enum enum1
{
one_,two_
};
enum enum2
{
three_,four_
};
struct VB
{
virtual ~VB(){};
};
struct VD : VB
{
~VD(){};
};
//
// struct non_pointer:
// used to verify that is_pointer does not return
// true for class types that implement operator void*()
//
struct non_pointer
{
operator void*(){return this;}
};
struct non_int_pointer
{
int i;
operator int*(){return &i;}
};
struct int_constructible
{
int_constructible(int);
};
struct int_convertible
{
operator int();
};
//
// struct non_empty:
// used to verify that is_empty does not emit
// spurious warnings or errors.
//
struct non_empty : boost::noncopyable
{
int i;
};
#endif // BOOST_TYPE_TRAITS_TEST_HPP

View File

@ -1,96 +0,0 @@
// boost utility.hpp header file -------------------------------------------//
// (C) Copyright boost.org 1999. 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.
// See http://www.boost.org for most recent version including documentation.
// Classes appear in alphabetical order
// Revision History
// 26 Jan 00 protected noncopyable destructor added (Miki Jovanovic)
// 10 Dec 99 next() and prior() templates added (Dave Abrahams)
// 30 Aug 99 moved cast templates to cast.hpp (Beman Dawes)
// 3 Aug 99 cast templates added
// 20 Jul 99 name changed to utility.hpp
// 9 Jun 99 protected noncopyable default ctor
// 2 Jun 99 Initial Version. Class noncopyable only contents (Dave Abrahams)
#ifndef BOOST_UTILITY_HPP
#define BOOST_UTILITY_HPP
#include <boost/config.hpp>
#include <cstddef> // for size_t
#include <utility> // for std::pair
namespace boost
{
// next() and prior() template functions -----------------------------------//
// Helper functions for classes like bidirectional iterators not supporting
// operator+ and operator-.
//
// Usage:
// const std::list<T>::iterator p = get_some_iterator();
// const std::list<T>::iterator prev = boost::prior(p);
// Contributed by Dave Abrahams
template <class T>
T next(T x) { return ++x; }
template <class T>
T prior(T x) { return --x; }
// class noncopyable -------------------------------------------------------//
// Private copy constructor and copy assignment ensure classes derived from
// class noncopyable cannot be copied.
// Contributed by Dave Abrahams
class noncopyable
{
protected:
noncopyable(){}
~noncopyable(){}
private: // emphasize the following members are private
noncopyable( const noncopyable& );
const noncopyable& operator=( const noncopyable& );
}; // noncopyable
// class tied -------------------------------------------------------//
// A helper for conveniently assigning the two values from a pair
// into separate variables. The idea for this comes from Jaakko J<>rvi's
// Binder/Lambda Library.
// Constributed by Jeremy Siek
template <class A, class B>
class tied {
public:
inline tied(A& a, B& b) : _a(a), _b(b) { }
template <class U, class V>
inline tied& operator=(const std::pair<U,V>& p) {
_a = p.first;
_b = p.second;
return *this;
}
protected:
A& _a;
B& _b;
};
template <class A, class B>
inline tied<A,B> tie(A& a, B& b) { return tied<A,B>(a, b); }
} // namespace boost
#endif // BOOST_UTILITY_HPP

View File

@ -1,72 +0,0 @@
// (C) Copyright John Maddock 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.
#include <boost/type_traits/conversion_traits.hpp>
#include <boost/utility.hpp>
#include "boost/type_traits/type_traits_test.hpp"
int main(int argc, char* argv[])
{
value_test(true, (boost::is_convertible<Deriverd,Base>::value));
value_test(true, (boost::is_convertible<Deriverd,Deriverd>::value));
value_test(true, (boost::is_convertible<Base,Base>::value));
value_test(false, (boost::is_convertible<Base,Deriverd>::value));
value_test(true, (boost::is_convertible<Deriverd,Deriverd>::value));
value_test(false, (boost::is_convertible<NonDerived,Base>::value));
value_test(false, (boost::is_convertible<boost::noncopyable, int>::value));
value_test(true, (boost::is_convertible<float,int>::value));
#if defined(BOOST_MSVC6_MEMBER_TEMPLATES) || !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
value_test(false, (boost::is_convertible<float,void>::value));
value_test(false, (boost::is_convertible<void,float>::value));
value_test(true, (boost::is_convertible<void,void>::value));
#endif
value_test(true, (boost::is_convertible<enum1, int>::value));
value_test(true, (boost::is_convertible<Deriverd*, Base*>::value));
value_test(false, (boost::is_convertible<Base*, Deriverd*>::value));
value_test(true, (boost::is_convertible<Deriverd&, Base&>::value));
value_test(false, (boost::is_convertible<Base&, Deriverd&>::value));
value_test(true, (boost::is_convertible<const Deriverd*, const Base*>::value));
value_test(false, (boost::is_convertible<const Base*, const Deriverd*>::value));
value_test(true, (boost::is_convertible<const Deriverd&, const Base&>::value));
value_test(false, (boost::is_convertible<const Base&, const Deriverd&>::value));
value_test(false, (boost::is_convertible<const int *, int*>::value));
value_test(false, (boost::is_convertible<const int&, int&>::value));
value_test(true, (boost::is_convertible<int*, int[2]>::value));
value_test(false, (boost::is_convertible<const int*, int[3]>::value));
value_test(true, (boost::is_convertible<const int&, int>::value));
value_test(true, (boost::is_convertible<int(&)[4], const int*>::value));
value_test(true, (boost::is_convertible<int(&)(int), int(*)(int)>::value));
value_test(true, (boost::is_convertible<int *, const int*>::value));
value_test(true, (boost::is_convertible<int&, const int&>::value));
value_test(true, (boost::is_convertible<int[2], int*>::value));
value_test(true, (boost::is_convertible<int[2], const int*>::value));
value_test(false, (boost::is_convertible<const int[2], int*>::value));
value_test(true, (boost::is_convertible<non_pointer, void*>::value));
value_test(false, (boost::is_convertible<non_pointer, int*>::value));
value_test(true, (boost::is_convertible<non_int_pointer, int*>::value));
value_test(true, (boost::is_convertible<non_int_pointer, void*>::value));
value_test(true, (boost::is_convertible<int, int_constructible>::value));
return check_result(argc, argv);
}
//
// define the number of failures expected for given compilers:
#ifdef __BORLANDC__
unsigned int expected_failures = 1;
#else
unsigned int expected_failures = 0;
#endif

View File

@ -1,34 +0,0 @@
// (C) Copyright John Maddock 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.
#include <boost/type_traits/same_traits.hpp>
#include <boost/utility.hpp>
#ifdef __BORLANDC__
#pragma hrdstop
#endif
#include "boost/type_traits/type_traits_test.hpp"
int main(int argc, char* argv[])
{
value_test(true, (::boost::is_same<int, int>::value))
value_test(false, (::boost::is_same<int, const int>::value))
value_test(false, (::boost::is_same<int, int&>::value))
value_test(false, (::boost::is_same<const int, int&>::value))
value_test(false, (::boost::is_same<int, const int&>::value))
value_test(false, (::boost::is_same<int*, const int*>::value))
value_test(false, (::boost::is_same<int*, int*const>::value))
value_test(false, (::boost::is_same<int, int[2]>::value))
value_test(false, (::boost::is_same<int*, int[2]>::value))
value_test(false, (::boost::is_same<int[4], int[2]>::value))
return check_result(argc, argv);
}
//
// define the number of failures expected for given compilers:
unsigned int expected_failures = 0;

View File

@ -1,110 +0,0 @@
/*
*
* Copyright (c) 1999
* 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.
*
* This file provides some example of type_traits usage -
* by "optimising" various algorithms:
*
* opt::iter_swap - uses type_traits to determine whether the iterator is a proxy
* in which case it uses a "safe" approach, otherwise calls swap
* on the assumption that swap may be specialised for the pointed-to type.
*
*/
#include <iostream>
#include <typeinfo>
#include <algorithm>
#include <iterator>
#include <vector>
#include <memory>
#include <boost/type_traits.hpp>
using std::cout;
using std::endl;
using std::cin;
namespace opt{
//
// iter_swap:
// tests whether iterator is a proxying iterator or not, and
// uses optimal form accordingly:
//
namespace detail{
template <bool b>
struct swapper
{
template <typename I>
static void do_swap(I one, I two)
{
typedef typename std::iterator_traits<I>::value_type v_t;
v_t v = *one;
*one = *two;
*two = v;
}
};
#ifdef __GNUC__
using std::swap;
#endif
template <>
struct swapper<true>
{
template <typename I>
static void do_swap(I one, I two)
{
using std::swap;
swap(*one, *two);
}
};
}
template <typename I1, typename I2>
inline void iter_swap(I1 one, I2 two)
{
typedef typename std::iterator_traits<I1>::reference r1_t;
typedef typename std::iterator_traits<I2>::reference r2_t;
detail::swapper<
::boost::type_traits::ice_and<
::boost::is_reference<r1_t>::value,
::boost::is_reference<r2_t>::value,
::boost::is_same<r1_t, r2_t>::value
>::value>::do_swap(one, two);
}
}; // namespace opt
int main()
{
//
// testing iter_swap
// really just a check that it does in fact compile...
std::vector<int> v1;
v1.push_back(0);
v1.push_back(1);
std::vector<bool> v2;
v2.push_back(0);
v2.push_back(1);
opt::iter_swap(v1.begin(), v1.begin()+1);
opt::iter_swap(v2.begin(), v2.begin()+1);
cout << "Press any key to exit...";
cin.get();
}

View File

@ -1,184 +0,0 @@
// (C) Copyright John Maddock 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.
#include <boost/type_traits/object_traits.hpp>
#include <boost/utility.hpp>
#ifdef __BORLANDC__
#pragma hrdstop
#endif
#include "boost/type_traits/type_traits_test.hpp"
NESTED_DECL(is_class)
NESTED_DECL(is_object)
NESTED_DECL(is_scalar)
NESTED_DECL(is_compound)
NESTED_DECL(is_POD)
int main(int argc, char* argv[])
{
NESTED_TEST(is_class, int)
NESTED_TEST(is_class, UDT)
NESTED_TEST(is_object, int)
NESTED_TEST(is_object, void)
NESTED_TEST(is_object, UDT)
NESTED_TEST(is_scalar, void)
NESTED_TEST(is_scalar, int)
NESTED_TEST(is_compound, int)
NESTED_TEST(is_compound, UDT)
NESTED_TEST(is_POD, int)
NESTED_TEST(is_POD, UDT)
value_test(false, boost::is_class<int>::value)
value_test(false, boost::is_class<const int>::value)
value_test(false, boost::is_class<volatile int>::value)
value_test(false, boost::is_class<int*>::value)
value_test(false, boost::is_class<int* const>::value)
value_test(false, boost::is_class<int[2]>::value)
value_test(false, boost::is_class<int&>::value)
value_test(false, boost::is_class<mf4>::value)
value_test(false, boost::is_class<f1>::value)
value_test(false, boost::is_class<enum_UDT>::value)
value_test(true, boost::is_class<UDT>::value)
value_test(true, boost::is_class<UDT const>::value)
value_test(true, boost::is_class<UDT volatile>::value)
value_test(true, boost::is_class<empty_UDT>::value)
value_test(true, boost::is_class<std::iostream>::value)
value_test(false, boost::is_class<UDT*>::value)
value_test(false, boost::is_class<UDT[2]>::value)
value_test(false, boost::is_class<UDT&>::value)
value_test(true, boost::is_object<int>::value)
value_test(true, boost::is_object<UDT>::value)
value_test(false, boost::is_object<int&>::value)
value_test(false, boost::is_object<void>::value)
value_test(true, boost::is_scalar<int>::value)
value_test(true, boost::is_scalar<void*>::value)
value_test(false, boost::is_scalar<void>::value)
value_test(false, boost::is_scalar<UDT>::value)
value_test(false, boost::is_scalar<int&>::value)
value_test(true, boost::is_compound<UDT>::value)
value_test(true, boost::is_compound<void*>::value)
value_test(false, boost::is_compound<void>::value)
value_test(false, boost::is_compound<int>::value)
value_test(true, boost::is_POD<int>::value)
value_test(true, boost::is_POD<int*>::value)
value_test(false, boost::is_POD<int&>::value)
value_test(true, boost::is_POD<int*const>::value)
value_test(true, boost::is_POD<const int>::value)
value_test(true, boost::is_POD<volatile int>::value)
value_test(false, boost::is_POD<const int&>::value)
value_test(true, boost::is_POD<int[2]>::value)
value_test(true, boost::is_POD<int[3][2]>::value)
value_test(true, boost::is_POD<int[2][4][5][6][3]>::value)
value_test(true, boost::is_POD<f1>::value)
value_test(true, boost::is_POD<mf2>::value)
value_test(false, boost::is_POD<UDT>::value)
value_test(false, boost::is_POD<empty_UDT>::value)
value_test(true, boost::is_POD<enum_UDT>::value)
value_test(true, boost::has_trivial_constructor<int>::value)
value_test(true, boost::has_trivial_constructor<int*>::value)
value_test(true, boost::has_trivial_constructor<int*const>::value)
value_test(true, boost::has_trivial_constructor<const int>::value)
value_test(true, boost::has_trivial_constructor<volatile int>::value)
value_test(true, boost::has_trivial_constructor<int[2]>::value)
value_test(true, boost::has_trivial_constructor<int[3][2]>::value)
value_test(true, boost::has_trivial_constructor<int[2][4][5][6][3]>::value)
value_test(true, boost::has_trivial_constructor<f1>::value)
value_test(true, boost::has_trivial_constructor<mf2>::value)
value_test(false, boost::has_trivial_constructor<UDT>::value)
value_test(true, boost::has_trivial_constructor<empty_UDT>::value)
value_test(true, boost::has_trivial_constructor<enum_UDT>::value)
value_test(true, boost::has_trivial_copy<int>::value)
value_test(true, boost::has_trivial_copy<int*>::value)
value_test(true, boost::has_trivial_copy<int*const>::value)
value_test(true, boost::has_trivial_copy<const int>::value)
// Steve: was 'false' -- should be 'true' via 3.9p3, 3.9p10
value_test(false, boost::has_trivial_copy<volatile int>::value)
value_test(true, boost::has_trivial_copy<int[2]>::value)
value_test(true, boost::has_trivial_copy<int[3][2]>::value)
value_test(true, boost::has_trivial_copy<int[2][4][5][6][3]>::value)
value_test(true, boost::has_trivial_copy<f1>::value)
value_test(true, boost::has_trivial_copy<mf2>::value)
value_test(false, boost::has_trivial_copy<UDT>::value)
value_test(true, boost::has_trivial_copy<empty_UDT>::value)
value_test(true, boost::has_trivial_copy<enum_UDT>::value)
value_test(true, boost::has_trivial_assign<int>::value)
value_test(true, boost::has_trivial_assign<int*>::value)
value_test(false, boost::has_trivial_assign<int*const>::value)
value_test(false, boost::has_trivial_assign<const int>::value)
// Steve: was 'false' -- should be 'true' via 3.9p3, 3.9p10
value_test(false, boost::has_trivial_assign<volatile int>::value)
value_test(true, boost::has_trivial_assign<int[2]>::value)
value_test(true, boost::has_trivial_assign<int[3][2]>::value)
value_test(true, boost::has_trivial_assign<int[2][4][5][6][3]>::value)
value_test(true, boost::has_trivial_assign<f1>::value)
value_test(true, boost::has_trivial_assign<mf2>::value)
value_test(false, boost::has_trivial_assign<UDT>::value)
value_test(true, boost::has_trivial_assign<empty_UDT>::value)
value_test(true, boost::has_trivial_assign<enum_UDT>::value)
value_test(true, boost::has_trivial_destructor<int>::value)
value_test(true, boost::has_trivial_destructor<int*>::value)
value_test(true, boost::has_trivial_destructor<int*const>::value)
value_test(true, boost::has_trivial_destructor<const int>::value)
value_test(true, boost::has_trivial_destructor<volatile int>::value)
value_test(true, boost::has_trivial_destructor<int[2]>::value)
value_test(true, boost::has_trivial_destructor<int[3][2]>::value)
value_test(true, boost::has_trivial_destructor<int[2][4][5][6][3]>::value)
value_test(true, boost::has_trivial_destructor<f1>::value)
value_test(true, boost::has_trivial_destructor<mf2>::value)
value_test(false, boost::has_trivial_destructor<UDT>::value)
value_test(false, boost::has_trivial_destructor<empty_UDT>::value)
value_test(true, boost::has_trivial_destructor<enum_UDT>::value)
value_test(false, boost::is_empty<int>::value)
value_test(false, boost::is_empty<int*>::value)
value_test(false, boost::is_empty<int&>::value)
#if defined(__MWERKS__)
// apparent compiler bug causes this to fail to compile:
value_fail(false, boost::is_empty<int[2]>::value)
#else
value_test(false, boost::is_empty<int[2]>::value)
#endif
value_test(false, boost::is_empty<f1>::value)
value_test(false, boost::is_empty<mf1>::value)
value_test(false, boost::is_empty<UDT>::value)
value_test(true, boost::is_empty<empty_UDT>::value)
value_test(true, boost::is_empty<empty_POD_UDT>::value)
// this one will not compile on most compilers,
// because we can't tell the difference between
// unions and classes:
value_fail(true, boost::is_empty<empty_union_UDT>::value)
value_test(false, boost::is_empty<enum_UDT>::value)
value_test(true, boost::is_empty<boost::noncopyable>::value)
value_test(false, boost::is_empty<non_empty>::value)
return check_result(argc, argv);
}
//
// define the number of failures expected for given compilers:
#ifdef __BORLANDC__
// can't handle enum's or classes that are POD's
unsigned int expected_failures = 13;
#elif defined(__GNUC__)
// classes that are POD's, or empty:
unsigned int expected_failures = 7;
#elif defined(BOOST_MSVC)
// can't handle classes that are POD's or arrays that are POD's
unsigned int expected_failures = 19;
#else
unsigned int expected_failures = 0;
#endif

View File

@ -1,14 +0,0 @@
run libs/type_traits/alignment_test.cpp
run libs/type_traits/arithmetic_traits_test.cpp
run libs/type_traits/composite_traits_test.cpp
run libs/type_traits/cv_traits_test.cpp
run libs/type_traits/is_convertible_test.cpp
run libs/type_traits/is_same_test.cpp
run libs/type_traits/object_type_traits_test.cpp
run libs/type_traits/transform_traits_test.cpp
compile libs/type_traits/trivial_destructor_example.cpp
compile libs/type_traits/copy_example.cpp
compile libs/type_traits/fill_example.cpp
compile libs/type_traits/iter_swap_example.cpp

View File

@ -1,879 +0,0 @@
*** libs/type_traits/alignment_test.cpp ***
** GCC 2.95.2
g++ -o boosttmp.exe -ftemplate-depth-30 -I../.. ../../libs/type_traits/alignment_test.cpp
boosttmp.exe
13 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
** Borland C++ 5.5.1
bcc32 -eboosttmp.exe -I../.. -j10 -q ../../libs/type_traits/alignment_test.cpp
../../libs/type_traits/alignment_test.cpp:
boosttmp.exe
13 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
** Microsoft Visual C++
cl /Feboosttmp.exe /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/alignment_test.cpp /link user32.lib
alignment_test.cpp
../../libs/type_traits/alignment_test.cpp(15) : warning C4305: 'argument' : truncation from 'enum ' to 'bool'
../../libs/type_traits/alignment_test.cpp(15) : while compiling class-template member function '__thiscall nested_tester_alignment_of<int>::nested_tester_alignment_of<int>(const char *)'
LINK : LNK6004: boosttmp.exe not found or not built by the last incremental link; performing full link
boosttmp.exe
10 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
** Microsoft Visual C++ with STLport
cl /Feboosttmp.exe /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "e:/stlport//stlport" /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/alignment_test.cpp /link /libpath:e:/stlport/lib user32.lib
alignment_test.cpp
../../libs/type_traits/alignment_test.cpp(15) : warning C4305: 'argument' : truncation from 'enum ' to 'bool'
../../libs/type_traits/alignment_test.cpp(15) : while compiling class-template member function '__thiscall nested_tester_alignment_of<int>::nested_tester_alignment_of<int>(const char *)'
boosttmp.exe
10 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
*** libs/type_traits/arithmetic_traits_test.cpp ***
** GCC 2.95.2
g++ -o boosttmp.exe -ftemplate-depth-30 -I../.. ../../libs/type_traits/arithmetic_traits_test.cpp
boosttmp.exe
111 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
** Borland C++ 5.5.1
bcc32 -eboosttmp.exe -I../.. -j10 -q ../../libs/type_traits/arithmetic_traits_test.cpp
../../libs/type_traits/arithmetic_traits_test.cpp:
boosttmp.exe
123 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
** Microsoft Visual C++
cl /Feboosttmp.exe /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/arithmetic_traits_test.cpp /link user32.lib
arithmetic_traits_test.cpp
LINK : LNK6004: boosttmp.exe not found or not built by the last incremental link; performing full link
boosttmp.exe
123 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
** Microsoft Visual C++ with STLport
cl /Feboosttmp.exe /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "e:/stlport//stlport" /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/arithmetic_traits_test.cpp /link /libpath:e:/stlport/lib user32.lib
arithmetic_traits_test.cpp
boosttmp.exe
123 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
*** libs/type_traits/composite_traits_test.cpp ***
** GCC 2.95.2
g++ -o boosttmp.exe -ftemplate-depth-30 -I../.. ../../libs/type_traits/composite_traits_test.cpp
boosttmp.exe
checking value of boost::is_reference<cr_type>::value...failed
found: 0 expected 1
65 tests completed, 1 failures found, 1 failures expected from this compiler.
Pass
** Borland C++ 5.5.1
bcc32 -eboosttmp.exe -I../.. -j10 -q ../../libs/type_traits/composite_traits_test.cpp
../../libs/type_traits/composite_traits_test.cpp:
boosttmp.exe
checking value of boost::is_pointer<int(&)[2]>::value...failed
found: 1 expected 0
checking value of boost::is_enum<enum_UDT>::value...failed
found: 0 expected 1
65 tests completed, 2 failures found, 2 failures expected from this compiler.
Pass
** Microsoft Visual C++
cl /Feboosttmp.exe /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/composite_traits_test.cpp /link user32.lib
composite_traits_test.cpp
LINK : LNK6004: boosttmp.exe not found or not built by the last incremental link; performing full link
boosttmp.exe
checking value of boost::is_reference<const volatile int &>::value...failed
found: 0 expected 1
65 tests completed, 1 failures found, 1 failures expected from this compiler.
Pass
** Microsoft Visual C++ with STLport
cl /Feboosttmp.exe /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "e:/stlport//stlport" /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/composite_traits_test.cpp /link /libpath:e:/stlport/lib user32.lib
composite_traits_test.cpp
boosttmp.exe
checking value of boost::is_reference<const volatile int &>::value...failed
found: 0 expected 1
65 tests completed, 1 failures found, 1 failures expected from this compiler.
Pass
*** libs/type_traits/cv_traits_test.cpp ***
** GCC 2.95.2
g++ -o boosttmp.exe -ftemplate-depth-30 -I../.. ../../libs/type_traits/cv_traits_test.cpp
boosttmp.exe
18 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
** Borland C++ 5.5.1
bcc32 -eboosttmp.exe -I../.. -j10 -q ../../libs/type_traits/cv_traits_test.cpp
../../libs/type_traits/cv_traits_test.cpp:
boosttmp.exe
18 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
** Microsoft Visual C++
cl /Feboosttmp.exe /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/cv_traits_test.cpp /link user32.lib
cv_traits_test.cpp
LINK : LNK6004: boosttmp.exe not found or not built by the last incremental link; performing full link
boosttmp.exe
checking value of boost::is_const<const void>::value...failed
found: 0 expected 1
checking value of boost::is_volatile<volatile void>::value...failed
found: 0 expected 1
18 tests completed, 2 failures found, 2 failures expected from this compiler.
Pass
** Microsoft Visual C++ with STLport
cl /Feboosttmp.exe /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "e:/stlport//stlport" /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/cv_traits_test.cpp /link /libpath:e:/stlport/lib user32.lib
cv_traits_test.cpp
boosttmp.exe
checking value of boost::is_const<const void>::value...failed
found: 0 expected 1
checking value of boost::is_volatile<volatile void>::value...failed
found: 0 expected 1
18 tests completed, 2 failures found, 2 failures expected from this compiler.
Pass
*** libs/type_traits/is_convertible_test.cpp ***
** GCC 2.95.2
g++ -o boosttmp.exe -ftemplate-depth-30 -I../.. ../../libs/type_traits/is_convertible_test.cpp
boosttmp.exe
37 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
** Borland C++ 5.5.1
bcc32 -eboosttmp.exe -I../.. -j10 -q ../../libs/type_traits/is_convertible_test.cpp
../../libs/type_traits/is_convertible_test.cpp:
Error E2396 ../../libs/type_traits/is_convertible_test.cpp 54: Template argument must be a constant expression in function main(int,char * *)
Error E2299 ../../libs/type_traits/is_convertible_test.cpp 54: Cannot generate template specialization from 'checker<(value)>' in function main(int,char * *)
Error E2379 ../../libs/type_traits/is_convertible_test.cpp 54: Statement missing ; in function main(int,char * *)
*** 3 errors in Compile ***
Fail
** Microsoft Visual C++
cl /Feboosttmp.exe /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/is_convertible_test.cpp /link user32.lib
is_convertible_test.cpp
LINK : LNK6004: boosttmp.exe not found or not built by the last incremental link; performing full link
boosttmp.exe
37 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
** Microsoft Visual C++ with STLport
cl /Feboosttmp.exe /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "e:/stlport//stlport" /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/is_convertible_test.cpp /link /libpath:e:/stlport/lib user32.lib
is_convertible_test.cpp
../..\boost/type_traits/conversion_traits.hpp(57) : warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
../..\boost/type_traits/conversion_traits.hpp(83) : see reference to class template instantiation 'boost::detail::from_not_void_conversion::bind<float,int>' being compiled
../../libs/type_traits/is_convertible_test.cpp(21) : see reference to class template instantiation 'boost::is_convertible<float,int>' being compiled
boosttmp.exe
37 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
*** libs/type_traits/is_same_test.cpp ***
** GCC 2.95.2
g++ -o boosttmp.exe -ftemplate-depth-30 -I../.. ../../libs/type_traits/is_same_test.cpp
boosttmp.exe
10 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
** Borland C++ 5.5.1
bcc32 -eboosttmp.exe -I../.. -j10 -q ../../libs/type_traits/is_same_test.cpp
../../libs/type_traits/is_same_test.cpp:
boosttmp.exe
10 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
** Microsoft Visual C++
cl /Feboosttmp.exe /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/is_same_test.cpp /link user32.lib
is_same_test.cpp
LINK : LNK6004: boosttmp.exe not found or not built by the last incremental link; performing full link
boosttmp.exe
10 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
** Microsoft Visual C++ with STLport
cl /Feboosttmp.exe /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "e:/stlport//stlport" /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/is_same_test.cpp /link /libpath:e:/stlport/lib user32.lib
is_same_test.cpp
boosttmp.exe
10 tests completed, 0 failures found, 0 failures expected from this compiler.
Pass
*** libs/type_traits/object_type_traits_test.cpp ***
** GCC 2.95.2
g++ -o boosttmp.exe -ftemplate-depth-30 -I../.. ../../libs/type_traits/object_type_traits_test.cpp
boosttmp.exe
checking value of boost::has_trivial_constructor<empty_UDT>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_copy<empty_UDT>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_assign<empty_UDT>::value...failed
found: 0 expected 1
checking value of boost::is_empty<empty_UDT>::value...failed
found: 0 expected 1
checking value of boost::is_empty<empty_POD_UDT>::value...failed
found: 0 expected 1
checking value of boost::is_empty<empty_union_UDT>::value...failed
boost::is_empty<empty_union_UDT>::value does not compile on this compiler
checking value of boost::is_empty<boost::noncopyable>::value...failed
found: 0 expected 1
122 tests completed, 7 failures found, 7 failures expected from this compiler.
Pass
** Borland C++ 5.5.1
bcc32 -eboosttmp.exe -I../.. -j10 -q ../../libs/type_traits/object_type_traits_test.cpp
../../libs/type_traits/object_type_traits_test.cpp:
boosttmp.exe
checking value of boost::is_class<enum_UDT>::value...failed
found: 1 expected 0
checking value of boost::is_POD<enum_UDT>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_constructor<empty_UDT>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_constructor<enum_UDT>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_copy<empty_UDT>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_copy<enum_UDT>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_assign<empty_UDT>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_assign<enum_UDT>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_destructor<enum_UDT>::value...failed
found: 0 expected 1
checking value of boost::is_empty<empty_UDT>::value...failed
found: 0 expected 1
checking value of boost::is_empty<empty_POD_UDT>::value...failed
found: 0 expected 1
checking value of boost::is_empty<empty_union_UDT>::value...failed
boost::is_empty<empty_union_UDT>::value does not compile on this compiler
checking value of boost::is_empty<boost::noncopyable>::value...failed
found: 0 expected 1
122 tests completed, 13 failures found, 13 failures expected from this compiler.
Pass
** Microsoft Visual C++
cl /Feboosttmp.exe /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/object_type_traits_test.cpp /link user32.lib
object_type_traits_test.cpp
LINK : LNK6004: boosttmp.exe not found or not built by the last incremental link; performing full link
boosttmp.exe
checking value of boost::is_POD<int[2]>::value...failed
found: 0 expected 1
checking value of boost::is_POD<int[3][2]>::value...failed
found: 0 expected 1
checking value of boost::is_POD<int[2][4][5][6][3]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_constructor<int[2]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_constructor<int[3][2]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_constructor<int[2][4][5][6][3]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_constructor<empty_UDT>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_copy<int[2]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_copy<int[3][2]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_copy<int[2][4][5][6][3]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_copy<empty_UDT>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_assign<int[2]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_assign<int[3][2]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_assign<int[2][4][5][6][3]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_assign<empty_UDT>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_destructor<int[2]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_destructor<int[3][2]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_destructor<int[2][4][5][6][3]>::value...failed
found: 0 expected 1
checking value of boost::is_empty<empty_union_UDT>::value...failed
boost::is_empty<empty_union_UDT>::value does not compile on this compiler
122 tests completed, 19 failures found, 19 failures expected from this compiler.
Pass
** Microsoft Visual C++ with STLport
cl /Feboosttmp.exe /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "e:/stlport//stlport" /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/object_type_traits_test.cpp /link /libpath:e:/stlport/lib user32.lib
object_type_traits_test.cpp
boosttmp.exe
checking value of boost::is_POD<int[2]>::value...failed
found: 0 expected 1
checking value of boost::is_POD<int[3][2]>::value...failed
found: 0 expected 1
checking value of boost::is_POD<int[2][4][5][6][3]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_constructor<int[2]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_constructor<int[3][2]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_constructor<int[2][4][5][6][3]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_constructor<empty_UDT>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_copy<int[2]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_copy<int[3][2]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_copy<int[2][4][5][6][3]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_copy<empty_UDT>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_assign<int[2]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_assign<int[3][2]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_assign<int[2][4][5][6][3]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_assign<empty_UDT>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_destructor<int[2]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_destructor<int[3][2]>::value...failed
found: 0 expected 1
checking value of boost::has_trivial_destructor<int[2][4][5][6][3]>::value...failed
found: 0 expected 1
checking value of boost::is_empty<empty_union_UDT>::value...failed
boost::is_empty<empty_union_UDT>::value does not compile on this compiler
122 tests completed, 19 failures found, 19 failures expected from this compiler.
Pass
*** libs/type_traits/transform_traits_test.cpp ***
** GCC 2.95.2
g++ -o boosttmp.exe -ftemplate-depth-30 -I../.. ../../libs/type_traits/transform_traits_test.cpp
boosttmp.exe
checking type of boost::remove_reference<cr_type>::type...failed
expected type was int
typeid(int) was: i
typeid(boost::remove_reference<cr_type>::type) was: i
In template class t12type_checker2ZiZCRi
39 tests completed, 1 failures found, 1 failures expected from this compiler.
Pass
** Borland C++ 5.5.1
bcc32 -eboosttmp.exe -I../.. -j10 -q ../../libs/type_traits/transform_traits_test.cpp
../../libs/type_traits/transform_traits_test.cpp:
boosttmp.exe
checking type of boost::remove_const<volatile int>::type...failed
expected type was volatile int
typeid(volatile int) was: int
typeid(boost::remove_const<volatile int>::type) was: int
In template class type_checker<volatile int,int>
checking type of boost::remove_const<const volatile int>::type...failed
expected type was volatile int
typeid(volatile int) was: int
typeid(boost::remove_const<const volatile int>::type) was: int
In template class type_checker<volatile int,int>
checking type of boost::remove_volatile<const int>::type...failed
expected type was const int
typeid(const int) was: int
typeid(boost::remove_volatile<const int>::type) was: int
In template class type_checker<const int,int>
checking type of boost::remove_volatile<const volatile int>::type...failed
expected type was const int
typeid(const int) was: int
typeid(boost::remove_volatile<const volatile int>::type) was: int
In template class type_checker<const int,int>
39 tests completed, 4 failures found, 4 failures expected from this compiler.
Pass
** Microsoft Visual C++
cl /Feboosttmp.exe /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/transform_traits_test.cpp /link user32.lib
transform_traits_test.cpp
LINK : LNK6004: boosttmp.exe not found or not built by the last incremental link; performing full link
boosttmp.exe
checking type of boost::remove_const<const int>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_const<const int>::type) was: int
In template class struct type_checker<int,int const >
checking type of boost::remove_const<const volatile int>::type...failed
expected type was volatile int
typeid(volatile int) was: int
typeid(boost::remove_const<const volatile int>::type) was: int
In template class struct type_checker<int volatile ,int const volatile >
checking type of boost::remove_const<int* const>::type...failed
expected type was int*
typeid(int*) was: int *
typeid(boost::remove_const<int* const>::type) was: int *
In template class struct type_checker<int *,int * const>
checking type of boost::remove_volatile<volatile int>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_volatile<volatile int>::type) was: int
In template class struct type_checker<int,int volatile >
checking type of boost::remove_volatile<const volatile int>::type...failed
expected type was const int
typeid(const int) was: int
typeid(boost::remove_volatile<const volatile int>::type) was: int
In template class struct type_checker<int const ,int const volatile >
checking type of boost::remove_volatile<int* volatile>::type...failed
expected type was int*
typeid(int*) was: int *
typeid(boost::remove_volatile<int* volatile>::type) was: int *
In template class struct type_checker<int *,int * volatile>
checking type of boost::remove_cv<volatile int>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_cv<volatile int>::type) was: int
In template class struct type_checker<int,int volatile >
checking type of boost::remove_cv<const int>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_cv<const int>::type) was: int
In template class struct type_checker<int,int const >
checking type of boost::remove_cv<const volatile int>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_cv<const volatile int>::type) was: int
In template class struct type_checker<int,int const volatile >
checking type of boost::remove_cv<int* volatile>::type...failed
expected type was int*
typeid(int*) was: int *
typeid(boost::remove_cv<int* volatile>::type) was: int *
In template class struct type_checker<int *,int * volatile>
checking type of boost::remove_cv<int* const>::type...failed
expected type was int*
typeid(int*) was: int *
typeid(boost::remove_cv<int* const>::type) was: int *
In template class struct type_checker<int *,int * const>
checking type of boost::remove_cv<int* const volatile>::type...failed
expected type was int*
typeid(int*) was: int *
typeid(boost::remove_cv<int* const volatile>::type) was: int *
In template class struct type_checker<int *,int * const volatile>
checking type of boost::remove_cv<const int * const>::type...failed
expected type was const int *
typeid(const int *) was: int const *
typeid(boost::remove_cv<const int * const>::type) was: int const *
In template class struct type_checker<int const *,int const * const>
checking type of boost::remove_reference<int&>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_reference<int&>::type) was: int &
In template class struct type_checker<int,int &>
checking type of boost::remove_reference<const int&>::type...failed
expected type was const int
typeid(const int) was: int
typeid(boost::remove_reference<const int&>::type) was: int const &
In template class struct type_checker<int const ,int const &>
checking type of boost::remove_reference<volatile int&>::type...failed
expected type was volatile int
typeid(volatile int) was: int
typeid(boost::remove_reference<volatile int&>::type) was: int volatile &
In template class struct type_checker<int volatile ,int volatile &>
checking type of boost::remove_reference<cr_type>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_reference<cr_type>::type) was: int &
In template class struct type_checker<int,int &>
checking type of boost::remove_bounds<int[3]>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_bounds<int[3]>::type) was: int [3]
In template class struct type_checker<int,int [3]>
checking type of boost::remove_bounds<int[2][3]>::type...failed
expected type was int[3]
typeid(int[3]) was: int [3]
typeid(boost::remove_bounds<int[2][3]>::type) was: int [2][3]
In template class struct type_checker<int [3],int [2][3]>
checking type of boost::remove_pointer<int*>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_pointer<int*>::type) was: int *
In template class struct type_checker<int,int *>
checking type of boost::remove_pointer<const int*>::type...failed
expected type was const int
typeid(const int) was: int
typeid(boost::remove_pointer<const int*>::type) was: int const *
In template class struct type_checker<int const ,int const *>
checking type of boost::remove_pointer<int*const>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_pointer<int*const>::type) was: int *
In template class struct type_checker<int,int * const>
checking type of boost::remove_pointer<volatile int*const volatile>::type...failed
expected type was volatile int
typeid(volatile int) was: int
typeid(boost::remove_pointer<volatile int*const volatile>::type) was: int volatile *
In template class struct type_checker<int volatile ,int volatile * const volatile>
39 tests completed, 23 failures found, 0 failures expected from this compiler.
Fail
** Microsoft Visual C++ with STLport
cl /Feboosttmp.exe /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "e:/stlport//stlport" /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/transform_traits_test.cpp /link /libpath:e:/stlport/lib user32.lib
transform_traits_test.cpp
boosttmp.exe
checking type of boost::remove_const<const int>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_const<const int>::type) was: int
In template class struct type_checker<int,int const >
checking type of boost::remove_const<const volatile int>::type...failed
expected type was volatile int
typeid(volatile int) was: int
typeid(boost::remove_const<const volatile int>::type) was: int
In template class struct type_checker<int volatile ,int const volatile >
checking type of boost::remove_const<int* const>::type...failed
expected type was int*
typeid(int*) was: int *
typeid(boost::remove_const<int* const>::type) was: int *
In template class struct type_checker<int *,int * const>
checking type of boost::remove_volatile<volatile int>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_volatile<volatile int>::type) was: int
In template class struct type_checker<int,int volatile >
checking type of boost::remove_volatile<const volatile int>::type...failed
expected type was const int
typeid(const int) was: int
typeid(boost::remove_volatile<const volatile int>::type) was: int
In template class struct type_checker<int const ,int const volatile >
checking type of boost::remove_volatile<int* volatile>::type...failed
expected type was int*
typeid(int*) was: int *
typeid(boost::remove_volatile<int* volatile>::type) was: int *
In template class struct type_checker<int *,int * volatile>
checking type of boost::remove_cv<volatile int>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_cv<volatile int>::type) was: int
In template class struct type_checker<int,int volatile >
checking type of boost::remove_cv<const int>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_cv<const int>::type) was: int
In template class struct type_checker<int,int const >
checking type of boost::remove_cv<const volatile int>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_cv<const volatile int>::type) was: int
In template class struct type_checker<int,int const volatile >
checking type of boost::remove_cv<int* volatile>::type...failed
expected type was int*
typeid(int*) was: int *
typeid(boost::remove_cv<int* volatile>::type) was: int *
In template class struct type_checker<int *,int * volatile>
checking type of boost::remove_cv<int* const>::type...failed
expected type was int*
typeid(int*) was: int *
typeid(boost::remove_cv<int* const>::type) was: int *
In template class struct type_checker<int *,int * const>
checking type of boost::remove_cv<int* const volatile>::type...failed
expected type was int*
typeid(int*) was: int *
typeid(boost::remove_cv<int* const volatile>::type) was: int *
In template class struct type_checker<int *,int * const volatile>
checking type of boost::remove_cv<const int * const>::type...failed
expected type was const int *
typeid(const int *) was: int const *
typeid(boost::remove_cv<const int * const>::type) was: int const *
In template class struct type_checker<int const *,int const * const>
checking type of boost::remove_reference<int&>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_reference<int&>::type) was: int &
In template class struct type_checker<int,int &>
checking type of boost::remove_reference<const int&>::type...failed
expected type was const int
typeid(const int) was: int
typeid(boost::remove_reference<const int&>::type) was: int const &
In template class struct type_checker<int const ,int const &>
checking type of boost::remove_reference<volatile int&>::type...failed
expected type was volatile int
typeid(volatile int) was: int
typeid(boost::remove_reference<volatile int&>::type) was: int volatile &
In template class struct type_checker<int volatile ,int volatile &>
checking type of boost::remove_reference<cr_type>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_reference<cr_type>::type) was: int &
In template class struct type_checker<int,int &>
checking type of boost::remove_bounds<int[3]>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_bounds<int[3]>::type) was: int [3]
In template class struct type_checker<int,int [3]>
checking type of boost::remove_bounds<int[2][3]>::type...failed
expected type was int[3]
typeid(int[3]) was: int [3]
typeid(boost::remove_bounds<int[2][3]>::type) was: int [2][3]
In template class struct type_checker<int [3],int [2][3]>
checking type of boost::remove_pointer<int*>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_pointer<int*>::type) was: int *
In template class struct type_checker<int,int *>
checking type of boost::remove_pointer<const int*>::type...failed
expected type was const int
typeid(const int) was: int
typeid(boost::remove_pointer<const int*>::type) was: int const *
In template class struct type_checker<int const ,int const *>
checking type of boost::remove_pointer<int*const>::type...failed
expected type was int
typeid(int) was: int
typeid(boost::remove_pointer<int*const>::type) was: int *
In template class struct type_checker<int,int * const>
checking type of boost::remove_pointer<volatile int*const volatile>::type...failed
expected type was volatile int
typeid(volatile int) was: int
typeid(boost::remove_pointer<volatile int*const volatile>::type) was: int volatile *
In template class struct type_checker<int volatile ,int volatile * const volatile>
39 tests completed, 23 failures found, 0 failures expected from this compiler.
Fail
*** libs/type_traits/trivial_destructor_example.cpp ***
** GCC 2.95.2
g++ -c -ftemplate-depth-30 -I../.. ../../libs/type_traits/trivial_destructor_example.cpp
Pass
** Borland C++ 5.5.1
bcc32 -c -I../.. -j10 -q ../../libs/type_traits/trivial_destructor_example.cpp
../../libs/type_traits/trivial_destructor_example.cpp:
Warning W8027 ../..\boost/smart_ptr.hpp 124: Functions containing try are not expanded inline
Warning W8027 ../..\boost/smart_ptr.hpp 195: Functions containing try are not expanded inline
Warning W8027 ../..\boost/smart_ptr.hpp 265: Functions containing try are not expanded inline
Warning W8027 ../..\boost/smart_ptr.hpp 287: Functions containing try are not expanded inline
Pass
** Microsoft Visual C++
cl /c /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/trivial_destructor_example.cpp
trivial_destructor_example.cpp
Pass
** Microsoft Visual C++ with STLport
cl /c /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "e:/stlport/stlport" /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/trivial_destructor_example.cpp
trivial_destructor_example.cpp
Pass
*** libs/type_traits/copy_example.cpp ***
** GCC 2.95.2
g++ -c -ftemplate-depth-30 -I../.. ../../libs/type_traits/copy_example.cpp
Pass
** Borland C++ 5.5.1
bcc32 -c -I../.. -j10 -q ../../libs/type_traits/copy_example.cpp
../../libs/type_traits/copy_example.cpp:
Warning W8027 ../..\boost/smart_ptr.hpp 124: Functions containing try are not expanded inline
Warning W8027 ../..\boost/smart_ptr.hpp 195: Functions containing try are not expanded inline
Warning W8027 ../..\boost/smart_ptr.hpp 265: Functions containing try are not expanded inline
Warning W8027 ../..\boost/smart_ptr.hpp 287: Functions containing try are not expanded inline
Pass
** Microsoft Visual C++
cl /c /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/copy_example.cpp
copy_example.cpp
Pass
** Microsoft Visual C++ with STLport
cl /c /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "e:/stlport/stlport" /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/copy_example.cpp
copy_example.cpp
Pass
*** libs/type_traits/fill_example.cpp ***
** GCC 2.95.2
g++ -c -ftemplate-depth-30 -I../.. ../../libs/type_traits/fill_example.cpp
Pass
** Borland C++ 5.5.1
bcc32 -c -I../.. -j10 -q ../../libs/type_traits/fill_example.cpp
../../libs/type_traits/fill_example.cpp:
Warning W8027 ../..\boost/smart_ptr.hpp 124: Functions containing try are not expanded inline
Warning W8027 ../..\boost/smart_ptr.hpp 195: Functions containing try are not expanded inline
Warning W8027 ../..\boost/smart_ptr.hpp 265: Functions containing try are not expanded inline
Warning W8027 ../..\boost/smart_ptr.hpp 287: Functions containing try are not expanded inline
Pass
** Microsoft Visual C++
cl /c /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/fill_example.cpp
fill_example.cpp
Pass
** Microsoft Visual C++ with STLport
cl /c /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "e:/stlport/stlport" /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/fill_example.cpp
fill_example.cpp
Pass
*** libs/type_traits/iter_swap_example.cpp ***
** GCC 2.95.2
g++ -c -ftemplate-depth-30 -I../.. ../../libs/type_traits/iter_swap_example.cpp
Pass
** Borland C++ 5.5.1
bcc32 -c -I../.. -j10 -q ../../libs/type_traits/iter_swap_example.cpp
../../libs/type_traits/iter_swap_example.cpp:
Pass
** Microsoft Visual C++
cl /c /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/iter_swap_example.cpp
iter_swap_example.cpp
../../libs/type_traits/iter_swap_example.cpp(108) : warning C4508: 'main' : function should return a value; 'void' return type assumed
e:\VS98\INCLUDE\utility(81) : error C2039: 'iterator_category' : is not a member of '`global namespace''
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:\VS98\INCLUDE\utility(81) : error C2146: syntax error : missing ';' before identifier 'iterator_category'
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:\VS98\INCLUDE\utility(81) : error C2868: 'iterator_category' : illegal syntax for using-declaration; expected qualified-name
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:\VS98\INCLUDE\utility(82) : error C2039: 'value_type' : is not a member of '`global namespace''
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:\VS98\INCLUDE\utility(82) : error C2146: syntax error : missing ';' before identifier 'value_type'
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:\VS98\INCLUDE\utility(82) : error C2868: 'value_type' : illegal syntax for using-declaration; expected qualified-name
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:\VS98\INCLUDE\utility(83) : error C2039: 'distance_type' : is not a member of '`global namespace''
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:\VS98\INCLUDE\utility(83) : error C2146: syntax error : missing ';' before identifier 'distance_type'
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:\VS98\INCLUDE\utility(83) : error C2868: 'distance_type' : illegal syntax for using-declaration; expected qualified-name
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(79) : error C2039: 'reference' : is not a member of 'iterator_traits<int *>'
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(79) : error C2146: syntax error : missing ';' before identifier 'r1_t'
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(79) : error C2065: 'r1_t' : undeclared identifier
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(80) : error C2039: 'reference' : is not a member of 'iterator_traits<int *>'
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(83) : error C2955: 'is_reference' : use of class template requires template argument list
../..\boost/type_traits/composite_traits.hpp(209) : see declaration of 'is_reference'
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(84) : error C2027: use of undefined type 'is_reference<int>'
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(84) : error C2065: 'value' : undeclared identifier
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(85) : error C2955: 'is_same' : use of class template requires template argument list
../..\boost/type_traits/same_traits.hpp(56) : see declaration of 'is_same'
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(86) : error C2039: 'value' : is not a member of 'is_same'
../..\boost/type_traits/same_traits.hpp(56) : see declaration of 'is_same'
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(86) : error C2955: 'ice_and' : use of class template requires template argument list
../..\boost/type_traits/ice.hpp(60) : see declaration of 'ice_and'
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:\VS98\INCLUDE\utility(81) : error C2039: 'iterator_category' : is not a member of '`global namespace''
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<bool *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
e:\VS98\INCLUDE\utility(81) : error C2146: syntax error : missing ';' before identifier 'iterator_category'
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<bool *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
e:\VS98\INCLUDE\utility(81) : error C2868: 'iterator_category' : illegal syntax for using-declaration; expected qualified-name
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<bool *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
e:\VS98\INCLUDE\utility(82) : error C2039: 'value_type' : is not a member of '`global namespace''
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<bool *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
e:\VS98\INCLUDE\utility(82) : error C2146: syntax error : missing ';' before identifier 'value_type'
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<bool *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
e:\VS98\INCLUDE\utility(82) : error C2868: 'value_type' : illegal syntax for using-declaration; expected qualified-name
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<bool *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
e:\VS98\INCLUDE\utility(83) : error C2039: 'distance_type' : is not a member of '`global namespace''
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<bool *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
e:\VS98\INCLUDE\utility(83) : error C2146: syntax error : missing ';' before identifier 'distance_type'
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<bool *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
e:\VS98\INCLUDE\utility(83) : error C2868: 'distance_type' : illegal syntax for using-declaration; expected qualified-name
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation 'std::iterator_traits<bool *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(79) : error C2039: 'reference' : is not a member of 'iterator_traits<bool *>'
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(79) : error C2146: syntax error : missing ';' before identifier 'r1_t'
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(80) : error C2039: 'reference' : is not a member of 'iterator_traits<bool *>'
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(83) : error C2955: 'is_reference' : use of class template requires template argument list
../..\boost/type_traits/composite_traits.hpp(209) : see declaration of 'is_reference'
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(84) : error C2027: use of undefined type 'is_reference<int>'
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(85) : error C2955: 'is_same' : use of class template requires template argument list
../..\boost/type_traits/same_traits.hpp(56) : see declaration of 'is_same'
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(86) : error C2039: 'value' : is not a member of 'is_same'
../..\boost/type_traits/same_traits.hpp(56) : see declaration of 'is_same'
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
../../libs/type_traits/iter_swap_example.cpp(86) : error C2955: 'ice_and' : use of class template requires template argument list
../..\boost/type_traits/ice.hpp(60) : see declaration of 'ice_and'
../../libs/type_traits/iter_swap_example.cpp(104) : see reference to function template instantiation 'void __cdecl opt::iter_swap(bool *,bool *)' being compiled
Fail
** Microsoft Visual C++ with STLport
cl /c /nologo /Zm400 /MDd /W3 /GR /GX /Zi /Od /GZ /I "e:/stlport/stlport" /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" ../../libs/type_traits/iter_swap_example.cpp
iter_swap_example.cpp
../../libs/type_traits/iter_swap_example.cpp(108) : warning C4508: 'main' : function should return a value; 'void' return type assumed
e:/stlport/stlport\stl/_iterator_base.h(103) : error C2039: 'iterator_category' : is not a member of '`global namespace''
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation '_STL::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:/stlport/stlport\stl/_iterator_base.h(103) : error C2146: syntax error : missing ';' before identifier 'iterator_category'
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation '_STL::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:/stlport/stlport\stl/_iterator_base.h(103) : error C2868: 'iterator_category' : illegal syntax for using-declaration; expected qualified-name
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation '_STL::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:/stlport/stlport\stl/_iterator_base.h(104) : error C2039: 'value_type' : is not a member of '`global namespace''
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation '_STL::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:/stlport/stlport\stl/_iterator_base.h(104) : error C2146: syntax error : missing ';' before identifier 'value_type'
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation '_STL::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:/stlport/stlport\stl/_iterator_base.h(104) : error C2868: 'value_type' : illegal syntax for using-declaration; expected qualified-name
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation '_STL::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:/stlport/stlport\stl/_iterator_base.h(105) : error C2039: 'difference_type' : is not a member of '`global namespace''
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation '_STL::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:/stlport/stlport\stl/_iterator_base.h(105) : error C2146: syntax error : missing ';' before identifier 'difference_type'
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation '_STL::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:/stlport/stlport\stl/_iterator_base.h(105) : error C2868: 'difference_type' : illegal syntax for using-declaration; expected qualified-name
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation '_STL::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:/stlport/stlport\stl/_iterator_base.h(106) : error C2039: 'pointer' : is not a member of '`global namespace''
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation '_STL::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:/stlport/stlport\stl/_iterator_base.h(106) : error C2146: syntax error : missing ';' before identifier 'pointer'
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation '_STL::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:/stlport/stlport\stl/_iterator_base.h(106) : error C2868: 'pointer' : illegal syntax for using-declaration; expected qualified-name
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation '_STL::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:/stlport/stlport\stl/_iterator_base.h(107) : error C2039: 'reference' : is not a member of '`global namespace''
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation '_STL::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:/stlport/stlport\stl/_iterator_base.h(107) : error C2146: syntax error : missing ';' before identifier 'reference'
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation '_STL::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
e:/stlport/stlport\stl/_iterator_base.h(107) : error C2868: 'reference' : illegal syntax for using-declaration; expected qualified-name
../../libs/type_traits/iter_swap_example.cpp(79) : see reference to class template instantiation '_STL::iterator_traits<int *>' being compiled
../../libs/type_traits/iter_swap_example.cpp(103) : see reference to function template instantiation 'void __cdecl opt::iter_swap(int *,int *)' being compiled
Fail

View File

@ -1,78 +0,0 @@
// (C) Copyright John Maddock 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.
#include <boost/type_traits/transform_traits.hpp>
#include <boost/type_traits/cv_traits.hpp>
#include <boost/utility.hpp>
#ifdef __BORLANDC__
#pragma hrdstop
#endif
#include "boost/type_traits/type_traits_test.hpp"
int main(int argc, char* argv[])
{
type_test(int, boost::remove_const<const int>::type)
type_test(volatile int, boost::remove_const<volatile int>::type)
type_test(volatile int, boost::remove_const<const volatile int>::type)
type_test(int, boost::remove_const<int>::type)
type_test(int*, boost::remove_const<int* const>::type)
type_test(int, boost::remove_volatile<volatile int>::type)
type_test(const int, boost::remove_volatile<const int>::type)
type_test(const int, boost::remove_volatile<const volatile int>::type)
type_test(int, boost::remove_volatile<int>::type)
type_test(int*, boost::remove_volatile<int* volatile>::type)
type_test(int, boost::remove_cv<volatile int>::type)
type_test(int, boost::remove_cv<const int>::type)
type_test(int, boost::remove_cv<const volatile int>::type)
type_test(int, boost::remove_cv<int>::type)
type_test(int*, boost::remove_cv<int* volatile>::type)
type_test(int*, boost::remove_cv<int* const>::type)
type_test(int*, boost::remove_cv<int* const volatile>::type)
type_test(const int *, boost::remove_cv<const int * const>::type)
type_test(int, boost::remove_reference<int>::type)
type_test(const int, boost::remove_reference<const int>::type)
type_test(int, boost::remove_reference<int&>::type)
type_test(const int, boost::remove_reference<const int&>::type)
type_test(volatile int, boost::remove_reference<volatile int&>::type)
type_test(int, boost::remove_reference<cr_type>::type)
type_test(int, boost::remove_bounds<int>::type)
type_test(int*, boost::remove_bounds<int*>::type)
type_test(int, boost::remove_bounds<int[3]>::type)
type_test(int[3], boost::remove_bounds<int[2][3]>::type)
type_test(int, boost::remove_pointer<int>::type)
type_test(int, boost::remove_pointer<int*>::type)
type_test(const int, boost::remove_pointer<const int*>::type)
type_test(int, boost::remove_pointer<int*const>::type)
type_test(volatile int, boost::remove_pointer<volatile int*const volatile>::type)
type_test(int[3], boost::remove_pointer<int[3]>::type)
type_test(int[2][3], boost::remove_pointer<int[2][3]>::type)
type_test(int&, boost::add_reference<int>::type)
type_test(const int&, boost::add_reference<const int>::type)
#if defined(BOOST_MSVC6_MEMBER_TEMPLATES) || !defined(BOOST_NO_MEMBER_TEMPLATES)
type_test(int&, boost::add_reference<int&>::type)
type_test(const int&, boost::add_reference<const int&>::type)
#endif
return check_result(argc, argv);
}
//
// define the number of failures expected for given compilers:
#ifdef __BORLANDC__
unsigned int expected_failures = 4; // cv-qualifiers
#elif defined(__GNUC__)
unsigned int expected_failures = 1; // cv-qualified references
#else
unsigned int expected_failures = 0;
#endif

76
doc/Jamfile.v2 Normal file
View File

@ -0,0 +1,76 @@
# Copyright John Maddock 2005. 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)
import modules ;
using quickbook ;
using auto-index ;
path-constant boost-images : ../../../doc/src/images ;
path-constant here : . ;
xml type_traits : type_traits.qbk ;
boostbook standalone
:
type_traits
:
# Index generation:
# Path for links to Boost:
<xsl:param>boost.root=../../../..
# Some general style settings:
<xsl:param>table.footnote.number.format=1
<xsl:param>footnote.number.format=1
# HTML options first:
# Use graphics not text for navigation:
<xsl:param>navig.graphics=1
# How far down we chunk nested sections, basically all of them:
<xsl:param>chunk.section.depth=10
# Don't put the first section on the same page as the TOC:
<xsl:param>chunk.first.sections=1
# How far down sections get TOC's
<xsl:param>toc.section.depth=10
# Max depth in each TOC:
<xsl:param>toc.max.depth=4
# How far down we go with TOC's
<xsl:param>generate.section.toc.level=10
# PDF Options:
# TOC Generation: this is needed for FOP-0.9 and later:
<xsl:param>fop1.extensions=0
<xsl:param>xep.extensions=1
# TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9!
<xsl:param>fop.extensions=0
# No indent on body text:
<xsl:param>body.start.indent=0pt
# Margin size:
<xsl:param>page.margin.inner=0.5in
# Margin size:
<xsl:param>page.margin.outer=0.5in
# Paper type = A4
<xsl:param>paper.type=A4
# Yes, we want graphics for admonishments:
<xsl:param>admon.graphics=1
# Set this one for PDF generation *only*:
# default pnd graphics are awful in PDF form,
# better use SVG's instead:
<format>pdf:<xsl:param>admon.graphics.extension=".svg"
<format>pdf:<xsl:param>admon.graphics.path=$(boost-images)/
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/type_traits/doc/html
<format>pdf:<auto-index-internal>off
<format>html:<auto-index-internal>on
<auto-index-script>$(here)/index.idx
<auto-index-prefix>$(here)/../../..
<auto-index>on
;
install pdfinstall : standalone/<format>pdf : <install-type>PDF <location>. <name>type_traits.pdf ;
explicit pdfinstall ;
###############################################################################
alias boostdoc ;
explicit boostdoc ;
alias boostrelease : standalone ;
explicit boostrelease ;

41
doc/add_const.qbk Normal file
View File

@ -0,0 +1,41 @@
[/
Copyright 2007 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:add_const add_const]
template <class T>
struct add_const
{
typedef __below type;
};
template <class T> using add_const_t = typename add_const<T>::type; // C++11 and above
__type The same type as `T const` for all `T`.
__std_ref 3.9.3.
__header ` #include <boost/type_traits/add_const.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
[ [Expression] [Result Type]]
[[`add_const<int>::type`][`int const`]]
[[`add_const<int&>::type`] [`int&`]]
[[`add_const<int*>::type`] [`int* const`]]
[[`add_const<int const>::type`] [`int const`]]
]
[all_compilers]
[endsect]

41
doc/add_cv.qbk Normal file
View File

@ -0,0 +1,41 @@
[/
Copyright 2007 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:add_cv add_cv]
template <class T>
struct add_cv
{
typedef __below type;
};
template <class T> using add_cv_t = typename add_cv<T>::type; // C++11 and above
__type The same type as `T const volatile` for all `T`.
__std_ref 3.9.3.
__header ` #include <boost/type_traits/add_cv.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
[ [Expression] [Result Type]]
[[`add_cv<int>::type`][`int const volatile`]]
[[`add_cv<int&>::type`] [`int&`]]
[[`add_cv<int*>::type`] [`int* const volatile`]]
[[`add_cv<int const>::type`] [`int const volatile`]]
]
[all_compilers]
[endsect]

View File

@ -0,0 +1,47 @@
[/
Copyright 2010 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:add_lvalue_reference add_lvalue_reference]
template <class T>
struct add_lvalue_reference
{
typedef __below type;
};
template <class T> using add_lvalue_reference_t = typename add_lvalue_reference<T>::type; // C++11 and above
__type If `T` names an object or function type then the member typedef `type`
shall name `T&`; otherwise, if `T` names a type ['rvalue reference to U] then
the member typedef type shall name `U&`; otherwise, type shall name `T`.
__std_ref 20.7.6.2.
__header ` #include <boost/type_traits/add_lvalue_reference.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
[ [Expression] [Result Type]]
[[`add_lvalue_reference<int>::type`][`int&`]]
[[`add_lvalue_reference<int const&>::type`] [`int const&`]]
[[`add_lvalue_reference<int*>::type`] [`int*&`]]
[[`add_lvalue_reference<int*&>::type`] [`int*&`]]
[[`add_lvalue_reference<int&&>::type`][`int&`]]
[[`add_lvalue_reference<void>::type`][`void`]]
]
[all_compilers]
[endsect]

45
doc/add_pointer.qbk Normal file
View File

@ -0,0 +1,45 @@
[/
Copyright 2007 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:add_pointer add_pointer]
template <class T>
struct add_pointer
{
typedef __below type;
};
template <class T> using add_pointer_t = typename add_pointer<T>::type; // C++11 and above
__type The same type as `remove_reference<T>::type*`.
The rationale for this template
is that it produces the same type as `decltype(&t)`,
where `t` is an object of type `T`.
__std_ref 8.3.1.
__header ` #include <boost/type_traits/add_pointer.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
[ [Expression] [Result Type]]
[[`add_pointer<int>::type`][`int*`]]
[[`add_pointer<int const&>::type`] [`int const*`]]
[[`add_pointer<int*>::type`] [`int**`]]
[[`add_pointer<int*&>::type`] [`int**`]]
]
[all_compilers]
[endsect]

47
doc/add_reference.qbk Normal file
View File

@ -0,0 +1,47 @@
[/
Copyright 2007 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:add_reference add_reference]
[note This trait has been made obsolete by __add_lvalue_reference and __add_rvalue_reference,
and new code should use these new traits rather than __is_reference which is retained
for backwards compatibility only.
]
template <class T>
struct add_reference
{
typedef __below type;
};
template <class T> using add_reference_t = typename add_reference<T>::type; // C++11 and above
__type If `T` is not a reference type then `T&`, otherwise `T`.
__std_ref 8.3.2.
__header ` #include <boost/type_traits/add_reference.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
[ [Expression] [Result Type]]
[[`add_reference<int>::type`][`int&`]]
[[`add_reference<int const&>::type`] [`int const&`]]
[[`add_reference<int*>::type`] [`int*&`]]
[[`add_reference<int*&>::type`] [`int*&`]]
]
[all_compilers]
[endsect]

View File

@ -0,0 +1,49 @@
[/
Copyright 2010 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:add_rvalue_reference add_rvalue_reference]
template <class T>
struct add_rvalue_reference
{
typedef __below type;
};
template <class T> using add_rvalue_reference_t = typename add_rvalue_reference<T>::type; // C++11 and above
__type If `T` names an object or function type then the member typedef type
shall name `T&&`; otherwise, type shall name `T`. ['\[Note: This rule reflects
the semantics of reference collapsing. For example, when a type `T` names
a type U&, the type `add_rvalue_reference<T>::type` is not an rvalue
reference. -end note\]].
__std_ref 20.7.6.2.
__header ` #include <boost/type_traits/add_rvalue_reference.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
[ [Expression] [Result Type]]
[[`add_rvalue_reference<int>::type`][`int&&`]]
[[`add_rvalue_reference<int const&>::type`] [`int const&`]]
[[`add_rvalue_reference<int*>::type`] [`int*&&`]]
[[`add_rvalue_reference<int*&>::type`] [`int*&`]]
[[`add_rvalue_reference<int&&>::type`][`int&&`]]
[[`add_rvalue_reference<void>::type`][`void`]]
]
__compat In the absence of rvalue-reference support this trait has no effect.
[endsect]

41
doc/add_volatile.qbk Normal file
View File

@ -0,0 +1,41 @@
[/
Copyright 2007 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:add_volatile add_volatile]
template <class T>
struct add_volatile
{
typedef __below type;
};
template <class T> using add_volatile_t = typename add_volatile<T>::type; // C++11 and above
__type The same type as `T volatile` for all `T`.
__std_ref 3.9.3.
__header ` #include <boost/type_traits/add_volatile.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
[ [Expression] [Result Type]]
[[`add_volatile<int>::type`][`int volatile`]]
[[`add_volatile<int&>::type`] [`int&`]]
[[`add_volatile<int*>::type`] [`int* volatile`]]
[[`add_volatile<int const>::type`] [`int const volatile`]]
]
[all_compilers]
[endsect]

54
doc/aligned_storage.qbk Normal file
View File

@ -0,0 +1,54 @@
[/
Copyright 2007 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:aligned_storage aligned_storage]
template <std::size_t Size, std::size_t Align>
struct aligned_storage
{
typedef __below type;
};
__type a built-in or POD type with size `Size` and an alignment
that is a multiple of `Align`.
__header ` #include <boost/type_traits/aligned_storage.hpp>` or ` #include <boost/type_traits.hpp>`
On the GCC and Visual C++ compilers (or compilers that are compatible with them), we support
requests for types with alignments greater than any built in type (up to 128-bit alignment).
Visual C++ users should note that such "extended" types can not be passed down the stack as
by-value function arguments.
[important
Visual C++ users should be aware that MSVC has an elastic definition of alignment, for
example consider the following code:
``
typedef boost::aligned_storage<8,8>::type align_t;
assert(boost::alignment_of<align_t>::value % 8 == 0);
align_t a;
assert(((std::uintptr_t)&a % 8) == 0);
char c = 0;
align_t a1;
assert(((std::uintptr_t)&a1 % 8) == 0);
``
In this code the final assert will fail for a 32-bit build because variable `a1` is not
aligned on an 8-byte boundary. Had we used the MSVC intrinsic `__alignof` in
place of `alignment_of` or `std::aligned_storage` in place of `boost::aligned_storage`
the result would have been no different. In MSVC alignment requirements/promises only
really apply to variables on the heap, not on the stack.
Further, although MSVC has a mechanism for generating new types with arbitrary alignment
requirements, such types cannot be passed as function arguments on the program stack.
Therefore had `boost::aligned_storage<8,8>::type` been a type declared with
`__declspec(align(8))` we would break a great deal of existing code that relies on
being able to pass such types through the program stack.
]
[endsect]

55
doc/alignment_of.qbk Normal file
View File

@ -0,0 +1,55 @@
[/
Copyright 2007 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:alignment_of alignment_of]
template <class T>
struct alignment_of : public __integral_constant<std::size_t, ALIGNOF(T)> {};
__inherit Class template `alignment_of` inherits from
`__integral_constant<std::size_t, ALIGNOF(T)>`, where `ALIGNOF(T)` is the
alignment of type T.
['Note: strictly speaking you should only rely on
the value of `ALIGNOF(T)` being a multiple of the true alignment of T, although
in practice it does compute the correct value in all the cases we know about.]
__header ` #include <boost/type_traits/alignment_of.hpp>` or ` #include <boost/type_traits.hpp>`
__examples
[:`alignment_of<int>` inherits from `__integral_constant<std::size_t, ALIGNOF(int)>`.]
[:`alignment_of<char>::type` is the type `__integral_constant<std::size_t, ALIGNOF(char)>`.]
[:`alignment_of<double>::value` is an integral constant
expression with value `ALIGNOF(double)`.]
[:`alignment_of<T>::value_type` is the type `std::size_t`.]
[important
Visual C++ users should note that MSVC has varying definitions of "alignment".
For example consider the following code:
``
typedef long long align_t;
assert(boost::alignment_of<align_t>::value % 8 == 0);
align_t a;
assert(((std::uintptr_t)&a % 8) == 0);
char c = 0;
align_t a1;
assert(((std::uintptr_t)&a1 % 8) == 0);
``
In this code, even though `boost::alignment_of<align_t>` reports that `align_t` has 8-byte
alignment, the final assert will fail for a 32-bit build because `a1` is not aligned on an
8 byte boundary. Note that had we used the MSVC intrinsic `__alignof` in place of `boost::alignment_of`
we would still get the same result. In fact for MSVC alignment requirements (and promises) only really
apply to dynamic storage, and not the stack.
]
[endsect]

24
doc/alignment_traits.qbk Normal file
View File

@ -0,0 +1,24 @@
[/
Copyright 2007 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:alignment Synthesizing Types with Specific Alignments]
Some low level memory management routines need to synthesize a POD type with
specific alignment properties. The template `__type_with_alignment` finds the smallest
type with a specified alignment, while template `__aligned_storage` creates a type
with a specific size and alignment.
[*Synopsis]
template <std::size_t Align>
struct __type_with_alignment;
template <std::size_t Size, std::size_t Align>
struct __aligned_storage;
[endsect]

322
doc/background.qbk Normal file
View File

@ -0,0 +1,322 @@
[/
Copyright 2007 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:background Background and Tutorial]
The following is an updated version of the article "C++ Type traits"
by John Maddock and Steve Cleary that appeared in the October 2000
issue of [@http://www.ddj.com Dr Dobb's Journal].
Generic programming (writing code which works with any data type meeting a
set of requirements) has become the method of choice for providing reusable code.
However, there are times in generic programming when "generic" just isn't
good enough - sometimes the differences between types are too large for an
efficient generic implementation. This is when the traits technique
becomes important - by encapsulating those properties that need to be
considered on a type by type basis inside a traits class, we can
minimize the amount of code that has to differ from one type to another,
and maximize the amount of generic code.
Consider an example: when working with character strings, one common operation is
to determine the length of a null terminated string. Clearly it's possible to
write generic code that can do this, but it turns out that there are much more
efficient methods available: for example, the C library functions `strlen` and
`wcslen` are usually written in assembler, and with suitable hardware support
can be considerably faster than a generic version written in C++.
The authors of the C++ standard library realized this, and abstracted the
properties of `char` and `wchar_t` into the class `char_traits`. Generic code
that works with character strings can simply use `char_traits<>::length` to
determine the length of a null terminated string, safe in the knowledge
that specializations of `char_traits` will use the most appropriate method
available to them.
[h4 Type Traits]
Class `char_traits` is a classic example of a collection of type specific
properties wrapped up in a single class - what Nathan Myers termed a
/baggage class/[link background.references \[1\]]. In the Boost type-traits library, we[link background.references \[2\]] have written a
set of very specific traits classes, each of which encapsulate a single trait
from the C++ type system; for example, is a type a pointer or a reference type?
Or does a type have a trivial constructor, or a const-qualifier?
The type-traits classes share a unified design: each class inherits from
the type __true_type if the type has the specified property and inherits from
__false_type otherwise. As we will show, these classes can be used in
generic programming to determine the properties of a given type and introduce
optimizations that are appropriate for that case.
The type-traits library also contains a set of classes that perform a
specific transformation on a type; for example, they can remove a
top-level const or volatile qualifier from a type. Each class that
performs a transformation defines a single typedef-member `type`
that is the result of the transformation. All of the type-traits
classes are defined inside namespace `boost`; for brevity, namespace-qualification
is omitted in most of the code samples given.
[h4 Implementation]
There are far too many separate classes contained in the type-traits library
to give a full implementation here - see the source code in the Boost library
for the full details - however, most of the implementation is fairly repetitive
anyway, so here we will just give you a flavor for how some of the classes are
implemented. Beginning with possibly the simplest class in the library,
`is_void<T>` inherits from `__true_type` only if `T` is `void`.
template <typename T>
struct __is_void : public __false_type{};
template <>
struct __is_void<void> : public __true_type{};
Here we define a primary version of the template class `__is_void`, and
provide a full-specialization when `T` is `void`. While full specialization
of a template class is an important technique, sometimes we need a
solution that is halfway between a fully generic solution, and a full
specialization. This is exactly the situation for which the standards committee
defined partial template-class specialization. As an example, consider the
class `boost::is_pointer<T>`: here we needed a primary version that handles
all the cases where T is not a pointer, and a partial specialization to
handle all the cases where T is a pointer:
template <typename T>
struct __is_pointer : public __false_type{};
template <typename T>
struct __is_pointer<T*> : public __true_type{};
The syntax for partial specialization is somewhat arcane and could easily
occupy an article in its own right; like full specialization, in order to
write a partial specialization for a class, you must first declare the
primary template. The partial specialization contains an extra <...> after the
class name that contains the partial specialization parameters; these define
the types that will bind to that partial specialization rather than the
default template. The rules for what can appear in a partial specialization
are somewhat convoluted, but as a rule of thumb if you can legally write two
function overloads of the form:
void foo(T);
void foo(U);
Then you can also write a partial specialization of the form:
template <typename T>
class c{ /*details*/ };
template <typename T>
class c<U>{ /*details*/ };
This rule is by no means foolproof, but it is reasonably simple to remember
and close enough to the actual rule to be useful for everyday use.
As a more complex example of partial specialization consider the class
`remove_extent<T>`. This class defines a single typedef-member `type` that
is the same type as T but with any top-level array bounds removed;
this is an example of a traits class that performs a transformation on a type:
template <typename T>
struct __remove_extent
{ typedef T type; };
template <typename T, std::size_t N>
struct __remove_extent<T[N]>
{ typedef T type; };
The aim of `__remove_extent` is this: imagine a generic algorithm that is
passed an array type as a template parameter, `__remove_extent` provides a
means of determining the underlying type of the array. For example
`remove_extent<int[4][5]>::type` would evaluate to the type `int[5]`.
This example also shows that the number of template parameters in a
partial specialization does not have to match the number in the
default template. However, the number of parameters that appear after the
class name do have to match the number and type of the parameters in the
default template.
[h4 Optimized copy]
As an example of how the type traits classes can be used, consider the
standard library algorithm copy:
template<typename Iter1, typename Iter2>
Iter2 copy(Iter1 first, Iter1 last, Iter2 out);
Obviously, there's no problem writing a generic version of copy that works
for all iterator types `Iter1` and `Iter2`; however, there are some
circumstances when the copy operation can best be performed by a call to
`memcpy`. In order to implement copy in terms of `memcpy` all of the
following conditions need to be met:
* Both of the iterator types `Iter1` and `Iter2` must be pointers.
* Both `Iter1` and `Iter2` must point to the same type - excluding const and
volatile-qualifiers.
* The type pointed to by `Iter1` must have a trivial assignment operator.
By trivial assignment operator we mean that the type is either a scalar type[link background.references \[3\]] or:
* The type has no user defined assignment operator.
* The type does not have any data members that are references.
* All base classes, and all data member objects must have trivial assignment operators.
If all these conditions are met then a type can be copied using `memcpy`
rather than using a compiler generated assignment operator. The type-traits
library provides a class `__has_trivial_assign`, such that
`has_trivial_assign<T>::value` is true only if T has a trivial assignment operator.
This class "just works" for scalar types, but has to be explicitly
specialised for class/struct types that also happen to have a trivial assignment
operator. In other words if __has_trivial_assign gives the wrong answer,
it will give the "safe" wrong answer - that trivial assignment is not allowable.
The code for an optimized version of copy that uses `memcpy` where appropriate is
given in [link boost_typetraits.examples.copy the examples]. The code begins by defining a template
function `do_copy` that performs a "slow but safe" copy. The last parameter passed
to this function may be either a `__true_type` or a `__false_type`. Following that
there is an overload of do_copy that uses `memcpy`: this time the iterators are required
to actually be pointers to the same type, and the final parameter must be a
`__true_type`. Finally, the version of `copy` calls `do_copy`, passing
`__has_trivial_assign<value_type>()` as the final parameter: this will dispatch
to the optimized version where appropriate, otherwise it will call the
"slow but safe version".
[h4 Was it worth it?]
It has often been repeated in these columns that "premature optimization is the
root of all evil" [link background.references \[4\]]. So the question must be asked: was our optimization
premature? To put this in perspective the timings for our version of copy
compared a conventional generic copy[link background.references \[5\]] are shown in table 1.
Clearly the optimization makes a difference in this case; but, to be fair,
the timings are loaded to exclude cache miss effects - without this
accurate comparison between algorithms becomes difficult. However, perhaps
we can add a couple of caveats to the premature optimization rule:
*If you use the right algorithm for the job in the first place then optimization
will not be required; in some cases, memcpy is the right algorithm.
*If a component is going to be reused in many places by many people then
optimizations may well be worthwhile where they would not be so for a single
case - in other words, the likelihood that the optimization will be
absolutely necessary somewhere, sometime is that much higher.
Just as importantly the perceived value of the stock implementation will be
higher: there is no point standardizing an algorithm if users reject it on
the grounds that there are better, more heavily optimized versions available.
[table Time taken to copy 1000 elements using `copy<const T*, T*>` (times in micro-seconds)
[[Version] [T] [Time]]
[["Optimized" copy] [char] [0.99]]
[[Conventional copy] [char] [8.07]]
[["Optimized" copy] [int] [2.52]]
[[Conventional copy] [int] [8.02]]
]
[h4 Pair of References]
The optimized copy example shows how type traits may be used to perform
optimization decisions at compile-time. Another important usage of type traits
is to allow code to compile that otherwise would not do so unless excessive
partial specialization is used. This is possible by delegating partial
specialization to the type traits classes. Our example for this form of
usage is a pair that can hold references [link background.references \[6\]].
First, let us examine the definition of `std::pair`, omitting the
comparison operators, default constructor, and template copy constructor for
simplicity:
template <typename T1, typename T2>
struct pair
{
typedef T1 first_type;
typedef T2 second_type;
T1 first;
T2 second;
pair(const T1 & nfirst, const T2 & nsecond)
:first(nfirst), second(nsecond) { }
};
Now, this "pair" cannot hold references as it currently stands, because the
constructor would require taking a reference to a reference, which is
currently illegal [link background.references \[7\]]. Let us consider what the constructor's parameters
would have to be in order to allow "pair" to hold non-reference types,
references, and constant references:
[table Required Constructor Argument Types
[[Type of `T1`] [Type of parameter to initializing constructor]]
[[T] [const T &]]
[[T &] [T &]]
[[const T &] [const T &]]
]
A little familiarity with the type traits classes allows us to construct a
single mapping that allows us to determine the type of parameter from the
type of the contained class. The type traits classes provide a
transformation __add_reference, which adds a reference to its type,
unless it is already a reference.
[table Using add_reference to synthesize the correct constructor type
[[Type of `T1`] [Type of `const T1`] [Type of `add_reference<const T1>::type`]]
[[T] [const T] [const T &]]
[[T &] [T & \[8\]] [T &]]
[[const T &] [const T &] [const T &]]
]
This allows us to build a primary template definition for `pair` that can
contain non-reference types, reference types, and constant reference types:
template <typename T1, typename T2>
struct pair
{
typedef T1 first_type;
typedef T2 second_type;
T1 first;
T2 second;
pair(boost::__add_reference<const T1>::type nfirst,
boost::__add_reference<const T2>::type nsecond)
:first(nfirst), second(nsecond) { }
};
Add back in the standard comparison operators, default constructor,
and template copy constructor (which are all the same), and you have a
`std::pair` that can hold reference types!
This same extension could have been done using partial template specialization
of `pair`, but to specialize `pair` in this way would require three partial
specializations, plus the primary template. Type traits allows us to
define a single primary template that adjusts itself auto-magically to
any of these partial specializations, instead of a brute-force partial
specialization approach. Using type traits in this fashion allows
programmers to delegate partial specialization to the type traits classes,
resulting in code that is easier to maintain and easier to understand.
[h4 Conclusion]
We hope that in this article we have been able to give you some idea of
what type-traits are all about. A more complete listing of the available
classes are in the boost documentation, along with further examples using
type traits. Templates have enabled C++ uses to take the advantage of the
code reuse that generic programming brings; hopefully this article has
shown that generic programming does not have to sink to the lowest common
denominator, and that templates can be optimal as well as generic.
[h4 Acknowledgements]
The authors would like to thank Beman Dawes and Howard Hinnant for their
helpful comments when preparing this article.
[h4 [#background.references]References]
# Nathan C. Myers, C++ Report, June 1995.
# The type traits library is based upon contributions by Steve Cleary, Beman Dawes, Howard Hinnant and John Maddock: it can be found at www.boost.org.
# A scalar type is an arithmetic type (i.e. a built-in integer or floating point type), an enumeration type, a pointer, a pointer to member, or a const- or volatile-qualified version of one of these types.
# This quote is from Donald Knuth, ACM Computing Surveys, December 1974, pg 268.
# The test code is available as part of the boost utility library (see algo_opt_examples.cpp), the code was compiled with gcc 2.95 with all optimisations turned on, tests were conducted on a 400MHz Pentium II machine running Microsoft Windows 98.
# John Maddock and Howard Hinnant have submitted a "compressed_pair" library to Boost, which uses a technique similar to the one described here to hold references. Their pair also uses type traits to determine if any of the types are empty, and will derive instead of contain to conserve space -- hence the name "compressed".
# This is actually an issue with the C++ Core Language Working Group (issue #106), submitted by Bjarne Stroustrup. The tentative resolution is to allow a "reference to a reference to T" to mean the same thing as a "reference to T", but only in template instantiation, in a method similar to multiple cv-qualifiers.
# For those of you who are wondering why this shouldn't be const-qualified, remember that references are always implicitly constant (for example, you can't re-assign a reference). Remember also that "const T &" is something completely different. For this reason, cv-qualifiers on template type arguments that are references are ignored.
[endsect]

218
doc/common_type.qbk Normal file
View File

@ -0,0 +1,218 @@
[/
Copyright 2008 Howard Hinnant
Copyright 2008 Beman Dawes
Copyright 2010 John Maddock
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[/===================================================================]
[section:common_type common_type]
[/===================================================================]
__header ` #include <boost/type_traits/common_type.hpp>` or ` #include <boost/type_traits.hpp>`
namespace boost {
template <class... T> struct common_type;
template<class... T> using common_type_t = typename common_type<T...>::type; // C++11 and above
}
`common_type` is a traits class used to deduce a type common to a several types, useful as the return type of functions
operating on multiple input types such as in mixed-mode arithmetic..
The nested typedef `::type` could be defined as follows:
template <class... T>
struct common_type;
template <class T, class U, class... V>
struct common_type<T, U, V...> {
typedef typename common_type<typename common_type<T, U>::type, V...>::type type;
};
template <>
struct common_type<> {
};
template <class T>
struct common_type<T> {
typedef typename __decay<T>::type type;
};
template <class T, class U>
struct common_type<T, U> {
typedef typename __decay<
decltype( __declval<bool>()?
__declval<typename __decay<T>::type>():
__declval<typename __decay<U>::type>() )
>::type type;
};
All parameter types must be complete. This trait is permitted to be specialized by a user if at least one
template parameter is a user-defined type. [*Note:] Such specializations are required when only explicit conversions
are desired among the `common_type` arguments.
Note that when the compiler does not support variadic templates (and the macro `BOOST_NO_CXX11_VARIADIC_TEMPLATES` is defined)
then the maximum number of template arguments is 9.
[h4 Tutorial]
In a nutshell, `common_type` is a trait that takes 1 or more types, and returns a type which
all of the types will convert to. The default definition demands this conversion be implicit.
However the trait can be specialized for user-defined types which want to limit their inter-type conversions to explicit,
and yet still want to interoperate with the `common_type` facility.
[*Example:]
template <class T, class U>
complex<typename common_type<T, U>::type>
operator+(complex<T>, complex<U>);
In the above example, "mixed-mode" complex arithmetic is allowed. The return type is described by `common_type`.
For example the resulting type of adding a `complex<float>` and `complex<double>` might be a `complex<double>`.
Here is how someone might produce a variadic comparison function:
template <class ...T>
typename common_type<T...>::type
min(T... t);
This is a very useful and broadly applicable utility.
[h4 How to get the common type of types with explicit conversions?]
Another choice for the author of the preceding operator could be
template <class T, class U>
typename common_type<complex<T>, complex<U> >::type
operator+(complex<T>, complex<U>);
As the default definition of `common_type` demands the conversion be implicit, we need to specialize the trait for complex types as follows.
template <class T, class U>
struct common_type<complex<T>, complex<U> > {
typedef complex< common_type<T, U> > type;
};
[h4 How important is the order of the `common_type<>` template arguments?]
The order of the template parameters is important.
`common_type<A,B,C>::type` is not equivalent to `common_type<C,A,B>::type`, but to `common_type<common_type<A,B>::type, C>::type`.
Consider
struct A {};
struct B {};
struct C {
C() {}
C(A const&) {}
C(B const&) {}
C& operator=(C const&) {
return *this;
}
};
The following doesn't compile
typedef boost::common_type<A, B, C>::type ABC; // Does not compile
while
typedef boost::common_type<C, A, B>::type ABC;
compiles.
Thus, as `common_type<A,B>::type` is undefined, `common_type<A,B,C>::type` is also undefined.
It is intended that clients who wish for `common_type<A, B>` to be well
defined to define it themselves:
namespace boost
{
template <>
struct common_type<A, B> {typedef C type;};
}
Now this client can ask for `common_type<A, B, C>` (and get
the same answer).
Clients wanting to ask `common_type<A, B, C>` in any order and get the same result need to add in addition:
namespace boost
{
template <> struct common_type<B, A>
: public common_type<A, B> {};
}
This is needed as the specialization of `common_type<A, B>` is not be used implicitly for `common_type<B, A>`.
[h4 Can the `common_type` of two types be a third type?]
Given the preceding example, one might expect `common_type<A,B>::type` to be `C` without any intervention from the user.
But the default `common_type<>` implementation doesn't grant that. It is intended that clients who wish for `common_type<A, B>`
to be well defined to define it themselves:
namespace boost
{
template <>
struct common_type<A, B> {typedef C type;};
template <> struct common_type<B, A>
: public common_type<A, B> {};
}
Now this client can ask for `common_type<A, B>`.
[h4 How does `common_type` behave with pointers?]
Consider
struct C { }:
struct B : C { };
struct A : C { };
Shouldn't `common_type<A*,B*>::type` be `C*`? I would say yes, but the default implementation will make it ill-formed.
The library could add a specialization for pointers, as
namespace boost
{
template <typename A, typename B>
struct common_type<A*, B*> {
typedef common_type<A, B>* type;
};
}
But in the absence of a motivating use cases, we prefer not to add more than the standard specifies.
Of course the user can always make this specialization.
[h4 Can you explain the pros/cons of `common_type` against Boost.Typeof?]
Even if they appear to be close, `common_type` and `typeof` have
different purposes. You use `typeof` to get the type of an expression, while
you use `common_type` to set explicitly the type returned of a template
function. Both are complementary, and indeed `common_type` is approximately equivalent to
`decltype(__declval<bool>() ? __declval<T>() : __declval<U>())`.
`common_type` is also similar to `promote_args<class ...T>` in `boost/math/tools/promotion.hpp`,
though it is not exactly the same as `promote_args` either. `common_type<T1, T2>::type` simply represents the result of some
operation on `T1` and `T2`, and defaults to the type obtained by putting `T1` and `T2` into a conditional statement.
It is meant to be customizable (via specialization) if this default is not appropriate.
[endsect]

23
doc/conditional.qbk Normal file
View File

@ -0,0 +1,23 @@
[/
Copyright 2010 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[/===================================================================]
[section:conditional conditional]
[/===================================================================]
__header ` #include <boost/type_traits/conditional.hpp>` or ` #include <boost/type_traits.hpp>`
namespace boost {
template <bool B, class T, class U> struct __conditional;
template <bool B, class T, class U> using conditional_t = typename conditional<B, T, U>::type; // C++11 and above
}
If B is true, the member typedef type shall equal T. If B is false, the member typedef type shall equal U.
[endsect]

36
doc/conjunction.qbk Normal file
View File

@ -0,0 +1,36 @@
[/
Copyright 2020 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
or copy at http://www.boost.org/LICENSE_1_0.txt).
]
[section:conjunction conjunction]
template<class... T>
struct conjunction;
__inherit Inherits from the first type `U` in the list for which
`bool(U::value)` is `false`, or the last type in the list if there is no such
type. If `sizeof...(T)` is `0` then inherits from `__true_type`.
__header `#include <boost/type_traits/conjunction.hpp>`
[all_compilers] In the absence of variadic-template support, `conjunction` has
only 2 parameters.
__examples
[:Given: `template<int N> struct Int { static const int value = N };` ]
[:`conjunction<>` inherits from `__true_type`.]
[:`conjunction<Int<1> >` inherits from `Int<1>`.]
[:`conjunction<Int<1>, Int<2>, Int<3> >` inherits from `Int<3>`.]
[:`conjunction<Int<1>, Int<0>, Int<3> >` inherits from `Int<0>`.]
[endsect]

41
doc/copy_cv.qbk Normal file
View File

@ -0,0 +1,41 @@
[/
Copyright 2015 Peter Dimov.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:copy_cv copy_cv]
template <class T, class U>
struct copy_cv
{
typedef __below type;
};
template <class T, class U> using copy_cv_t = typename copy_cv<T, U>::type; // C++11 and above
__type [^T /cv/], where /cv/ are the cv-qualifiers of `U`.
__header ` #include <boost/type_traits/copy_cv.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
[ [Expression] [Result Type]]
[[`copy_cv<int, void>::type`][`int`]]
[[`copy_cv<int const, void>::type`][`int const`]]
[[`copy_cv<int, void const>::type`][`int const`]]
[[`copy_cv<int volatile, void const>::type`][`int const volatile`]]
[[`copy_cv<int&, void const>::type`] [`int&`]]
[[`copy_cv<int*, void volatile>::type`] [`int* volatile`]]
]
[endsect]

65
doc/copy_cv_ref.qbk Normal file
View File

@ -0,0 +1,65 @@
[/
Copyright 2019 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
or copy at http://www.boost.org/LICENSE_1_0.txt).
]
[section:copy_cv_ref copy_cv_ref]
template<class T, class U>
struct copy_cv_ref
{
typedef __below type;
};
template<class T, class U>
using copy_cv_ref_t = typename copy_cv_ref<T, U>::type;
__type [^T /cvref/], where /cvref/ are the cvref-qualifiers of `U`.
__header `#include <boost/type_traits/copy_cv_ref.hpp>` or
`#include <boost/type_traits.hpp>>`
[table Examples
[[Expression] [Result Type]]
[[`copy_cv_ref<int, const char>::type`][`const int`]]
[[`copy_cv_ref<int, volatile char>::type`][`volatile int`]]
[[`copy_cv_ref<int, const volatile char>::type`][`const volatile int`]]
[[`copy_cv_ref<int, char&>::type`][`int&`]]
[[`copy_cv_ref<int, const char&>::type`][`const int&`]]
[[`copy_cv_ref<int, volatile char&>::type`][`volatile int&`]]
[[`copy_cv_ref<int, const volatile char&>::type`][`const volatile int&`]]
[[`copy_cv_ref<int, char&&>::type`][`int&&`]]
[[`copy_cv_ref<int, const char&&>::type`][`const int&&`]]
[[`copy_cv_ref<int, volatile char&&>::type`][`volatile int&&`]]
[[`copy_cv_ref<int, const volatile char&&>::type`][`const volatile int&&`]]
[[`copy_cv_ref<int&&, char&>::type`][`int&`]]
[[`copy_cv_ref<int&, const char>::type`][`int&`]]
[[`copy_cv_ref<int&, volatile char&>::type`][`int&`]]
[[`copy_cv_ref<int&, const volatile char&&>::type`][`int&`]]
]
[all_compilers] The type alias `copy_cv_ref_t` is only available if the compiler
supports template aliases.
[endsect]

53
doc/copy_reference.qbk Normal file
View File

@ -0,0 +1,53 @@
[/
Copyright 2019 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
or copy at http://www.boost.org/LICENSE_1_0.txt).
]
[section:copy_reference copy_reference_]
template<class T, class U>
struct copy_reference
{
typedef __below type;
};
template<class T, class U>
using copy_reference_t = typename copy_reference<T, U>::type;
__type [^T /ref/], where /ref/ are the ref-qualifiers of `U`.
__header `#include <boost/type_traits/copy_reference.hpp>` or
`#include <boost/type_traits.hpp>>`
[table Examples
[[Expression] [Result Type]]
[[`copy_reference<int, char>::type`][`int`]]
[[`copy_reference<int, char&>::type`] [`int&`]]
[[`copy_reference<int, char&&>::type`] [`int&&`]]
[[`copy_reference<int&, char>::type`] [`int&`]]
[[`copy_reference<int&, char&>::type`] [`int&`]]
[[`copy_reference<int&, char&&>::type`] [`int&`]]
[[`copy_reference<int&&, char>::type`] [`int&&`]]
[[`copy_reference<int&&, char&>::type`] [`int&`]]
[[`copy_reference<int&&, char&&>::type`] [`int&&`]]
]
[all_compilers] The type alias `copy_reference_t` is only available if the compiler
supports template aliases.
[endsect]

42
doc/credits.qbk Normal file
View File

@ -0,0 +1,42 @@
[/
Copyright 2007 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:credits Credits]
This documentation was pulled together by John Maddock, using
[@../../../../doc/html/quickbook.html Boost.Quickbook]
and [@../../../../doc/html/boostbook.html Boost.DocBook].
The original version of this library was created by Steve Cleary,
Beman Dawes, Howard Hinnant, and John Maddock. John Maddock is the
current maintainer of the library.
This version of type traits library is based on contributions by
Adobe Systems Inc, David Abrahams, Steve Cleary,
Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones, Mat Marcus,
Itay Maman, John Maddock, Thorsten Ottosen, Robert Ramey, Jeremy Siek,
Antony Polukhin and Glen Fernandes.
Mat Marcus and Jesse Jones invented, and
[@http://opensource.adobe.com/project4/project.shtml published a paper describing],
the partial specialization workarounds used in this library.
Aleksey Gurtovoy added MPL integration to the library.
The __is_convertible template is based on code originally devised by
Andrei Alexandrescu, see
"[@http://www.cuj.com/experts/1810/alexandr.htm?topic=experts
Generic<Programming>: Mappings between Types and Values]".
The latest version of this library and documentation can be found at
[@http://www.boost.org www.boost.org]. Bugs, suggestions and discussion
should be directed to boost@lists.boost.org
(see [@http://www.boost.org/more/mailing_lists.htm#main
www.boost.org/more/mailing_lists.htm#main] for subscription details).
[endsect]

44
doc/decay.qbk Normal file
View File

@ -0,0 +1,44 @@
[/
Copyright 2007 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:decay decay]
template <class T>
struct decay
{
typedef __below type;
};
template <class T> using decay_t = typename decay<T>::type; // C++11 and above
__type Let `U` be the result of `remove_reference<T>::type`, then if `U` is
an array type, the result is `remove_extent<U>::type*`, otherwise if `U` is a
function type then the result is `U*`, otherwise the result is `remove_cv<U>::type`.
__std_ref 3.9.1.
__header ` #include <boost/type_traits/decay.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
[ [Expression] [Result Type]]
[[`decay<int[2][3]>::type`][`int[3]*`]]
[[`decay<int(&)[2]>::type`] [`int*`]]
[[`decay<int(&)(double)>::type`] [`int(*)(double)`]]
[[`int(*)(double)`] [`int(*)(double)`]]
[[`int(double)`] [`int(*)(double)`]]
]
[all_compilers]
[endsect]

21
doc/declval.qbk Normal file
View File

@ -0,0 +1,21 @@
[/
Copyright 2015 Peter Dimov.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:declval declval]
template <class T>
typename add_rvalue_reference<T>::type declval() noexcept; // as unevaluated operand
__std_ref C++11 20.2.4 [declval].
__header ` #include <boost/type_traits/declval.hpp>` or ` #include <boost/type_traits.hpp>`
The function template `declval` is used when a value of a certain type is required in
a type computation context. For example, the type of the result of adding an `int` and
a `float` can be obtained with the expression `decltype( declval<int>() + declval<float>() )`.
[endsect]

20
doc/decomposing_func.qbk Normal file
View File

@ -0,0 +1,20 @@
[/
Copyright 2007 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:function Decomposing Function Types]
The class template __function_traits extracts information from function types
(see also __is_function). This traits class allows you to tell how many arguments
a function takes, what those argument types are, and what the return type is.
[*Synopsis]
template <std::size_t Align>
struct __function_traits;
[endsect]

40
doc/detected.qbk Normal file
View File

@ -0,0 +1,40 @@
[/
Copyright 2018 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
or copy at http://www.boost.org/LICENSE_1_0.txt).
]
[section:detected detected]
template<template<class...> class Op, class... Args>
using detected_t = __below;
__alias `Op<Args...>` if it is a valid template-id, otherwise
`boost::nonesuch`.
__std_paper [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4502.pdf N4502]
__compat Requires C++11 variadic templates and C++11 template aliases.
__header `#include <boost/type_traits/detected.hpp>`
__examples
Suppose you wish to determine whether a type has a `size()` const-member function, then given the meta-functions:
template <class T>
using size_member_tester = decltype(std::declval<const T&>().size());
template <class T>
using size_member_t = boost::detected_t<size_member_tester, T >;
Then the type `size_member_t<T>` is an alias for `size_member_tester<T>` if the operation is valid, and an alias for
`boost::nonesuch` otherwise.
See also: __is_detected, __is_detected_convertible, __is_detected_exact.
[endsect]

45
doc/detected_or.qbk Normal file
View File

@ -0,0 +1,45 @@
[/
Copyright 2018 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
or copy at http://www.boost.org/LICENSE_1_0.txt).
]
[section:detected_or detected_or]
template<class Default, template<class...> class Op, class... Args>
using detected_or = __below;
template<class Default, template<class...> class Op, class... Args>
using detected_or_t = typename detected_or<Default, Op, Args...>::type;
__alias An unspecified type with two public member type definitions:
* `value_t` is __true_type if `Op<Args...>` is a valid template-id, otherwise
__false_type
* `type` is `Op<Args...>` if it is a valid template-id, otherwise `Default`
__std_paper [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4502.pdf N4502]
__compat Requires C++11 variadic templates and C++11 template aliases.
__header `#include <boost/type_traits/detected_or.hpp>`
__examples
Suppose we wish to declare a type that represents the difference between two values of type T, it should be
T::difference_type if such a type exists, or std::ptrdiff_t otherwise:
template<class T>
using difference_t = typename T::difference_type;
template<class T>
using difference_type = boost::detected_or_t<std::ptrdiff_t, difference_t, T>;
Now the type `difference_type<T>` gives us what we need.
See also: __is_detected, __is_detected_convertible, __is_detected_exact.
[endsect]

36
doc/disjunction.qbk Normal file
View File

@ -0,0 +1,36 @@
[/
Copyright 2020 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
or copy at http://www.boost.org/LICENSE_1_0.txt).
]
[section:disjunction disjunction]
template<class... T>
struct disjunction;
__inherit Inherits from the first type `U` in the list for which
`bool(U::value)` is `true`, or the last type in the list if there is no such
type. If `sizeof...(T)` is `0` then inherits from `__false_type`.
__header `#include <boost/type_traits/disjunction.hpp>`
[all_compilers] In the absence of variadic-template support, `disjunction` has
only 2 parameters.
__examples
[:Given: `template<int N> struct Int { static const int value = N };` ]
[:`disjunction<>` inherits from `__false_type`.]
[:`disjunction<Int<1> >` inherits from `Int<1>`.]
[:`disjunction<Int<1>, Int<2>, Int<3> >` inherits from `Int<1>`.]
[:`disjunction<Int<0>, Int<2>, Int<3> >` inherits from `Int<2>`.]
[endsect]

48
doc/enable_if.qbk Normal file
View File

@ -0,0 +1,48 @@
[/
Copyright 2018 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
or copy at http://www.boost.org/LICENSE_1_0.txt).
]
[section:enable_if enable_if_]
template<bool B, class T = void>
struct enable_if_;
template<bool B, class T = void>
using enable_if_t = typename enable_if_<B, T>::type;
__type If `B` is true, then the member `type` is defined to be `T`. Otherwise
there is no member `type`.
__header `#include <boost/type_traits/enable_if.hpp>`
[note The trait has the name `enable_if_` (with a trailing underscore) but
behaves like `std::enable_if` or `boost::enable_if_c`. The existing trait
with the name `boost::enable_if` has a different interface.]
__examples
The following function can be used to destroy each element of an array and
specially handle arrays of trivially destructible types.
template<class T>
typename boost::enable_if_<!boost::has_trivial_destructor<T>::value>::type
destroy(T* ptr, std::size_t size)
{
while (size > 0) {
ptr[--size].~T();
}
}
template<class T>
typename boost::enable_if_<boost::has_trivial_destructor<T>::value>::type
destroy(T*, std::size_t) { }
[all_compilers] The type alias `enable_if_t` is only available if the compiler
supports template aliases.
[endsect]

237
doc/examples.qbk Normal file
View File

@ -0,0 +1,237 @@
[/
Copyright 2007 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:examples Examples]
[section:copy An Optimized Version of std::copy]
Demonstrates a version of `std::copy` that uses `__has_trivial_assign` to
determine whether to use `memcpy` to optimise the copy operation
(see [@../../examples/copy_example.cpp copy_example.cpp]):
//
// opt::copy
// same semantics as std::copy
// calls memcpy where appropriate.
//
namespace detail{
template<typename I1, typename I2, bool b>
I2 copy_imp(I1 first, I1 last, I2 out, const boost::__integral_constant<bool, b>&)
{
while(first != last)
{
*out = *first;
++out;
++first;
}
return out;
}
template<typename T>
T* copy_imp(const T* first, const T* last, T* out, const boost::__true_type&)
{
memmove(out, first, (last-first)*sizeof(T));
return out+(last-first);
}
}
template<typename I1, typename I2>
inline I2 copy(I1 first, I1 last, I2 out)
{
//
// We can copy with memcpy if T has a trivial assignment operator,
// and if the iterator arguments are actually pointers (this last
// requirement we detect with overload resolution):
//
typedef typename std::iterator_traits<I1>::value_type value_type;
return detail::copy_imp(first, last, out, boost::__has_trivial_assign<value_type>());
}
[endsect]
[section:fill An Optimised Version of std::fill]
Demonstrates a version of `std::fill` that uses `__has_trivial_assign` to
determine whether to use `memset` to optimise the fill operation
(see [@../../examples/fill_example.cpp fill_example.cpp]):
//
// fill
// same as std::fill, but uses memset where appropriate
//
namespace detail{
template <typename I, typename T, bool b>
void do_fill(I first, I last, const T& val, const boost::__integral_constant<bool, b>&)
{
while(first != last)
{
*first = val;
++first;
}
}
template <typename T>
void do_fill(T* first, T* last, const T& val, const boost::__true_type&)
{
std::memset(first, val, last-first);
}
}
template <class I, class T>
inline void fill(I first, I last, const T& val)
{
//
// We can do an optimised fill if T has a trivial assignment
// operator and if it's size is one:
//
typedef boost::__integral_constant<bool,
::boost::__has_trivial_assign<T>::value && (sizeof(T) == 1)> truth_type;
detail::do_fill(first, last, val, truth_type());
}
[endsect]
[section:destruct An Example that Omits Destructor Calls For Types with Trivial Destructors]
Demonstrates a simple algorithm that uses `__has_trivial_destruct` to
determine whether to destructors need to be called
(see [@../../examples/trivial_destructor_example.cpp trivial_destructor_example.cpp]):
//
// algorithm destroy_array:
// The reverse of std::unitialized_copy, takes a block of
// initialized memory and calls destructors on all objects therein.
//
namespace detail{
template <class T>
void do_destroy_array(T* first, T* last, const boost::__false_type&)
{
while(first != last)
{
first->~T();
++first;
}
}
template <class T>
inline void do_destroy_array(T* first, T* last, const boost::__true_type&)
{
}
} // namespace detail
template <class T>
inline void destroy_array(T* p1, T* p2)
{
detail::do_destroy_array(p1, p2, ::boost::__has_trivial_destructor<T>());
}
[endsect]
[section:iter An improved Version of std::iter_swap]
Demonstrates a version of `std::iter_swap` that use type traits to
determine whether an it's arguments are proxy iterators or not,
if they're not then it just does a `std::swap` of it's dereferenced
arguments (the
same as `std::iter_swap` does), however if they are proxy iterators
then takes special care over the swap to ensure that the algorithm
works correctly for both proxy iterators, and even iterators of
different types
(see [@../../examples/iter_swap_example.cpp iter_swap_example.cpp]):
//
// iter_swap:
// tests whether iterator is a proxy iterator or not, and
// uses optimal form accordingly:
//
namespace detail{
template <typename I>
static void do_swap(I one, I two, const boost::__false_type&)
{
typedef typename std::iterator_traits<I>::value_type v_t;
v_t v = *one;
*one = *two;
*two = v;
}
template <typename I>
static void do_swap(I one, I two, const boost::__true_type&)
{
using std::swap;
swap(*one, *two);
}
}
template <typename I1, typename I2>
inline void iter_swap(I1 one, I2 two)
{
//
// See is both arguments are non-proxying iterators,
// and if both iterator the same type:
//
typedef typename std::iterator_traits<I1>::reference r1_t;
typedef typename std::iterator_traits<I2>::reference r2_t;
typedef boost::__integral_constant<bool,
::boost::__is_reference<r1_t>::value
&& ::boost::__is_reference<r2_t>::value
&& ::boost::__is_same<r1_t, r2_t>::value> truth_type;
detail::do_swap(one, two, truth_type());
}
[endsect]
[section:to_double Convert Numeric Types and Enums to double]
Demonstrates a conversion of
[@../../../../libs/numeric/conversion/doc/html/boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types
Numeric Types]
and enum types to double:
template<class T>
inline double to_double(T const& value)
{
typedef typename boost::promote<T>::type promoted;
return boost::numeric::converter<double,promoted>::convert(value);
}
[endsect]
[section:improved_min Improving std::min with common_type]
An improved `std::min` function could be written like this:
template <class T, class U>
typename __common_type<T, U>::type min(T t, U u)
{
return t < u ? t : u;
}
And now expressions such as:
min(1, 2.0)
will actually compile and return the correct type!
[endsect]
[endsect]

50
doc/extent.qbk Normal file
View File

@ -0,0 +1,50 @@
[/
Copyright 2007 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:extent extent]
template <class T, std::size_t N = 0>
struct extent : public __integral_constant<std::size_t, EXTENT(T,N)> {};
__inherit Class template extent inherits from `__integral_constant<std::size_t, EXTENT(T,N)>`,
where `EXTENT(T,N)` is the number of elements in the N'th array dimension of type `T`.
If `T` is not a (built-in) array type, or if `N > __rank<T>::value`, or if the N'th array bound
is incomplete, then `EXTENT(T,N)` is zero.
__header ` #include <boost/type_traits/extent.hpp>` or ` #include <boost/type_traits.hpp>`
__examples
[:`extent<int[1]>` inherits from `__integral_constant<std::size_t, 1>`.]
[:`extent<double[2][3][4], 0>::type` is the type `__integral_constant<std::size_t, 2>`.]
[:`extent<double[2][3][4], 1>::type` is the type `__integral_constant<std::size_t, 3>`.]
[:`extent<double[2][3][4], 2>::type` is the type `__integral_constant<std::size_t, 4>`.]
[:`extent<int[4]>::value` is an integral constant
expression that evaluates to /4/.]
[:`extent<int[][2]>::value` is an integral constant
expression that evaluates to /0/.]
[:`extent<int[][2], 1>::value` is an integral constant
expression that evaluates to /2/.]
[:`extent<int*>::value` is an integral constant
expression that evaluates to /0/.]
[:`extent<boost::array<int, 3> >::value` is an integral constant
expression that evaluates to /0/: `boost::array` is a class type and [*not an array type]!]
[:`extent<T>::value_type` is the type `std::size_t`.]
[all_compilers]
[endsect]

View File

@ -0,0 +1,41 @@
[/
Copyright 2007 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:floating_point_promotion floating_point_promotion]
template <class T>
struct floating_point_promotion
{
typedef __below type;
};
template <class T> using floating_point_promotion_t = typename floating_point_promotion<T>::type; // C++11 and above
__type If floating point promotion can be applied to an rvalue of type `T`,
then applies floating point promotion to `T` and keeps cv-qualifiers of `T`,
otherwise leaves `T` unchanged.
__std_ref 4.6.
__header ` #include <boost/type_traits/floating_point_promotion.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
[ [Expression] [Result Type]]
[[`floating_point_promotion<float const>::type`][`double const`]]
[[`floating_point_promotion<float&>::type`][`float&`]]
[[`floating_point_promotion<short>::type`][`short`]]
]
[all_compilers]
[endsect]

58
doc/function_traits.qbk Normal file
View File

@ -0,0 +1,58 @@
[/
Copyright 2007 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:function_traits function_traits]
[def __argN '''arg<replaceable>N</replaceable>_type''']
template <class F>
struct function_traits
{
static const std::size_t arity = __below;
typedef __below result_type;
typedef __below __argN;
};
The class template function_traits will only compile if:
* The compiler supports partial specialization of class templates.
* The template argument `F` is a /function type/, note that this ['[*is not]]
the same thing as a /pointer to a function/.
[tip
function_traits is intended to introspect only C++ functions of the
form R (), R( A1 ), R ( A1, ... etc. ) and not function pointers or
class member functions. To convert a function pointer type to a suitable
type use __remove_pointer.]
[table Function Traits Members
[[Member] [Description]]
[[`function_traits<F>::arity`]
[An integral constant expression that gives the number of arguments accepted by the function type `F`.]]
[[`function_traits<F>::result_type`]
[The type returned by function type `F`.]]
[[`function_traits<F>::__argN`]
[The '''<replaceable>N</replaceable>th''' argument type of function type `F`, where `1 <= N <= arity` of `F`.]]
]
[table Examples
[[Expression] [Result]]
[[`function_traits<void (void)>::arity`] [An integral constant expression that has the value 0.]]
[[`function_traits<long (int)>::arity`] [An integral constant expression that has the value 1.]]
[[`function_traits<long (int, long, double, void*)>::arity`] [An integral constant expression that has the value 4.]]
[[`function_traits<void (void)>::result_type`] [The type `void`.]]
[[`function_traits<long (int)>::result_type`] [The type `long`.]]
[[`function_traits<long (int)>::arg1_type`] [The type `int`.]]
[[`function_traits<long (int, long, double, void*)>::arg4_type`] [The type `void*`.]]
[[`function_traits<long (int, long, double, void*)>::arg5_type`] [A compiler error: there is no `arg5_type` since there are only four arguments.]]
[[`function_traits<long (*)(void)>::arity`] [A compiler error: argument type is a /function pointer/, and not a /function type/.]]
]
[all_compilers]
[endsect]

52
doc/has_bit_and.qbk Normal file
View File

@ -0,0 +1,52 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_bit_and has_bit_and]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_bit_and : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs&rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs&rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator&`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs&rhs); // is valid if has_bit_and<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_bit_and.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
__examples
[:`has_bit_and<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_bit_and<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_bit_and<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_bit_and<long>` inherits from `__true_type`.]
[:`has_bit_and<int, int, int>` inherits from `__true_type`.]
[:`has_bit_and<const int, int>` inherits from `__true_type`.]
[:`has_bit_and<int, double, bool>` inherits from `__false_type`.]
[:`has_bit_and<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[has_binary_operator_compat]
[binary_operator_known_issues has_bit_and..&..A..contains<T>..const ]
[endsect]

View File

@ -0,0 +1,52 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_bit_and_assign has_bit_and_assign]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_bit_and_assign : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs&=rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs&=rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator&=`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs&=rhs); // is valid if has_bit_and_assign<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_bit_and_assign.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_bit_and_assign<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_bit_and_assign<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_bit_and_assign<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_bit_and_assign<long>` inherits from `__true_type`.]
[:`has_bit_and_assign<int, int, int>` inherits from `__true_type`.]
[:`has_bit_and_assign<const int, int>` inherits from `__false_type`.]
[:`has_bit_and_assign<int, double, bool>` inherits from `__false_type`.]
[:`has_bit_and_assign<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_bit_and_assign..&=..A&..contains<T>&..[/Nothing]]
[endsect]

52
doc/has_bit_or.qbk Normal file
View File

@ -0,0 +1,52 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_bit_or has_bit_or]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_bit_or : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs|rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs|rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator|`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs|rhs); // is valid if has_bit_or<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_bit_or.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_bit_or<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_bit_or<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_bit_or<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_bit_or<long>` inherits from `__true_type`.]
[:`has_bit_or<int, int, int>` inherits from `__true_type`.]
[:`has_bit_or<const int, int>` inherits from `__true_type`.]
[:`has_bit_or<int, double, bool>` inherits from `__false_type`.]
[:`has_bit_or<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_bit_or..|..A..contains<T>..const ]
[endsect]

52
doc/has_bit_or_assign.qbk Normal file
View File

@ -0,0 +1,52 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_bit_or_assign has_bit_or_assign]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_bit_or_assign : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs|=rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs|=rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator|=`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs|=rhs); // is valid if has_bit_or_assign<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_bit_or_assign.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_bit_or_assign<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_bit_or_assign<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_bit_or_assign<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_bit_or_assign<long>` inherits from `__true_type`.]
[:`has_bit_or_assign<int, int, int>` inherits from `__true_type`.]
[:`has_bit_or_assign<const int, int>` inherits from `__false_type`.]
[:`has_bit_or_assign<int, double, bool>` inherits from `__false_type`.]
[:`has_bit_or_assign<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_bit_or_assign..|=..A&..contains<T>&..[/Nothing]]
[endsect]

52
doc/has_bit_xor.qbk Normal file
View File

@ -0,0 +1,52 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_bit_xor has_bit_xor]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_bit_xor : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs^rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs^rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator^`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs^rhs); // is valid if has_bit_xor<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_bit_xor.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_bit_xor<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_bit_xor<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_bit_xor<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_bit_xor<long>` inherits from `__true_type`.]
[:`has_bit_xor<int, int, int>` inherits from `__true_type`.]
[:`has_bit_xor<const int, int>` inherits from `__true_type`.]
[:`has_bit_xor<int, double, bool>` inherits from `__false_type`.]
[:`has_bit_xor<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_bit_xor..^..A..contains<T>..const ]
[endsect]

View File

@ -0,0 +1,52 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_bit_xor_assign has_bit_xor_assign]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_bit_xor_assign : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs^=rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs^=rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator^=`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs^=rhs); // is valid if has_bit_xor_assign<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_bit_xor_assign.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_bit_xor_assign<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_bit_xor_assign<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_bit_xor_assign<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_bit_xor_assign<long>` inherits from `__true_type`.]
[:`has_bit_xor_assign<int, int, int>` inherits from `__true_type`.]
[:`has_bit_xor_assign<const int, int>` inherits from `__false_type`.]
[:`has_bit_xor_assign<int, double, bool>` inherits from `__false_type`.]
[:`has_bit_xor_assign<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_bit_xor_assign..^=..A&..contains<T>&..[/Nothing]]
[endsect]

111
doc/has_complement.qbk Normal file
View File

@ -0,0 +1,111 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_complement has_complement]
template <class Rhs, class Ret=dont_care>
struct has_complement : public __tof {};
__inherit
If (i) `rhs` of type `Rhs` can be used in expression `~rhs`,
and (ii) `Ret=dont_care` or the result of expression `~rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of prefix `operator~`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Rhs rhs;
f(~rhs); // is valid if has_complement<Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_complement.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_complement<Rhs, Ret>::value_type` is the type `bool`.]
[:`has_complement<Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_complement<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_complement<long>` inherits from `__true_type`.]
[:`has_complement<int, int>` inherits from `__true_type`.]
[:`has_complement<int, long>` inherits from `__true_type`.]
[:`has_complement<const int>` inherits from `__true_type`.]
[:`has_complement<int*>` inherits from `__false_type`.]
[:`has_complement<double, double>` inherits from `__false_type`.]
[:`has_complement<double, int>` inherits from `__false_type`.]
[:`has_complement<int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Known issues:]
* This trait cannot detect whether prefix `operator~` is public or not:
if `operator~` is defined as a private member of `Rhs` then
instantiating `has_complement<Rhs>` will produce a compiler error.
For this reason `has_complement` cannot be used to determine whether a type has a public `operator~` or not.
``
struct A { private: void operator~(); };
boost::has_complement<A>::value; // error: A::operator~() is private
``
* There is an issue if the operator exists only for type `A` and `B` is
convertible to `A`. In this case, the compiler will report an ambiguous overload.
``
struct A { };
void operator~(const A&);
struct B { operator A(); };
boost::has_complement<A>::value; // this is fine
boost::has_complement<B>::value; // error: ambiguous overload
``
* There is an issue when applying this trait to template classes.
If `operator~` is defined but does not bind for a given template type,
it is still detected by the trait which returns `true` instead of `false`.
Example:
``
#include <boost/type_traits/has_complement.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator~(const contains<T> &rhs) {
return f(rhs.data);
}
class bad { };
class good { };
bool f(const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_complement< contains< good > >::value<<'\n'; // true
contains<good> g;
~g; // ok
// does not work for contains<bad>
std::cout<<boost::has_complement< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
~b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[prefix_operator_known_issues has_complement..~]
[endsect]

112
doc/has_dereference.qbk Normal file
View File

@ -0,0 +1,112 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_dereference has_dereference]
template <class Rhs, class Ret=dont_care>
struct has_dereference : public __tof {};
__inherit
If (i) `rhs` of type `Rhs` can be used in expression `*rhs`,
and (ii) `Ret=dont_care` or the result of expression `*rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of prefix `operator*`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Rhs rhs;
f(*rhs); // is valid if has_dereference<Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_dereference.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_dereference<Rhs, Ret>::value_type` is the type `bool`.]
[:`has_dereference<Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_dereference<int*>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_dereference<long*>` inherits from `__true_type`.]
[:`has_dereference<int*, int>` inherits from `__true_type`.]
[:`has_dereference<int*, const int>` inherits from `__true_type`.]
[:`has_dereference<int const *>` inherits from `__true_type`.]
[:`has_dereference<int * const>` inherits from `__true_type`.]
[:`has_dereference<int const * const>` inherits from `__true_type`.]
[:`has_dereference<int>` inherits from `__false_type`.]
[:`has_dereference<double>` inherits from `__false_type`.]
[:`has_dereference<void*>` inherits from `__false_type`.]
[:`has_dereference<const int*, int&>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Known issues:]
* This trait cannot detect whether prefix `operator*` is public or not:
if `operator*` is defined as a private member of `Rhs` then
instantiating `has_dereference<Rhs>` will produce a compiler error.
For this reason `has_dereference` cannot be used to determine whether a type has a public `operator*` or not.
``
struct A { private: void operator*(); };
boost::has_dereference<A>::value; // error: A::operator*() is private
``
* There is an issue if the operator exists only for type `A` and `B` is
convertible to `A`. In this case, the compiler will report an ambiguous overload.
``
struct A { };
void operator*(const A&);
struct B { operator A(); };
boost::has_dereference<A>::value; // this is fine
boost::has_dereference<B>::value; // error: ambiguous overload
``
* There is an issue when applying this trait to template classes.
If `operator*` is defined but does not bind for a given template type,
it is still detected by the trait which returns `true` instead of `false`.
Example:
``
#include <boost/type_traits/has_dereference.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator*(const contains<T> &rhs) {
return f(rhs.data);
}
class bad { };
class good { };
bool f(const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_dereference< contains< good > >::value<<'\n'; // true
contains<good> g;
*g; // ok
// does not work for contains<bad>
std::cout<<boost::has_dereference< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
*b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[endsect]

54
doc/has_divides.qbk Normal file
View File

@ -0,0 +1,54 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_divides has_divides]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_divides : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs/rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs/rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator/`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs/rhs); // is valid if has_divides<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_divides.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_divides<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_divides<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_divides<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_divides<long>` inherits from `__true_type`.]
[:`has_divides<int, int, int>` inherits from `__true_type`.]
[:`has_divides<int, int, long>` inherits from `__true_type`.]
[:`has_divides<int, double, double>` inherits from `__true_type`.]
[:`has_divides<int, double, int>` inherits from `__true_type`.]
[:`has_divides<const int, int>::value` inherits from `__true_type`.]
[:`has_divides<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_divides../..A..contains<T>..const ]
[endsect]

View File

@ -0,0 +1,54 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_divides_assign has_divides_assign]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_divides_assign : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs/=rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs/=rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator/=`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs/=rhs); // is valid if has_divides_assign<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_divides_assign.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_divides_assign<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_divides_assign<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_divides_assign<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_divides_assign<long>` inherits from `__true_type`.]
[:`has_divides_assign<int, int, int>` inherits from `__true_type`.]
[:`has_divides_assign<int, int, long>` inherits from `__true_type`.]
[:`has_divides_assign<int, double, double>` inherits from `__true_type`.]
[:`has_divides_assign<int, double, int>` inherits from `__true_type`.]
[:`has_divides_assign<const int, int>::value` inherits from `__false_type`.]
[:`has_divides_assign<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_divides_assign../=..A&..contains<T>&..[/Nothing]]
[endsect]

54
doc/has_equal_to.qbk Normal file
View File

@ -0,0 +1,54 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_equal_to has_equal_to]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_equal_to : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs==rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs==rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator==`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs==rhs); // is valid if has_equal_to<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_equal_to.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_equal_to<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_equal_to<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_equal_to<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_equal_to<long>` inherits from `__true_type`.]
[:`has_equal_to<int, int, bool>` inherits from `__true_type`.]
[:`has_equal_to<int, double, bool>` inherits from `__true_type`.]
[:`has_equal_to<const int>` inherits from `__true_type`.]
[:`has_equal_to<int*, int>` inherits from `__false_type`.]
[:`has_equal_to<int*, double*>` inherits from `__false_type`.]
[:`has_equal_to<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_equal_to..==..bool..bool..const ]
[endsect]

54
doc/has_greater.qbk Normal file
View File

@ -0,0 +1,54 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_greater has_greater]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_greater : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs>rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs>rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator>`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs>rhs); // is valid if has_greater<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_greater.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_greater<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_greater<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_greater<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_greater<long>` inherits from `__true_type`.]
[:`has_greater<int, int, bool>` inherits from `__true_type`.]
[:`has_greater<int, double, bool>` inherits from `__true_type`.]
[:`has_greater<const int>` inherits from `__true_type`.]
[:`has_greater<int*, int>` inherits from `__false_type`.]
[:`has_greater<int*, double*>` inherits from `__false_type`.]
[:`has_greater<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_greater..>..bool..bool..const ]
[endsect]

54
doc/has_greater_equal.qbk Normal file
View File

@ -0,0 +1,54 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_greater_equal has_greater_equal]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_greater_equal : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs>=rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs>=rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator>=`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs>=rhs); // is valid if has_greater_equal<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_greater_equal.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_greater_equal<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_greater_equal<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_greater_equal<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_greater_equal<long>` inherits from `__true_type`.]
[:`has_greater_equal<int, int, bool>` inherits from `__true_type`.]
[:`has_greater_equal<int, double, bool>` inherits from `__true_type`.]
[:`has_greater_equal<const int>` inherits from `__true_type`.]
[:`has_greater_equal<int*, int>` inherits from `__false_type`.]
[:`has_greater_equal<int*, double*>` inherits from `__false_type`.]
[:`has_greater_equal<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_greater_equal..>=..bool..bool..const ]
[endsect]

55
doc/has_left_shift.qbk Normal file
View File

@ -0,0 +1,55 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_left_shift has_left_shift]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_left_shift : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs<<rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs<<rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator<<`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs<<rhs); // is valid if has_left_shift<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_left_shift.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_left_shift<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_left_shift<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_left_shift<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_left_shift<long>` inherits from `__true_type`.]
[:`has_left_shift<int, int, int>` inherits from `__true_type`.]
[:`has_left_shift<const int, int>` inherits from `__true_type`.]
[:`has_left_shift<std::ostream, int>` inherits from `__true_type`.]
[:`has_left_shift<std::ostream, char*, std::ostream>` inherits from `__true_type`.]
[:`has_left_shift<std::ostream, std::string>` inherits from `__true_type`.]
[:`has_left_shift<int, double, bool>` inherits from `__false_type`.]
[:`has_left_shift<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_left_shift..<<..A..contains<T>..const ]
[endsect]

View File

@ -0,0 +1,52 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_left_shift_assign has_left_shift_assign]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_left_shift_assign : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs<<=rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs<<=rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator<<=`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs<<=rhs); // is valid if has_left_shift_assign<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_left_shift_assign.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_left_shift_assign<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_left_shift_assign<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_left_shift_assign<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_left_shift_assign<long>` inherits from `__true_type`.]
[:`has_left_shift_assign<int, int, int>` inherits from `__true_type`.]
[:`has_left_shift_assign<const int, int>` inherits from `__false_type`.]
[:`has_left_shift_assign<int, double, bool>` inherits from `__false_type`.]
[:`has_left_shift_assign<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_left_shift_assign..<<=..A&..contains<T>&..[/]]
[endsect]

54
doc/has_less.qbk Normal file
View File

@ -0,0 +1,54 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_less has_less]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_less : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs<rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs<rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator<`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs<rhs); // is valid if has_less<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_less.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_less<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_less<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_less<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_less<long>` inherits from `__true_type`.]
[:`has_less<int, int, bool>` inherits from `__true_type`.]
[:`has_less<int, double, bool>` inherits from `__true_type`.]
[:`has_less<const int>` inherits from `__true_type`.]
[:`has_less<int*, int>` inherits from `__false_type`.]
[:`has_less<int*, double*>` inherits from `__false_type`.]
[:`has_less<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_less..<..bool..bool..const ]
[endsect]

54
doc/has_less_equal.qbk Normal file
View File

@ -0,0 +1,54 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_less_equal has_less_equal]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_less_equal : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs<=rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs<=rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator<=`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs<=rhs); // is valid if has_less_equal<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_less_equal.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_less_equal<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_less_equal<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_less_equal<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_less_equal<long>` inherits from `__true_type`.]
[:`has_less_equal<int, int, bool>` inherits from `__true_type`.]
[:`has_less_equal<int, double, bool>` inherits from `__true_type`.]
[:`has_less_equal<const int>` inherits from `__true_type`.]
[:`has_less_equal<int*, int>` inherits from `__false_type`.]
[:`has_less_equal<int*, double*>` inherits from `__false_type`.]
[:`has_less_equal<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_less_equal..<=..bool..bool..const ]
[endsect]

53
doc/has_logical_and.qbk Normal file
View File

@ -0,0 +1,53 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_logical_and has_logical_and]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_logical_and : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs&&rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs&&rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator&&`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs&&rhs); // is valid if has_logical_and<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_logical_and.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_logical_and<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_logical_and<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_logical_and<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_logical_and<bool>` inherits from `__true_type`.]
[:`has_logical_and<int, int, bool>` inherits from `__true_type`.]
[:`has_logical_and<int, int, long>` inherits from `__true_type`.]
[:`has_logical_and<int, double, bool>` inherits from `__true_type`.]
[:`has_logical_and<const int, int>::value` inherits from `__true_type`.]
[:`has_logical_and<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_logical_and..&&..bool..bool..const ]
[endsect]

108
doc/has_logical_not.qbk Normal file
View File

@ -0,0 +1,108 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_logical_not has_logical_not]
template <class Rhs, class Ret=dont_care>
struct has_logical_not : public __tof {};
__inherit
If (i) `rhs` of type `Rhs` can be used in expression `!rhs`,
and (ii) `Ret=dont_care` or the result of expression `!rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of prefix `operator!`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Rhs rhs;
f(!rhs); // is valid if has_logical_not<Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_logical_not.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_logical_not<Rhs, Ret>::value_type` is the type `bool`.]
[:`has_logical_not<Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_logical_not<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_logical_not<bool>` inherits from `__true_type`.]
[:`has_logical_not<int, bool>` inherits from `__true_type`.]
[:`has_logical_not<int, long>` inherits from `__true_type`.]
[:`has_logical_not<double, double>` inherits from `__true_type`.]
[:`has_logical_not<double, bool>` inherits from `__true_type`.]
[:`has_logical_not<const bool>` inherits from `__true_type`.]
[:`has_logical_not<int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Known issues:]
* This trait cannot detect whether prefix `operator!` is public or not:
if `operator!` is defined as a private member of `Rhs` then
instantiating `has_logical_not<Rhs>` will produce a compiler error.
For this reason `has_logical_not` cannot be used to determine whether a type has a public `operator!` or not.
``
struct A { private: void operator!(); };
boost::has_logical_not<A>::value; // error: A::operator!() is private
``
* There is an issue if the operator exists only for type `A` and `B` is
convertible to `A`. In this case, the compiler will report an ambiguous overload.
``
struct A { };
void operator!(const A&);
struct B { operator A(); };
boost::has_logical_not<A>::value; // this is fine
boost::has_logical_not<B>::value; // error: ambiguous overload
``
* There is an issue when applying this trait to template classes.
If `operator!` is defined but does not bind for a given template type,
it is still detected by the trait which returns `true` instead of `false`.
Example:
``
#include <boost/type_traits/has_logical_not.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator!(const contains<T> &rhs) {
return f(rhs.data);
}
class bad { };
class good { };
bool f(const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_logical_not< contains< good > >::value<<'\n'; // true
contains<good> g;
!g; // ok
// does not work for contains<bad>
std::cout<<boost::has_logical_not< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
!b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[endsect]

53
doc/has_logical_or.qbk Normal file
View File

@ -0,0 +1,53 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_logical_or has_logical_or]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_logical_or : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs||rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs||rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator||`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs||rhs); // is valid if has_logical_or<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_logical_or.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_logical_or<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_logical_or<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_logical_or<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_logical_or<bool>` inherits from `__true_type`.]
[:`has_logical_or<int, int, bool>` inherits from `__true_type`.]
[:`has_logical_or<int, int, long>` inherits from `__true_type`.]
[:`has_logical_or<int, double, bool>` inherits from `__true_type`.]
[:`has_logical_or<const int, int>::value` inherits from `__true_type`.]
[:`has_logical_or<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_logical_or..||..bool..bool..const ]
[endsect]

54
doc/has_minus.qbk Normal file
View File

@ -0,0 +1,54 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_minus has_minus]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_minus : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs-rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs-rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator-`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs-rhs); // is valid if has_minus<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_minus.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_minus<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_minus<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_minus<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_minus<long>` inherits from `__true_type`.]
[:`has_minus<int, int, int>` inherits from `__true_type`.]
[:`has_minus<int, int, long>` inherits from `__true_type`.]
[:`has_minus<int, double, double>` inherits from `__true_type`.]
[:`has_minus<int, double, int>` inherits from `__true_type`.]
[:`has_minus<const int, int>::value` inherits from `__true_type`.]
[:`has_minus<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_minus..-..A..contains<T>..const ]
[endsect]

54
doc/has_minus_assign.qbk Normal file
View File

@ -0,0 +1,54 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_minus_assign has_minus_assign]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_minus_assign : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs-=rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs-=rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator-=`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs-=rhs); // is valid if has_minus_assign<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_minus_assign.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_minus_assign<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_minus_assign<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_minus_assign<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_minus_assign<long>` inherits from `__true_type`.]
[:`has_minus_assign<int, int, int>` inherits from `__true_type`.]
[:`has_minus_assign<int, int, long>` inherits from `__true_type`.]
[:`has_minus_assign<int, double, double>` inherits from `__true_type`.]
[:`has_minus_assign<int, double, int>` inherits from `__true_type`.]
[:`has_minus_assign<const int, int>::value` inherits from `__false_type`.]
[:`has_minus_assign<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_minus_assign..-=..A&..contains<T>&..[/]]
[endsect]

52
doc/has_modulus.qbk Normal file
View File

@ -0,0 +1,52 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_modulus has_modulus]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_modulus : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs%rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs%rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator%`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs%rhs); // is valid if has_modulus<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_modulus.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_modulus<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_modulus<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_modulus<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_modulus<long>` inherits from `__true_type`.]
[:`has_modulus<int, int, int>` inherits from `__true_type`.]
[:`has_modulus<int, int, long>` inherits from `__true_type`.]
[:`has_modulus<const int, int>::value` inherits from `__true_type`.]
[:`has_modulus<int, double>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_modulus..%..A..contains<T>..const ]
[endsect]

View File

@ -0,0 +1,52 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_modulus_assign has_modulus_assign]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_modulus_assign : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs%=rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs%=rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator%=`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs%=rhs); // is valid if has_modulus_assign<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_modulus_assign.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_modulus_assign<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_modulus_assign<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_modulus_assign<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_modulus_assign<long>` inherits from `__true_type`.]
[:`has_modulus_assign<int, int, int>` inherits from `__true_type`.]
[:`has_modulus_assign<int, int, long>` inherits from `__true_type`.]
[:`has_modulus_assign<const int, int>::value` inherits from `__false_type`.]
[:`has_modulus_assign<int, double>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_modulus_assign..%=..A&..contains<T>&..[/]]
[endsect]

54
doc/has_multiplies.qbk Normal file
View File

@ -0,0 +1,54 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_multiplies has_multiplies]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_multiplies : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs*rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs*rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator*`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs*rhs); // is valid if has_multiplies<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_multiplies.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_multiplies<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_multiplies<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_multiplies<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_multiplies<long>` inherits from `__true_type`.]
[:`has_multiplies<int, int, int>` inherits from `__true_type`.]
[:`has_multiplies<int, int, long>` inherits from `__true_type`.]
[:`has_multiplies<int, double, double>` inherits from `__true_type`.]
[:`has_multiplies<int, double, int>` inherits from `__true_type`.]
[:`has_multiplies<const int, int>::value` inherits from `__true_type`.]
[:`has_multiplies<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_multiplies..*..A..contains<T>..const ]
[endsect]

View File

@ -0,0 +1,54 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_multiplies_assign has_multiplies_assign]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_multiplies_assign : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs*=rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs*=rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator*=`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs*=rhs); // is valid if has_multiplies_assign<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_multiplies_assign.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_multiplies_assign<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_multiplies_assign<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_multiplies_assign<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_multiplies_assign<long>` inherits from `__true_type`.]
[:`has_multiplies_assign<int, int, int>` inherits from `__true_type`.]
[:`has_multiplies_assign<int, int, long>` inherits from `__true_type`.]
[:`has_multiplies_assign<int, double, double>` inherits from `__true_type`.]
[:`has_multiplies_assign<int, double, int>` inherits from `__true_type`.]
[:`has_multiplies_assign<const int, int>::value` inherits from `__false_type`.]
[:`has_multiplies_assign<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_multiplies_assign..*=..A&..contains<T>&..[/]]
[endsect]

108
doc/has_negate.qbk Normal file
View File

@ -0,0 +1,108 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_negate has_negate]
template <class Rhs, class Ret=dont_care>
struct has_negate : public __tof {};
__inherit
If (i) `rhs` of type `Rhs` can be used in expression `-rhs`,
and (ii) `Ret=dont_care` or the result of expression `-rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of prefix `operator-`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Rhs rhs;
f(-rhs); // is valid if has_negate<Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_negate.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_negate<Rhs, Ret>::value_type` is the type `bool`.]
[:`has_negate<Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_negate<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_negate<long>` inherits from `__true_type`.]
[:`has_negate<int, int>` inherits from `__true_type`.]
[:`has_negate<int, long>` inherits from `__true_type`.]
[:`has_negate<double, double>` inherits from `__true_type`.]
[:`has_negate<double, int>` inherits from `__true_type`.]
[:`has_negate<const int>` inherits from `__true_type`.]
[:`has_negate<int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Known issues:]
* This trait cannot detect whether prefix `operator-` is public or not:
if `operator-` is defined as a private member of `Rhs` then
instantiating `has_negate<Rhs>` will produce a compiler error.
For this reason `has_negate` cannot be used to determine whether a type has a public `operator-` or not.
``
struct A { private: void operator-(); };
boost::has_negate<A>::value; // error: A::operator-() is private
``
* There is an issue if the operator exists only for type `A` and `B` is
convertible to `A`. In this case, the compiler will report an ambiguous overload.
``
struct A { };
void operator-(const A&);
struct B { operator A(); };
boost::has_negate<A>::value; // this is fine
boost::has_negate<B>::value; // error: ambiguous overload
``
* There is an issue when applying this trait to template classes.
If `operator-` is defined but does not bind for a given template type,
it is still detected by the trait which returns `true` instead of `false`.
Example:
``
#include <boost/type_traits/has_negate.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator-(const contains<T> &rhs) {
return f(rhs.data);
}
class bad { };
class good { };
bool f(const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_negate< contains< good > >::value<<'\n'; // true
contains<good> g;
-g; // ok
// does not work for contains<bad>
std::cout<<boost::has_negate< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
-b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[endsect]

47
doc/has_new_operator.qbk Normal file
View File

@ -0,0 +1,47 @@
[/
Copyright 2009 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_new_operator has_new_operator]
template <class T>
struct has_new_operator : public __tof {};
__inherit If T is a (possibly cv-qualified) type with an overloaded new-operator
then inherits from __true_type, otherwise inherits from __false_type.
[has_binary_operator_compat] Also known to be broken with the Borland/Codegear compilers.
__std_ref 12.5.
__header ` #include <boost/type_traits/has_new_operator.hpp>` or ` #include <boost/type_traits.hpp>`
__examples
Given:
class A { void* operator new(std::size_t); };
class B { void* operator new(std::size_t, const std::nothrow&); };
class C { void* operator new(std::size_t, void*); };
class D { void* operator new[](std::size_t); };
class E { void* operator new[](std::size_t, const std::nothrow&); };
class F { void* operator new[](std::size_t, void*); };
Then:
[:`has_new_operator<A>` inherits from `__true_type`.]
[:`has_new_operator<B>` inherits from `__true_type`.]
[:`has_new_operator<C>` inherits from `__true_type`.]
[:`has_new_operator<D>` inherits from `__true_type`.]
[:`has_new_operator<E>` inherits from `__true_type`.]
[:`has_new_operator<F>` inherits from `__true_type`.]
[endsect]

54
doc/has_not_equal_to.qbk Normal file
View File

@ -0,0 +1,54 @@
[/
(C) Copyright 2009-2011 Frederic Bron.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:has_not_equal_to has_not_equal_to]
template <class Lhs, class Rhs=Lhs, class Ret=dont_care>
struct has_not_equal_to : public __tof {};
__inherit
If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs!=rhs`,
and (ii) `Ret=dont_care` or the result of expression `lhs!=rhs` is convertible to `Ret`
then inherits from __true_type,
otherwise inherits from __false_type.
The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator!=`.
If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`.
Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`:
``
void f(Ret);
Lhs lhs;
Rhs rhs;
f(lhs!=rhs); // is valid if has_not_equal_to<Lhs, Rhs, Ret>::value==true
``
If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_not_equal_to.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_not_equal_to<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
[:`has_not_equal_to<Lhs, Rhs, Ret>::value` is a `bool` integral constant expression.]
[:`has_not_equal_to<int>::value` is a `bool` integral constant expression that evaluates to `true`.]
[:`has_not_equal_to<long>` inherits from `__true_type`.]
[:`has_not_equal_to<int, int, bool>` inherits from `__true_type`.]
[:`has_not_equal_to<int, double, bool>` inherits from `__true_type`.]
[:`has_not_equal_to<const int>` inherits from `__true_type`.]
[:`has_not_equal_to<int*, int>` inherits from `__false_type`.]
[:`has_not_equal_to<int*, double*>` inherits from `__false_type`.]
[:`has_not_equal_to<int, int, std::string>` inherits from `__false_type`.]
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_not_equal_to..!=..bool..bool..const ]
[endsect]

Some files were not shown because too many files have changed in this diff Show More