Compare commits

...

749 Commits

Author SHA1 Message Date
defcaf7f9b Add missing #include.
Add missing copyright.
2022-04-15 18:26:42 +01:00
22fc50f36d Make type_traits usable as a module. 2022-04-14 19:16:06 +01: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
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
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
5e1995dcf8 Update to GCC support: support up to 128-byte alignments.
[SVN r76306]
2012-01-04 17:13:24 +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
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
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
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
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
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
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
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
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
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
19b82cc55b Fix inspection report issues.
[SVN r67728]
2011-01-06 17:09:17 +00:00
772 changed files with 31546 additions and 16466 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

20
CMakeLists.txt Normal file
View File

@ -0,0 +1,20 @@
# 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
# 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
)

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

View File

@ -69,4 +69,8 @@ boostbook standalone
install pdfinstall : standalone/<format>pdf : <install-type>PDF <location>. <name>type_traits.pdf ;
explicit pdfinstall ;
###############################################################################
alias boostdoc ;
explicit boostdoc ;
alias boostrelease : standalone ;
explicit boostrelease ;

View File

@ -12,15 +12,13 @@
{
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.
__compat If the compiler does not support partial specialization of class-templates
then this template will compile, but the member `type` will always be the same as
type `T` except where __transform_workaround have been applied.
__header ` #include <boost/type_traits/add_const.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
@ -37,5 +35,7 @@ __header ` #include <boost/type_traits/add_const.hpp>` or ` #include <boost/type
]
[all_compilers]
[endsect]

View File

@ -12,15 +12,13 @@
{
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.
__compat If the compiler does not support partial specialization of class-templates
then this template will compile, but the member `type` will always be the same as
type `T` except where __transform_workaround have been applied.
__header ` #include <boost/type_traits/add_cv.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
@ -37,5 +35,7 @@ __header ` #include <boost/type_traits/add_cv.hpp>` or ` #include <boost/type_tr
]
[all_compilers]
[endsect]

View File

@ -12,17 +12,15 @@
{
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.
__compat If the compiler does not support partial specialization of class-templates
then this template will compile, but the member `type` will always be the same as
type `T` except where __transform_workaround have been applied.
__header ` #include <boost/type_traits/add_lvalue_reference.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
@ -43,5 +41,7 @@ __header ` #include <boost/type_traits/add_lvalue_reference.hpp>` or ` #include
]
[all_compilers]
[endsect]

View File

@ -12,19 +12,17 @@
{
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 `TYPEOF(&t)`,
is that it produces the same type as `decltype(&t)`,
where `t` is an object of type `T`.
__std_ref 8.3.1.
__compat If the compiler does not support partial specialization of class-templates
then this template will compile, but the member `type` will always be the same as
type `T` except where __transform_workaround have been applied.
__header ` #include <boost/type_traits/add_pointer.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
@ -41,5 +39,7 @@ __header ` #include <boost/type_traits/add_pointer.hpp>` or ` #include <boost/ty
]
[all_compilers]
[endsect]

View File

@ -18,15 +18,13 @@ for backwards compatibility only.
{
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.
__compat If the compiler does not support partial specialization of class-templates
then this template will compile, but the member `type` will always be the same as
type `T` except where __transform_workaround have been applied.
__header ` #include <boost/type_traits/add_reference.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
@ -43,5 +41,7 @@ __header ` #include <boost/type_traits/add_reference.hpp>` or ` #include <boost/
]
[all_compilers]
[endsect]

View File

@ -12,7 +12,9 @@
{
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
@ -21,11 +23,6 @@ reference. -end note\]].
__std_ref 20.7.6.2.
__compat If the compiler does not support partial specialization of class-templates
and rvalue references
then this template will compile, but the member `type` will always be the same as
type `T`.
__header ` #include <boost/type_traits/add_rvalue_reference.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
@ -46,5 +43,7 @@ __header ` #include <boost/type_traits/add_rvalue_reference.hpp>` or ` #include
]
__compat In the absence of rvalue-reference support this trait has no effect.
[endsect]

View File

@ -12,15 +12,13 @@
{
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.
__compat If the compiler does not support partial specialization of class-templates
then this template will compile, but the member `type` will always be the same as
type `T` except where __transform_workaround have been applied.
__header ` #include <boost/type_traits/add_volatile.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
@ -37,5 +35,7 @@ __header ` #include <boost/type_traits/add_volatile.hpp>` or ` #include <boost/t
]
[all_compilers]
[endsect]

View File

@ -18,5 +18,37 @@ 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]

View File

@ -30,5 +30,26 @@ 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]

View File

@ -11,83 +11,74 @@
[section:common_type common_type]
[/===================================================================]
[def __declval [@../../../utility/doc/html/declval.html declval]]
__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> 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
`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>
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 <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 T type;
typedef typename __decay<T>::type type;
};
template <class T, class U>
struct common_type<T, U> {
typedef decltype(__declval<bool>() ? __declval<T>() : __declval<U>()) type;
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.
are desired among the `common_type` arguments.
Note that when the compiler does not support variadic templates (and the macro BOOST_NO_VARIADIC_TEMPLATES is defined)
then the maximum number of template arguments is 3.
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 Configuration macros]
When the compiler does not support static assertions then the user can select the way static assertions are reported. Define
* BOOST_COMMON_TYPE_USES_STATIC_ASSERT: define it if you want to use Boost.StaticAssert
* BOOST_COMMON_TYPE_USES_MPL_ASSERT: define it if you want to use Boost.MPL static asertions
The default behavior is to use mpl assertions in this case, but setting BOOST_COMMON_TYPE_USES_STATIC_ASSERT may reduce
compile times and header dependencies somewhat.
Depending on the static assertion used you will have an hint of the failing assertion either through the symbol or through the text.
When possible common_type is implemented using `decltype`. Otherwise when BOOST_COMMON_TYPE_DONT_USE_TYPEOF is not defined
it uses Boost.TypeOf.
[h4 Tutorial]
In a nutshell, __common_type is a trait that takes 1 or more types, and returns a type which
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.
and yet still want to interoperate with the `common_type` facility.
[*Example:]
template <class T, class U>
complex<typename __common_type<T, U>::type>
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.
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
typename common_type<T...>::type
min(T... t);
This is a very useful and broadly applicable utility.
@ -97,17 +88,17 @@ This is a very useful and broadly applicable utility.
Another choice for the author of the preceding operator could be
template <class T, class U>
typename __common_type<complex<T>, complex<U> >::type
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.
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;
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?]
[h4 How important is the order of the `common_type<>` template arguments?]
The order of the template parameters is important.
@ -164,7 +155,7 @@ Clients wanting to ask `common_type<A, B, C>` in any order and get the same resu
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?]
[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>`
@ -183,7 +174,7 @@ to be well defined to define it themselves:
Now this client can ask for `common_type<A, B>`.
[h4 How common_type behaves with pointers?]
[h4 How does `common_type` behave with pointers?]
Consider
@ -209,17 +200,17 @@ But in the absence of a motivating use cases, we prefer not to add more than the
Of course the user can always make this specialization.
[h4 Can you explain the pros/cons of common_type against Boost.Typeof?]
[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
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 equivalent to
`decltype(__declval<bool>() ? __declval<T>() : __declval<U>())`
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.
`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.

View File

@ -14,11 +14,10 @@ __header ` #include <boost/type_traits/conditional.hpp>` or ` #include <boost/ty
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.
This trait is really just an alias for `boost::mpl::if_c`.
[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]

View File

@ -18,7 +18,8 @@ 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 and Jeremy Siek.
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],

View File

@ -12,10 +12,12 @@
{
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 `U`.
function type then the result is `U*`, otherwise the result is `remove_cv<U>::type`.
__std_ref 3.9.1.
@ -36,5 +38,7 @@ __header ` #include <boost/type_traits/decay.hpp>` or ` #include <boost/type_tra
]
[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]

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]

View File

@ -146,18 +146,18 @@ determine whether to destructors need to be called
[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 proxying iterators or not,
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 proxying iterators
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 proxying iterators, and even iterators of
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 proxying iterator or not, and
// tests whether iterator is a proxy iterator or not, and
// uses optimal form accordingly:
//
namespace detail{
@ -221,7 +221,7 @@ and enum types to double:
An improved `std::min` function could be written like this:
template <class T, class U>
typename __common_type<T, U>::type min(T t, T u)
typename __common_type<T, U>::type min(T t, U u)
{
return t < u ? t : u;
}

View File

@ -25,7 +25,7 @@ __examples
[:`extent<double[2][3][4], 1>::type` is the type `__integral_constant<std::size_t, 3>`.]
[:`extent<double[2][3][4], 3>::type` is the type `__integral_constant<std::size_t, 4>`.]
[:`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/.]
@ -44,5 +44,7 @@ expression that evaluates to /0/: `boost::array` is a class type and [*not an ar
[:`extent<T>::value_type` is the type `std::size_t`.]
[all_compilers]
[endsect]

View File

@ -12,7 +12,9 @@
{
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.
@ -33,5 +35,7 @@ __header ` #include <boost/type_traits/floating_point_promotion.hpp>` or ` #incl
]
[all_compilers]
[endsect]

View File

@ -52,5 +52,7 @@ type use __remove_pointer.]
]
[all_compilers]
[endsect]

View File

@ -44,66 +44,9 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
[has_binary_operator_compat]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator&` is public or not:
if `operator&` is defined as a private member of `Lhs` then
instantiating `has_bit_and<Lhs>` will produce a compiler error.
For this reason `has_bit_and` cannot be used to determine whether a type has a public `operator&` or not.
``
struct A { private: void operator&(const A&); };
boost::has_bit_and<A>::value; // error: A::operator&(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_bit_and<A>::value; // this is fine
boost::has_bit_and<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_bit_and.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator&(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_bit_and< contains< good > >::value<<'\n'; // true
contains<good> g;
g&g; // ok
// does not work for contains<bad>
std::cout<<boost::has_bit_and< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b&b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_bit_and..&..A..contains<T>..const ]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -44,66 +46,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator&=` is public or not:
if `operator&=` is defined as a private member of `Lhs` then
instantiating `has_bit_and_assign<Lhs>` will produce a compiler error.
For this reason `has_bit_and_assign` cannot be used to determine whether a type has a public `operator&=` or not.
``
struct A { private: void operator&=(const A&); };
boost::has_bit_and_assign<A>::value; // error: A::operator&=(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_bit_and_assign<A>::value; // this is fine
boost::has_bit_and_assign<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_bit_and_assign.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator&=(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_bit_and_assign< contains< good > >::value<<'\n'; // true
contains<good> g;
g&=g; // ok
// does not work for contains<bad>
std::cout<<boost::has_bit_and_assign< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b&=b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_bit_and_assign..&=..A&..contains<T>&..[/Nothing]]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -44,66 +46,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator|` is public or not:
if `operator|` is defined as a private member of `Lhs` then
instantiating `has_bit_or<Lhs>` will produce a compiler error.
For this reason `has_bit_or` cannot be used to determine whether a type has a public `operator|` or not.
``
struct A { private: void operator|(const A&); };
boost::has_bit_or<A>::value; // error: A::operator|(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_bit_or<A>::value; // this is fine
boost::has_bit_or<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_bit_or.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator|(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_bit_or< contains< good > >::value<<'\n'; // true
contains<good> g;
g|g; // ok
// does not work for contains<bad>
std::cout<<boost::has_bit_or< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b|b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_bit_or..|..A..contains<T>..const ]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -44,66 +46,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator|=` is public or not:
if `operator|=` is defined as a private member of `Lhs` then
instantiating `has_bit_or_assign<Lhs>` will produce a compiler error.
For this reason `has_bit_or_assign` cannot be used to determine whether a type has a public `operator|=` or not.
``
struct A { private: void operator|=(const A&); };
boost::has_bit_or_assign<A>::value; // error: A::operator|=(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_bit_or_assign<A>::value; // this is fine
boost::has_bit_or_assign<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_bit_or_assign.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator|=(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_bit_or_assign< contains< good > >::value<<'\n'; // true
contains<good> g;
g|=g; // ok
// does not work for contains<bad>
std::cout<<boost::has_bit_or_assign< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b|=b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_bit_or_assign..|=..A&..contains<T>&..[/Nothing]]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -44,66 +46,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator^` is public or not:
if `operator^` is defined as a private member of `Lhs` then
instantiating `has_bit_xor<Lhs>` will produce a compiler error.
For this reason `has_bit_xor` cannot be used to determine whether a type has a public `operator^` or not.
``
struct A { private: void operator^(const A&); };
boost::has_bit_xor<A>::value; // error: A::operator^(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_bit_xor<A>::value; // this is fine
boost::has_bit_xor<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_bit_xor.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator^(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_bit_xor< contains< good > >::value<<'\n'; // true
contains<good> g;
g^g; // ok
// does not work for contains<bad>
std::cout<<boost::has_bit_xor< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b^b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_bit_xor..^..A..contains<T>..const ]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -44,66 +46,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator^=` is public or not:
if `operator^=` is defined as a private member of `Lhs` then
instantiating `has_bit_xor_assign<Lhs>` will produce a compiler error.
For this reason `has_bit_xor_assign` cannot be used to determine whether a type has a public `operator^=` or not.
``
struct A { private: void operator^=(const A&); };
boost::has_bit_xor_assign<A>::value; // error: A::operator^=(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_bit_xor_assign<A>::value; // this is fine
boost::has_bit_xor_assign<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_bit_xor_assign.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator^=(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_bit_xor_assign< contains< good > >::value<<'\n'; // true
contains<good> g;
g^=g; // ok
// does not work for contains<bad>
std::cout<<boost::has_bit_xor_assign< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b^=b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_bit_xor_assign..^=..A&..contains<T>&..[/Nothing]]
[endsect]

View File

@ -27,6 +27,8 @@ 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`.]
@ -46,10 +48,6 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether prefix `operator~` is public or not:
@ -107,5 +105,7 @@ int main() {
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[prefix_operator_known_issues has_complement..~]
[endsect]

View File

@ -27,6 +27,8 @@ 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`.]
@ -49,10 +51,6 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether prefix `operator*` is public or not:

View File

@ -28,6 +28,8 @@ 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`.]
@ -46,66 +48,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator/` is public or not:
if `operator/` is defined as a private member of `Lhs` then
instantiating `has_divides<Lhs>` will produce a compiler error.
For this reason `has_divides` cannot be used to determine whether a type has a public `operator/` or not.
``
struct A { private: void operator/(const A&); };
boost::has_divides<A>::value; // error: A::operator/(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_divides<A>::value; // this is fine
boost::has_divides<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_divides.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator/(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_divides< contains< good > >::value<<'\n'; // true
contains<good> g;
g/g; // ok
// does not work for contains<bad>
std::cout<<boost::has_divides< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b/b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_divides../..A..contains<T>..const ]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -46,66 +48,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator/=` is public or not:
if `operator/=` is defined as a private member of `Lhs` then
instantiating `has_divides_assign<Lhs>` will produce a compiler error.
For this reason `has_divides_assign` cannot be used to determine whether a type has a public `operator/=` or not.
``
struct A { private: void operator/=(const A&); };
boost::has_divides_assign<A>::value; // error: A::operator/=(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_divides_assign<A>::value; // this is fine
boost::has_divides_assign<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_divides_assign.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator/=(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_divides_assign< contains< good > >::value<<'\n'; // true
contains<good> g;
g/=g; // ok
// does not work for contains<bad>
std::cout<<boost::has_divides_assign< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b/=b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_divides_assign../=..A&..contains<T>&..[/Nothing]]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -46,66 +48,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator==` is public or not:
if `operator==` is defined as a private member of `Lhs` then
instantiating `has_equal_to<Lhs>` will produce a compiler error.
For this reason `has_equal_to` cannot be used to determine whether a type has a public `operator==` or not.
``
struct A { private: void operator==(const A&); };
boost::has_equal_to<A>::value; // error: A::operator==(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_equal_to<A>::value; // this is fine
boost::has_equal_to<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_equal_to.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator==(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_equal_to< contains< good > >::value<<'\n'; // true
contains<good> g;
g==g; // ok
// does not work for contains<bad>
std::cout<<boost::has_equal_to< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b==b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_equal_to..==..bool..bool..const ]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -46,66 +48,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator>` is public or not:
if `operator>` is defined as a private member of `Lhs` then
instantiating `has_greater<Lhs>` will produce a compiler error.
For this reason `has_greater` cannot be used to determine whether a type has a public `operator>` or not.
``
struct A { private: void operator>(const A&); };
boost::has_greater<A>::value; // error: A::operator>(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_greater<A>::value; // this is fine
boost::has_greater<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_greater.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator>(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_greater< contains< good > >::value<<'\n'; // true
contains<good> g;
g>g; // ok
// does not work for contains<bad>
std::cout<<boost::has_greater< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b>b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_greater..>..bool..bool..const ]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -46,66 +48,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator>=` is public or not:
if `operator>=` is defined as a private member of `Lhs` then
instantiating `has_greater_equal<Lhs>` will produce a compiler error.
For this reason `has_greater_equal` cannot be used to determine whether a type has a public `operator>=` or not.
``
struct A { private: void operator>=(const A&); };
boost::has_greater_equal<A>::value; // error: A::operator>=(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_greater_equal<A>::value; // this is fine
boost::has_greater_equal<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_greater_equal.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator>=(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_greater_equal< contains< good > >::value<<'\n'; // true
contains<good> g;
g>=g; // ok
// does not work for contains<bad>
std::cout<<boost::has_greater_equal< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b>=b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_greater_equal..>=..bool..bool..const ]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -47,66 +49,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator<<` is public or not:
if `operator<<` is defined as a private member of `Lhs` then
instantiating `has_left_shift<Lhs>` will produce a compiler error.
For this reason `has_left_shift` cannot be used to determine whether a type has a public `operator<<` or not.
``
struct A { private: void operator<<(const A&); };
boost::has_left_shift<A>::value; // error: A::operator<<(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_left_shift<A>::value; // this is fine
boost::has_left_shift<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_left_shift.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator<<(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_left_shift< contains< good > >::value<<'\n'; // true
contains<good> g;
g<<g; // ok
// does not work for contains<bad>
std::cout<<boost::has_left_shift< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b<<b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_left_shift..<<..A..contains<T>..const ]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -44,66 +46,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator<<=` is public or not:
if `operator<<=` is defined as a private member of `Lhs` then
instantiating `has_left_shift_assign<Lhs>` will produce a compiler error.
For this reason `has_left_shift_assign` cannot be used to determine whether a type has a public `operator<<=` or not.
``
struct A { private: void operator<<=(const A&); };
boost::has_left_shift_assign<A>::value; // error: A::operator<<=(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_left_shift_assign<A>::value; // this is fine
boost::has_left_shift_assign<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_left_shift_assign.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator<<=(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_left_shift_assign< contains< good > >::value<<'\n'; // true
contains<good> g;
g<<=g; // ok
// does not work for contains<bad>
std::cout<<boost::has_left_shift_assign< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b<<=b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_left_shift_assign..<<=..A&..contains<T>&..[/]]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -46,66 +48,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator<` is public or not:
if `operator<` is defined as a private member of `Lhs` then
instantiating `has_less<Lhs>` will produce a compiler error.
For this reason `has_less` cannot be used to determine whether a type has a public `operator<` or not.
``
struct A { private: void operator<(const A&); };
boost::has_less<A>::value; // error: A::operator<(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_less<A>::value; // this is fine
boost::has_less<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_less.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator<(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_less< contains< good > >::value<<'\n'; // true
contains<good> g;
g<g; // ok
// does not work for contains<bad>
std::cout<<boost::has_less< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b<b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_less..<..bool..bool..const ]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -46,66 +48,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator<=` is public or not:
if `operator<=` is defined as a private member of `Lhs` then
instantiating `has_less_equal<Lhs>` will produce a compiler error.
For this reason `has_less_equal` cannot be used to determine whether a type has a public `operator<=` or not.
``
struct A { private: void operator<=(const A&); };
boost::has_less_equal<A>::value; // error: A::operator<=(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_less_equal<A>::value; // this is fine
boost::has_less_equal<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_less_equal.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator<=(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_less_equal< contains< good > >::value<<'\n'; // true
contains<good> g;
g<=g; // ok
// does not work for contains<bad>
std::cout<<boost::has_less_equal< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b<=b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_less_equal..<=..bool..bool..const ]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -44,67 +46,8 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[binary_operator_known_issues has_logical_and..&&..bool..bool..const ]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator&&` is public or not:
if `operator&&` is defined as a private member of `Lhs` then
instantiating `has_logical_and<Lhs>` will produce a compiler error.
For this reason `has_logical_and` cannot be used to determine whether a type has a public `operator&&` or not.
``
struct A { private: void operator&&(const A&); };
boost::has_logical_and<A>::value; // error: A::operator&&(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_logical_and<A>::value; // this is fine
boost::has_logical_and<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_and.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator&&(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_logical_and< contains< good > >::value<<'\n'; // true
contains<good> g;
g&&g; // ok
// does not work for contains<bad>
std::cout<<boost::has_logical_and< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b&&b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[endsect]

View File

@ -27,6 +27,8 @@ 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`.]
@ -45,10 +47,6 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether prefix `operator!` is public or not:

View File

@ -28,6 +28,8 @@ 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`.]
@ -45,66 +47,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator||` is public or not:
if `operator||` is defined as a private member of `Lhs` then
instantiating `has_logical_or<Lhs>` will produce a compiler error.
For this reason `has_logical_or` cannot be used to determine whether a type has a public `operator||` or not.
``
struct A { private: void operator||(const A&); };
boost::has_logical_or<A>::value; // error: A::operator||(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_logical_or<A>::value; // this is fine
boost::has_logical_or<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_or.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator||(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_logical_or< contains< good > >::value<<'\n'; // true
contains<good> g;
g||g; // ok
// does not work for contains<bad>
std::cout<<boost::has_logical_or< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b||b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_logical_or..||..bool..bool..const ]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -46,66 +48,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator-` is public or not:
if `operator-` is defined as a private member of `Lhs` then
instantiating `has_minus<Lhs>` will produce a compiler error.
For this reason `has_minus` cannot be used to determine whether a type has a public `operator-` or not.
``
struct A { private: void operator-(const A&); };
boost::has_minus<A>::value; // error: A::operator-(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_minus<A>::value; // this is fine
boost::has_minus<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_minus.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator-(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_minus< contains< good > >::value<<'\n'; // true
contains<good> g;
g-g; // ok
// does not work for contains<bad>
std::cout<<boost::has_minus< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b-b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_minus..-..A..contains<T>..const ]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -46,66 +48,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator-=` is public or not:
if `operator-=` is defined as a private member of `Lhs` then
instantiating `has_minus_assign<Lhs>` will produce a compiler error.
For this reason `has_minus_assign` cannot be used to determine whether a type has a public `operator-=` or not.
``
struct A { private: void operator-=(const A&); };
boost::has_minus_assign<A>::value; // error: A::operator-=(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_minus_assign<A>::value; // this is fine
boost::has_minus_assign<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_minus_assign.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator-=(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_minus_assign< contains< good > >::value<<'\n'; // true
contains<good> g;
g-=g; // ok
// does not work for contains<bad>
std::cout<<boost::has_minus_assign< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b-=b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_minus_assign..-=..A&..contains<T>&..[/]]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -44,66 +46,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator%` is public or not:
if `operator%` is defined as a private member of `Lhs` then
instantiating `has_modulus<Lhs>` will produce a compiler error.
For this reason `has_modulus` cannot be used to determine whether a type has a public `operator%` or not.
``
struct A { private: void operator%(const A&); };
boost::has_modulus<A>::value; // error: A::operator%(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_modulus<A>::value; // this is fine
boost::has_modulus<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_modulus.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator%(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_modulus< contains< good > >::value<<'\n'; // true
contains<good> g;
g%g; // ok
// does not work for contains<bad>
std::cout<<boost::has_modulus< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b%b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_modulus..%..A..contains<T>..const ]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -44,66 +46,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator%=` is public or not:
if `operator%=` is defined as a private member of `Lhs` then
instantiating `has_modulus_assign<Lhs>` will produce a compiler error.
For this reason `has_modulus_assign` cannot be used to determine whether a type has a public `operator%=` or not.
``
struct A { private: void operator%=(const A&); };
boost::has_modulus_assign<A>::value; // error: A::operator%=(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_modulus_assign<A>::value; // this is fine
boost::has_modulus_assign<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_modulus_assign.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator%=(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_modulus_assign< contains< good > >::value<<'\n'; // true
contains<good> g;
g%=g; // ok
// does not work for contains<bad>
std::cout<<boost::has_modulus_assign< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b%=b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_modulus_assign..%=..A&..contains<T>&..[/]]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -46,66 +48,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator*` is public or not:
if `operator*` is defined as a private member of `Lhs` then
instantiating `has_multiplies<Lhs>` will produce a compiler error.
For this reason `has_multiplies` cannot be used to determine whether a type has a public `operator*` or not.
``
struct A { private: void operator*(const A&); };
boost::has_multiplies<A>::value; // error: A::operator*(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_multiplies<A>::value; // this is fine
boost::has_multiplies<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_multiplies.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator*(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_multiplies< contains< good > >::value<<'\n'; // true
contains<good> g;
g*g; // ok
// does not work for contains<bad>
std::cout<<boost::has_multiplies< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b*b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_multiplies..*..A..contains<T>..const ]
[endsect]

View File

@ -28,6 +28,8 @@ 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`.]
@ -46,66 +48,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator*=` is public or not:
if `operator*=` is defined as a private member of `Lhs` then
instantiating `has_multiplies_assign<Lhs>` will produce a compiler error.
For this reason `has_multiplies_assign` cannot be used to determine whether a type has a public `operator*=` or not.
``
struct A { private: void operator*=(const A&); };
boost::has_multiplies_assign<A>::value; // error: A::operator*=(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_multiplies_assign<A>::value; // this is fine
boost::has_multiplies_assign<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_multiplies_assign.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator*=(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_multiplies_assign< contains< good > >::value<<'\n'; // true
contains<good> g;
g*=g; // ok
// does not work for contains<bad>
std::cout<<boost::has_multiplies_assign< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b*=b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_multiplies_assign..*=..A&..contains<T>&..[/]]
[endsect]

View File

@ -27,6 +27,8 @@ 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`.]
@ -45,10 +47,6 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether prefix `operator-` is public or not:

View File

@ -12,9 +12,7 @@
__inherit If T is a (possibly cv-qualified) type with an overloaded new-operator
then inherits from __true_type, otherwise inherits from __false_type.
__compat Not usable with compilers that do not support "substitution failure is not an error"
(in which case BOOST_NO_SFINAE will be defined), also known to be broken with
the Borland/Codegear compiler.
[has_binary_operator_compat] Also known to be broken with the Borland/Codegear compilers.
__std_ref 12.5.

View File

@ -28,6 +28,8 @@ 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`.]
@ -46,66 +48,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator!=` is public or not:
if `operator!=` is defined as a private member of `Lhs` then
instantiating `has_not_equal_to<Lhs>` will produce a compiler error.
For this reason `has_not_equal_to` cannot be used to determine whether a type has a public `operator!=` or not.
``
struct A { private: void operator!=(const A&); };
boost::has_not_equal_to<A>::value; // error: A::operator!=(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_not_equal_to<A>::value; // this is fine
boost::has_not_equal_to<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_not_equal_to.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator!=(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_not_equal_to< contains< good > >::value<<'\n'; // true
contains<good> g;
g!=g; // ok
// does not work for contains<bad>
std::cout<<boost::has_not_equal_to< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b!=b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_not_equal_to..!=..bool..bool..const ]
[endsect]

View File

@ -14,14 +14,11 @@ __inherit If T is a (possibly cv-qualified) type with a non-throwing assignment-
then inherits from __true_type, otherwise inherits from __false_type. Type `T`
must be a complete type.
__compat If the compiler does not support partial-specialization of class
templates, then this template can not be used with function types.
Without some (as yet unspecified) help from the compiler,
`has_nothrow_assign` will never report that a class or struct has a
non-throwing assignment-operator; this is always safe, if possibly sub-optimal.
Currently (May 2005) only Visual C++ 8 has the necessary compiler support to ensure that this
trait "just works".
__compat Either requires C++11 `noexcept` and `decltype` or else some (unspecified) help from the compiler.
Currently (June 2015) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
Intel-11.0, and Codegear and all recent GCC versions have the necessary compiler __intrinsics to ensure that this
trait "just works". You may test to see if the necessary support is available
by checking to see if `defined(BOOST_HAS_NOTHROW_CONSTRUCTOR) || (!defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_NOEXCEPT))` is true.
__header ` #include <boost/type_traits/has_nothrow_assign.hpp>` or ` #include <boost/type_traits.hpp>`

View File

@ -19,16 +19,11 @@ must be a complete type.
These two traits are synonyms for each other.
__compat If the compiler does not support partial-specialization of class
templates, then this template can not be used with function types.
Without some (unspecified) help from the compiler,
`has_nothrow_constructor` will never report that a class or struct has a
non-throwing default-constructor; this is always safe, if possibly sub-optimal.
Currently (May 2011) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
Intel-11.0, and Codegear have the necessary compiler __intrinsics to ensure that this
trait "just works". You may also test to see if the necessary __intrinsics are available
by checking to see if the macro `BOOST_HAS_NOTHROW_CONSTRUCTOR` is defined.
__compat Either requires C++11 `noexcept` and `decltype` or else some (unspecified) help from the compiler.
Currently (June 2015) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
Intel-11.0, and Codegear and all recent GCC versions have the necessary compiler __intrinsics to ensure that this
trait "just works". You may test to see if the necessary support is available
by checking to see if `defined(BOOST_HAS_NOTHROW_CONSTRUCTOR) || (!defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_NOEXCEPT))` is true.
__header ` #include <boost/type_traits/has_nothrow_constructor.hpp>` or ` #include <boost/type_traits.hpp>`

View File

@ -19,16 +19,11 @@ must be a complete type.
These two traits are synonyms for each other.
__compat If the compiler does not support partial-specialization of class
templates, then this template can not be used with function types.
Without some (as yet unspecified) help from the compiler,
`has_nothrow_copy` will never report that a class or struct has a
non-throwing copy-constructor; this is always safe, if possibly sub-optimal.
Currently (May 2011) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
Intel-11.0, and Codegear have the necessary compiler __intrinsics to ensure that this
trait "just works". You may also test to see if the necessary __intrinsics are available
by checking to see if the macro `BOOST_HAS_NOTHROW_COPY` is defined.
__compat Either requires C++11 `noexcept` and `decltype` or else some (unspecified) help from the compiler.
Currently (June 2015) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
Intel-11.0, and Codegear and all recent GCC versions have the necessary compiler __intrinsics to ensure that this
trait "just works". You may test to see if the necessary support is available
by checking to see if `defined(BOOST_HAS_NOTHROW_COPY) || (!defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_NOEXCEPT))` is true.
__header ` #include <boost/type_traits/has_nothrow_copy.hpp>` or ` #include <boost/type_traits.hpp>`

View File

@ -0,0 +1,29 @@
[/
Copyright 2015 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_nothrow_destruct has_nothrow_destructor]
template <class T>
struct has_nothrow_destructor : public __tof {};
__inherit If T is a (possibly cv-qualified) type with a non-throwing destructor
then inherits from __true_type, otherwise inherits from __false_type. Type `T`
must be a complete type.
__compat Either requires C++11 `noexcept` and `decltype` or else some (unspecified) help from the compiler.
You may test to see if the necessary support is available
by checking to see if `!defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_NOEXCEPT)` is true.
__header ` #include <boost/type_traits/has_nothrow_copy.hpp>` or ` #include <boost/type_traits.hpp>`
[note
Note that destructors are assumed to be non-throwing unless they are explicitly marked otherwise with a `throw(something)` specification.
This is in line with the C++11 standard.
]
[endsect]

View File

@ -28,6 +28,8 @@ If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_plus.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_plus<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
@ -46,66 +48,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator+` is public or not:
if `operator+` is defined as a private member of `Lhs` then
instantiating `has_plus<Lhs>` will produce a compiler error.
For this reason `has_plus` cannot be used to determine whether a type has a public `operator+` or not.
``
struct A { private: void operator+(const A&); };
boost::has_plus<A>::value; // error: A::operator+(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_plus<A>::value; // this is fine
boost::has_plus<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_plus.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator+(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_plus< contains< good > >::value<<'\n'; // true
contains<good> g;
g+g; // ok
// does not work for contains<bad>
std::cout<<boost::has_plus< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b+b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_plus..+..A..contains<T>..const ]
[endsect]

View File

@ -28,6 +28,8 @@ If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_plus_assign.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_plus_assign<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
@ -46,66 +48,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator+=` is public or not:
if `operator+=` is defined as a private member of `Lhs` then
instantiating `has_plus_assign<Lhs>` will produce a compiler error.
For this reason `has_plus_assign` cannot be used to determine whether a type has a public `operator+=` or not.
``
struct A { private: void operator+=(const A&); };
boost::has_plus_assign<A>::value; // error: A::operator+=(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_plus_assign<A>::value; // this is fine
boost::has_plus_assign<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_plus_assign.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator+=(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_plus_assign< contains< good > >::value<<'\n'; // true
contains<good> g;
g+=g; // ok
// does not work for contains<bad>
std::cout<<boost::has_plus_assign< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b+=b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_plus_assign..+=..A&..contains<T>&..const ]
[endsect]

View File

@ -27,6 +27,8 @@ If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_post_decrement.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_post_decrement<Lhs, Ret>::value_type` is the type `bool`.]
@ -47,10 +49,6 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether postfix `operator--` is public or not:
@ -108,5 +106,7 @@ int main() {
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[prefix_operator_known_issues has_post_decrement..--]
[endsect]

View File

@ -27,6 +27,8 @@ If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_post_increment.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_post_increment<Lhs, Ret>::value_type` is the type `bool`.]
@ -47,10 +49,6 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether postfix `operator++` is public or not:
@ -108,5 +106,7 @@ int main() {
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[prefix_operator_known_issues has_post_increment..++]
[endsect]

View File

@ -1,4 +1,4 @@
[/
#[/
(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
@ -27,6 +27,8 @@ If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_pre_decrement.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_pre_decrement<Rhs, Ret>::value_type` is the type `bool`.]
@ -47,10 +49,6 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether prefix `operator--` is public or not:
@ -108,5 +106,7 @@ int main() {
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[prefix_operator_known_issues has_pre_decrement..--]
[endsect]

View File

@ -27,6 +27,8 @@ If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_pre_increment.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_pre_increment<Rhs, Ret>::value_type` is the type `bool`.]
@ -47,10 +49,6 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether prefix `operator++` is public or not:
@ -108,5 +106,7 @@ int main() {
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[prefix_operator_known_issues has_pre_increment..++]
[endsect]

View File

@ -28,6 +28,8 @@ If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_right_shift.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_right_shift<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
@ -47,66 +49,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator>>` is public or not:
if `operator>>` is defined as a private member of `Lhs` then
instantiating `has_right_shift<Lhs>` will produce a compiler error.
For this reason `has_right_shift` cannot be used to determine whether a type has a public `operator>>` or not.
``
struct A { private: void operator>>(const A&); };
boost::has_right_shift<A>::value; // error: A::operator>>(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_right_shift<A>::value; // this is fine
boost::has_right_shift<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_right_shift.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator>>(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_right_shift< contains< good > >::value<<'\n'; // true
contains<good> g;
g>>g; // ok
// does not work for contains<bad>
std::cout<<boost::has_right_shift< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b>>b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_right_shift..>>..A..contains<T>..const ]
[endsect]

View File

@ -28,6 +28,8 @@ If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_right_shift_assign.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_right_shift_assign<Lhs, Rhs, Ret>::value_type` is the type `bool`.]
@ -44,66 +46,7 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether binary `operator>>=` is public or not:
if `operator>>=` is defined as a private member of `Lhs` then
instantiating `has_right_shift_assign<Lhs>` will produce a compiler error.
For this reason `has_right_shift_assign` cannot be used to determine whether a type has a public `operator>>=` or not.
``
struct A { private: void operator>>=(const A&); };
boost::has_right_shift_assign<A>::value; // error: A::operator>>=(const A&) 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&, const A&);
struct B { operator A(); };
boost::has_right_shift_assign<A>::value; // this is fine
boost::has_right_shift_assign<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_right_shift_assign.hpp>
#include <iostream>
template <class T>
struct contains { T data; };
template <class T>
bool operator>>=(const contains<T> &lhs, const contains<T> &rhs) {
return f(lhs.data, rhs.data);
}
class bad { };
class good { };
bool f(const good&, const good&) { }
int main() {
std::cout<<std::boolalpha;
// works fine for contains<good>
std::cout<<boost::has_right_shift_assign< contains< good > >::value<<'\n'; // true
contains<good> g;
g>>=g; // ok
// does not work for contains<bad>
std::cout<<boost::has_right_shift_assign< contains< bad > >::value<<'\n'; // true, should be false
contains<bad> b;
b>>=b; // compile time error
return 0;
}
``
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[binary_operator_known_issues has_right_shift_assign..>>=..A&..contains<T>&..[/]]
[endsect]

View File

@ -16,13 +16,12 @@ If a type has a trivial assignment-operator then the operator has the same effec
as copying the bits of one object to the other:
calls to the operator can be safely replaced with a call to `memcpy`.
__compat If the compiler does not support partial-specialization of class
templates, then this template can not be used with function types.
Without some (as yet unspecified) help from the compiler,
__compat Without some (as yet unspecified) help from the compiler,
has_trivial_assign will never report that a user-defined class or struct has a
trivial constructor; this is always safe, if possibly sub-optimal.
Currently (May 2011) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
trivial constructor; this is always safe, if possibly sub-optimal. In order to
correctly handle deleted or private assignment operators, the compiler must also
support C++11's `decltype`.
Currently (May 2015) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
Intel-11.0, and Codegear have the necessary compiler __intrinsics to ensure that this
trait "just works". You may also test to see if the necessary __intrinsics are available
by checking to see if the macro `BOOST_HAS_TRIVIAL_ASSIGN` is defined.

View File

@ -24,13 +24,12 @@ to omit a call to a single trivial-constructor call is of no benefit whatsoever.
However, if loops and/or exception handling code can also be omitted, then some
benefit in terms of code size and speed can be obtained.
__compat If the compiler does not support partial-specialization of class
templates, then this template can not be used with function types.
Without some (as yet unspecified) help from the compiler,
__compat Without some (as yet unspecified) help from the compiler,
has_trivial_constructor will never report that a user-defined class or struct has a
trivial constructor; this is always safe, if possibly sub-optimal.
Currently (May 2011) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
In addition, in order to correctly handle private or deleted default-constructors then
C++11's `deltype` is required.
Currently (May 2015) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
Intel-11.0, and Codegear have the necessary compiler __intrinsics to ensure that this
trait "just works". You may also test to see if the necessary __intrinsics are available
by checking to see if the macro `BOOST_HAS_TRIVIAL_CONSTRUCTOR` is defined.

View File

@ -22,13 +22,12 @@ If a type has a trivial copy-constructor then the constructor has the same effec
as copying the bits of one object to the other:
calls to the constructor can be safely replaced with a call to `memcpy`.
__compat If the compiler does not support partial-specialization of class
templates, then this template can not be used with function types.
Without some (as yet unspecified) help from the compiler,
__compat Without some (as yet unspecified) help from the compiler,
has_trivial_copy will never report that a user-defined class or struct has a
trivial constructor; this is always safe, if possibly sub-optimal.
Currently (May 2011) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
In addition, in order to correctly handle deleted or private copy-constructors
then C++11's `dectype` is required.
Currently (May 2015) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
Intel-11.0, and Codegear have the necessary compiler __intrinsics to ensure that this
trait "just works". You may also test to see if the necessary __intrinsics are available
by checking to see if the macro `BOOST_HAS_TRIVIAL_COPY` is defined.

View File

@ -18,13 +18,12 @@ to omit a call to a single trivial-constructor call is of no benefit whatsoever.
However, if loops and/or exception handling code can also be omitted, then some
benefit in terms of code size and speed can be obtained.
__compat If the compiler does not support partial-specialization of class
templates, then this template can not be used with function types.
Without some (as yet unspecified) help from the compiler,
__compat Without some (as yet unspecified) help from the compiler,
has_trivial_destructor will never report that a user-defined class or struct has a
trivial destructor; this is always safe, if possibly sub-optimal.
Currently (May 2011) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
In addition, in order to correctly handle deleted or private destructors then
support for C++11's `decltype` is required.
Currently (June 2015) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
Intel-11.0, and Codegear have the necessary compiler __intrinsics to ensure that this
trait "just works". You may also test to see if the necessary __intrinsics are available
by checking to see if the macro `BOOST_HAS_TRIVIAL_DESTRUCTOR` is defined.

View File

@ -0,0 +1,48 @@
[/
Copyright 2007 John Maddock.
Copyright 2013 Antony Polukhin.
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_trivial_move_assign has_trivial_move_assign]
template <class T>
struct has_trivial_move_assign : public __tof {};
__inherit If T is a (possibly cv-qualified) type with a trivial move assignment-operator
then inherits from __true_type, otherwise inherits from __false_type.
If a type has a trivial move assignment-operator then the operator has the same effect
as copying the bits of one object to the other:
calls to the operator can be safely replaced with a call to `memcpy`.
__compat Without some (as yet unspecified) help from the compiler,
has_trivial_move_assign will never report that a user-defined class or struct has a
trivial move assign; this is always safe, if possibly sub-optimal.
In addition, in order to correctly handle private or deleted move assignment
operators then c++11's `decltype` is required.
Currently (June 2015) compilers that have the necessary __intrinsics to ensure that this
trait "just works" include Clang, GCC-5.1 and MSVC-12.0.
You may also test to see if the necessary __intrinsics are available
by checking to see if the macro `BOOST_HAS_TRIVIAL_MOVE_ASSIGN` is defined.
__header ` #include <boost/type_traits/has_trivial_move_assign.hpp>` or ` #include <boost/type_traits.hpp>`
__examples
[:`has_trivial_move_assign<int>` inherits from `__true_type`.]
[:`has_trivial_move_assign<char*>::type` is the type `__true_type`.]
[:`has_trivial_move_assign<int (*)(long)>::value` is an integral constant
expression that evaluates to /true/.]
[:`has_trivial_move_assign<MyClass>::value` is an integral constant
expression that evaluates to /false/.]
[:`has_trivial_move_assign<T>::value_type` is the type `bool`.]
[endsect]

View File

@ -0,0 +1,49 @@
[/
Copyright 2007 John Maddock.
Copyright 2013 Antony Polukhin.
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_trivial_move_constructor has_trivial_move_constructor]
template <class T>
struct has_trivial_move_constructor : public __tof {};
__inherit If T is a (possibly cv-qualified) type with a trivial move-constructor
then inherits from __true_type, otherwise inherits from __false_type.
If a type has a trivial move-constructor then the constructor has the same effect
as copying the bits of one object to the other:
calls to the constructor can be safely replaced with a call to `memcpy`.
__compat Without some (as yet unspecified) help from the compiler,
has_trivial_move_constructor will never report that a user-defined class or struct has a
trivial constructor; this is always safe, if possibly sub-optimal.
In addition C++11's `decltype` is required to correctly support deleted or private
move constructors.
Currently (June 2015) compilers that have the necessary __intrinsics to ensure that this
trait "just works" include Clang, GCC-5.1, and MSVC-12.0.
You may also test to see if the necessary __intrinsics are available
by checking to see if the macro `BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR` is defined.
__header ` #include <boost/type_traits/has_trivial_move_constructor.hpp>` or ` #include <boost/type_traits.hpp>`
__examples
[:`has_trivial_move_constructor<int>` inherits from `__true_type`.]
[:`has_trivial_move_constructor<char*>::type` is the type `__true_type`.]
[:`has_trivial_move_constructor<int (*)(long)>::value` is an integral constant
expression that evaluates to /true/.]
[:`has_trivial_move_constructor<MyClass>::value` is an integral constant
expression that evaluates to /false/.]
[:`has_trivial_move_constructor<T>::value_type` is the type `bool`.]
[endsect]

View File

@ -27,6 +27,8 @@ If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_unary_minus.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_unary_minus<Rhs, Ret>::value_type` is the type `bool`.]
@ -45,10 +47,6 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether prefix `operator-` is public or not:
@ -106,5 +104,7 @@ int main() {
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[prefix_operator_known_issues has_unary_minus..-]
[endsect]

View File

@ -27,6 +27,8 @@ If `Ret=void`, the return type is checked to be exactly `void`.
__header `#include <boost/type_traits/has_unary_plus.hpp>` or `#include <boost/type_traits/has_operator.hpp>` or `#include <boost/type_traits.hpp>`
[has_binary_operator_compat]
__examples
[:`has_unary_plus<Rhs, Ret>::value_type` is the type `bool`.]
@ -45,10 +47,6 @@ __examples
[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits]
[*Limitation:]
* Requires a compiler with working SFINAE.
[*Known issues:]
* This trait cannot detect whether prefix `operator+` is public or not:
@ -106,5 +104,7 @@ int main() {
* `volatile` qualifier is not properly handled and would lead to undefined behavior
[prefix_operator_known_issues has_unary_plus..+]
[endsect]

View File

@ -12,14 +12,13 @@
__inherit If T is a (possibly cv-qualified) type with a virtual destructor
then inherits from __true_type, otherwise inherits from __false_type.
__compat This trait is provided for completeness, since it's part of the
Technical Report on C++ Library Extensions. However, there is currently no
way to portably implement this trait. The default version provided
__compat There is currently no
way to portably implement this trait: the default version
always inherits from __false_type, and has to be explicitly specialized for
types with virtual destructors unless the compiler used has compiler __intrinsics
that enable the trait to do the right thing:
Currently (May 2011) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
Intel-11.0, and Codegear have the necessary compiler __intrinsics to ensure that this
Currently (June 2015) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0,
Intel-11.0, plus Codegear and Clang have the necessary compiler __intrinsics to ensure that this
trait "just works". You may also test to see if the necessary __intrinsics are available
by checking to see if the macro `BOOST_HAS_VIRTUAL_DESTRUCTOR` is defined.

View File

@ -7,6 +7,64 @@
[section:history History]
[h4 Boost-1.70.0]
* Added new traits __is_bounded_array, __is_unbounded_array, __copy_reference, __copy_cv_ref.
[h4 Boost-1.68.0]
* Added support for detecting trivial moves on clang.
* Correct some mismatched `#pragam warning push/pop`.
* Improve __is_virtual_base_of to give more robust answers.
* Add support for __is_final with msvc.
[h4 Boost 1.67.0]
* Added new traits __detected, __detected_or, __is_detected, __is_detected_convertible, __is_detected_exact, __is_complete.
* Added greatly improved code for detecting binary operators.
* Add assertions for completeness to traits which require complete types as arguments: this prevents various traits from giving eroneous results from incomplete types.
* Fix minor issue with mpl compatibility, see [@https://svn.boost.org/trac/boost/ticket/12212 #12212].
* Add macro to indicate when is_constructible is fully implemented, see [@https://svn.boost.org/trac/boost/ticket/12003 #12003].
* Update __is_function and __is_member_function_pointer to work correctly with C++17 noexcept specifications.
* Add workaround for __is_default_constructible and `std::pair`.
* Added fallback for __is_nothrow_swappable on pre-C++11 compilers.
[h4 Boost 1.64.0]
* Added new trait __make_void.
[h4 Boost 1.60.0]
* Refactored traits to depend only on Boost.Config. Greatly simplified code to improve readability and remove workarounds for old compilers no longer supported.
* Fix __decay to follow C++11 semantics, see [@https://svn.boost.org/trac/boost/ticket/7760 #7760].
* Added a number of new traits __is_assignable, __is_default_constructible, __is_constructible and __is_destructible required to fix bugs in a number of other traits,
see for example [@https://svn.boost.org/trac/boost/ticket/11324 #11324].
[h4 Boost 1.58.0]
* Fixed issue with CUDA on Clang compiler see [@https://svn.boost.org/trac/boost/ticket/10694 #10694].
* Fixed __is_nothrow_move_assignable and __is_nothrow_move_constructible to work on VC12 and later.
[h4 Boost 1.57.0]
* Added new traits __is_copy_assignable and __is_final.
* Misc fixes for newer versions of clang and msvc-14.
[h4 Boost 1.56.0]
* Fixed issues [@https://svn.boost.org/trac/boost/ticket/7317 #7317],
[@https://svn.boost.org/trac/boost/ticket/9474 #9474].
[h4 Boost 1.55.0]
* Added new trait __is_copy_constructible.
[h4 Boost 1.54.0]
* Added new traits __is_nothrow_move_assignable, __is_nothrow_move_constructible, __has_trivial_move_assign,
__has_trivial_move_constructor.
[h4 Boost 1.47.0]
* [* Breaking change]: changed __is_convertible to C++0x behaviour when possible.

View File

@ -1,11 +1,11 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Background and Tutorial</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="prev" href="intro.html" title="Introduction">
<link rel="next" href="category.html" title="Type Traits by Category">
</head>
@ -22,7 +22,7 @@
<div class="spirit-nav">
<a accesskey="p" href="intro.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="category.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section boost_typetraits_background">
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_typetraits.background"></a><a class="link" href="background.html" title="Background and Tutorial">Background and Tutorial</a>
</h2></div></div></div>
@ -57,7 +57,7 @@
</p>
<h5>
<a name="boost_typetraits.background.h0"></a>
<span><a name="boost_typetraits.background.type_traits"></a></span><a class="link" href="background.html#boost_typetraits.background.type_traits">Type
<span class="phrase"><a name="boost_typetraits.background.type_traits"></a></span><a class="link" href="background.html#boost_typetraits.background.type_traits">Type
Traits</a>
</h5>
<p>
@ -86,7 +86,7 @@
</p>
<h5>
<a name="boost_typetraits.background.h1"></a>
<span><a name="boost_typetraits.background.implementation"></a></span><a class="link" href="background.html#boost_typetraits.background.implementation">Implementation</a>
<span class="phrase"><a name="boost_typetraits.background.implementation"></a></span><a class="link" href="background.html#boost_typetraits.background.implementation">Implementation</a>
</h5>
<p>
There are far too many separate classes contained in the type-traits library
@ -176,7 +176,7 @@
</p>
<h5>
<a name="boost_typetraits.background.h2"></a>
<span><a name="boost_typetraits.background.optimized_copy"></a></span><a class="link" href="background.html#boost_typetraits.background.optimized_copy">Optimized
<span class="phrase"><a name="boost_typetraits.background.optimized_copy"></a></span><a class="link" href="background.html#boost_typetraits.background.optimized_copy">Optimized
copy</a>
</h5>
<p>
@ -195,7 +195,7 @@
copy in terms of <code class="computeroutput"><span class="identifier">memcpy</span></code> all
of the following conditions need to be met:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
Both of the iterator types <code class="computeroutput"><span class="identifier">Iter1</span></code>
and <code class="computeroutput"><span class="identifier">Iter2</span></code> must be pointers.
@ -212,7 +212,7 @@
<p>
By trivial assignment operator we mean that the type is either a scalar type<a class="link" href="background.html#background.references">[3]</a> or:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
The type has no user defined assignment operator.
</li>
@ -250,7 +250,7 @@
</p>
<h5>
<a name="boost_typetraits.background.h3"></a>
<span><a name="boost_typetraits.background.was_it_worth_it_"></a></span><a class="link" href="background.html#boost_typetraits.background.was_it_worth_it_">Was
<span class="phrase"><a name="boost_typetraits.background.was_it_worth_it_"></a></span><a class="link" href="background.html#boost_typetraits.background.was_it_worth_it_">Was
it worth it?</a>
</h5>
<p>
@ -267,7 +267,7 @@
comparison between algorithms becomes difficult. However, perhaps we can add
a couple of caveats to the premature optimization rule:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
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.
@ -283,7 +283,7 @@
</li>
</ul></div>
<div class="table">
<a name="boost_typetraits.background.time_taken_to_copy_1000_elements_using__copy_const_t___t_____times_in_micro_seconds_"></a><p class="title"><b>Table&#160;1.1.&#160;Time taken to copy 1000 elements using `copy&lt;const T*, T*&gt;` (times
<a name="boost_typetraits.background.time_taken_to_copy_1000_elements_using__copy_const_t___t_____times_in_micro_seconds_"></a><p class="title"><b>Table 1.1. Time taken to copy 1000 elements using `copy&lt;const T*, T*&gt;` (times
in micro-seconds)</b></p>
<div class="table-contents"><table class="table" summary="Time taken to copy 1000 elements using `copy&lt;const T*, T*&gt;` (times
in micro-seconds)">
@ -383,7 +383,7 @@
</div>
<br class="table-break"><h5>
<a name="boost_typetraits.background.h4"></a>
<span><a name="boost_typetraits.background.pair_of_references"></a></span><a class="link" href="background.html#boost_typetraits.background.pair_of_references">Pair
<span class="phrase"><a name="boost_typetraits.background.pair_of_references"></a></span><a class="link" href="background.html#boost_typetraits.background.pair_of_references">Pair
of References</a>
</h5>
<p>
@ -420,7 +420,7 @@
to hold non-reference types, references, and constant references:
</p>
<div class="table">
<a name="boost_typetraits.background.required_constructor_argument_types"></a><p class="title"><b>Table&#160;1.2.&#160;Required Constructor Argument Types</b></p>
<a name="boost_typetraits.background.required_constructor_argument_types"></a><p class="title"><b>Table 1.2. Required Constructor Argument Types</b></p>
<div class="table-contents"><table class="table" summary="Required Constructor Argument Types">
<colgroup>
<col>
@ -485,7 +485,7 @@
adds a reference to its type, unless it is already a reference.
</p>
<div class="table">
<a name="boost_typetraits.background.using_add_reference_to_synthesize_the_correct_constructor_type"></a><p class="title"><b>Table&#160;1.3.&#160;Using add_reference to synthesize the correct constructor type</b></p>
<a name="boost_typetraits.background.using_add_reference_to_synthesize_the_correct_constructor_type"></a><p class="title"><b>Table 1.3. Using add_reference to synthesize the correct constructor type</b></p>
<div class="table-contents"><table class="table" summary="Using add_reference to synthesize the correct constructor type">
<colgroup>
<col>
@ -602,7 +602,7 @@
</p>
<h5>
<a name="boost_typetraits.background.h5"></a>
<span><a name="boost_typetraits.background.conclusion"></a></span><a class="link" href="background.html#boost_typetraits.background.conclusion">Conclusion</a>
<span class="phrase"><a name="boost_typetraits.background.conclusion"></a></span><a class="link" href="background.html#boost_typetraits.background.conclusion">Conclusion</a>
</h5>
<p>
We hope that in this article we have been able to give you some idea of what
@ -615,7 +615,7 @@
</p>
<h5>
<a name="boost_typetraits.background.h6"></a>
<span><a name="boost_typetraits.background.acknowledgements"></a></span><a class="link" href="background.html#boost_typetraits.background.acknowledgements">Acknowledgements</a>
<span class="phrase"><a name="boost_typetraits.background.acknowledgements"></a></span><a class="link" href="background.html#boost_typetraits.background.acknowledgements">Acknowledgements</a>
</h5>
<p>
The authors would like to thank Beman Dawes and Howard Hinnant for their helpful
@ -623,7 +623,7 @@
</p>
<h5>
<a name="boost_typetraits.background.h7"></a>
<span><a name="boost_typetraits.background._anchor_id__background_references___references"></a></span><a class="link" href="background.html#boost_typetraits.background._anchor_id__background_references___references"><a name="background.references"></a>References</a>
<span class="phrase"><a name="boost_typetraits.background._anchor_id__background_references___references"></a></span><a class="link" href="background.html#boost_typetraits.background._anchor_id__background_references___references">References</a>
</h5>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
@ -673,11 +673,11 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
Watanabe<p>
<td align="right"><div class="copyright-footer">Copyright © 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Glen Fernandes, Aleksey Gurtovoy,
Howard Hinnant, Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander
Nasonov, Thorsten Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert
Stewart and Steven Watanabe<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>

View File

@ -1,11 +1,11 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Type Traits by Category</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="prev" href="background.html" title="Background and Tutorial">
<link rel="next" href="category/value_traits.html" title="Type Traits that Describe the Properties of a Type">
</head>
@ -22,11 +22,11 @@
<div class="spirit-nav">
<a accesskey="p" href="background.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="category/value_traits.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section boost_typetraits_category">
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_typetraits.category"></a><a class="link" href="category.html" title="Type Traits by Category">Type Traits by Category</a>
</h2></div></div></div>
<div class="toc"><dl>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="category/value_traits.html">Type Traits that
Describe the Properties of a Type</a></span></dt>
<dd><dl>
@ -49,11 +49,11 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
Watanabe<p>
<td align="right"><div class="copyright-footer">Copyright © 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Glen Fernandes, Aleksey Gurtovoy,
Howard Hinnant, Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander
Nasonov, Thorsten Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert
Stewart and Steven Watanabe<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>

View File

@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Synthesizing Types with Specific Alignments</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="up" href="../category.html" title="Type Traits by Category">
<link rel="prev" href="transform.html" title="Type Traits that Transform One Type to Another">
<link rel="next" href="function.html" title="Decomposing Function Types">
@ -22,7 +22,7 @@
<div class="spirit-nav">
<a accesskey="p" href="transform.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../category.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="function.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section boost_typetraits_category_alignment">
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_typetraits.category.alignment"></a><a class="link" href="alignment.html" title="Synthesizing Types with Specific Alignments">Synthesizing Types
with Specific Alignments</a>
@ -45,11 +45,11 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
Watanabe<p>
<td align="right"><div class="copyright-footer">Copyright © 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Glen Fernandes, Aleksey Gurtovoy,
Howard Hinnant, Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander
Nasonov, Thorsten Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert
Stewart and Steven Watanabe<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>

View File

@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Decomposing Function Types</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="up" href="../category.html" title="Type Traits by Category">
<link rel="prev" href="alignment.html" title="Synthesizing Types with Specific Alignments">
<link rel="next" href="../user_defined.html" title="User Defined Specializations">
@ -22,7 +22,7 @@
<div class="spirit-nav">
<a accesskey="p" href="alignment.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../category.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../user_defined.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section boost_typetraits_category_function">
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_typetraits.category.function"></a><a class="link" href="function.html" title="Decomposing Function Types">Decomposing Function
Types</a>
@ -42,11 +42,11 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
Watanabe<p>
<td align="right"><div class="copyright-footer">Copyright © 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Glen Fernandes, Aleksey Gurtovoy,
Howard Hinnant, Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander
Nasonov, Thorsten Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert
Stewart and Steven Watanabe<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>

View File

@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Type Traits that Transform One Type to Another</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="up" href="../category.html" title="Type Traits by Category">
<link rel="prev" href="value_traits/operators.html" title="Operator Type Traits">
<link rel="next" href="alignment.html" title="Synthesizing Types with Specific Alignments">
@ -22,7 +22,7 @@
<div class="spirit-nav">
<a accesskey="p" href="value_traits/operators.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../category.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="alignment.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section boost_typetraits_category_transform">
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_typetraits.category.transform"></a><a class="link" href="transform.html" title="Type Traits that Transform One Type to Another">Type Traits that
Transform One Type to Another</a>
@ -63,6 +63,9 @@
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span><span class="special">...</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../reference/common_type.html" title="common_type">common_type</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../reference/copy_cv.html" title="copy_cv">copy_cv</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../reference/decay.html" title="decay">decay</a><span class="special">;</span>
@ -101,71 +104,18 @@
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../reference/remove_volatile.html" title="remove_volatile">remove_volatile</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../reference/type_identity.html" title="type_identity">type_identity</a><span class="special">;</span>
</pre>
<h5>
<a name="boost_typetraits.category.transform.h0"></a>
<span><a name="boost_typetraits.category.transform.broken_compiler_workarounds_"></a></span><a class="link" href="transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">Broken
Compiler Workarounds:</a>
</h5>
<p>
For all of these templates support for partial specialization of class templates
is required to correctly implement the transformation. On the other hand,
practice shows that many of the templates from this category are very useful,
and often essential for implementing some generic libraries. Lack of these
templates is often one of the major limiting factors in porting those libraries
to compilers that do not yet support this language feature. As some of these
compilers are going to be around for a while, and at least one of them is
very wide-spread, it was decided that the library should provide workarounds
where possible.
</p>
<p>
The basic idea behind the workaround is to manually define full specializations
of all type transformation templates for all fundamental types, and all their
1st and 2nd rank cv-[un]qualified derivative pointer types, and to provide
a user-level macro that will define all the explicit specializations needed
for any user-defined type T.
</p>
<p>
The first part guarantees the successful compilation of something like this:
</p>
<pre class="programlisting"><span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">((</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">,</span> <span class="identifier">remove_reference</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&amp;&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">));</span>
<span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">((</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">remove_reference</span><span class="special">&lt;</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">&amp;&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">));</span>
<span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">((</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="keyword">char</span> <span class="keyword">volatile</span><span class="special">,</span> <span class="identifier">remove_reference</span><span class="special">&lt;</span><span class="keyword">char</span> <span class="keyword">volatile</span><span class="special">&amp;&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">));</span>
<span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">((</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="keyword">char</span> <span class="keyword">const</span> <span class="keyword">volatile</span><span class="special">,</span> <span class="identifier">remove_reference</span><span class="special">&lt;</span><span class="keyword">char</span> <span class="keyword">const</span> <span class="keyword">volatile</span><span class="special">&amp;&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">));</span>
<span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">((</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">*,</span> <span class="identifier">remove_reference</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">*&amp;&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">));</span>
<span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">((</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*,</span> <span class="identifier">remove_reference</span><span class="special">&lt;</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*&amp;&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">));</span>
<span class="special">...</span>
<span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">((</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="keyword">char</span> <span class="keyword">const</span> <span class="keyword">volatile</span><span class="special">*</span> <span class="keyword">const</span> <span class="keyword">volatile</span><span class="special">*</span> <span class="keyword">const</span> <span class="keyword">volatile</span><span class="special">,</span> <span class="identifier">remove_reference</span><span class="special">&lt;</span><span class="keyword">char</span> <span class="keyword">const</span> <span class="keyword">volatile</span><span class="special">*</span> <span class="keyword">const</span> <span class="keyword">volatile</span><span class="special">*</span> <span class="keyword">const</span> <span class="keyword">volatile</span><span class="special">&amp;&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">));</span>
</pre>
<p>
and the second part provides the library's users with a mechanism to make
the above code work not only for <code class="computeroutput"><span class="keyword">char</span></code>,
<code class="computeroutput"><span class="keyword">int</span></code> or other built-in type,
but for their own types as well:
</p>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">myspace</span><span class="special">{</span>
<span class="keyword">struct</span> <span class="identifier">MyClass</span> <span class="special">{};</span>
<span class="special">}</span>
<span class="comment">// declare this at global scope:</span>
<span class="identifier">BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION</span><span class="special">(</span><span class="identifier">myspace</span><span class="special">::</span><span class="identifier">MyClass</span><span class="special">)</span>
<span class="comment">// transformations on myspace::MyClass now work:</span>
<span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">((</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="identifier">myspace</span><span class="special">::</span><span class="identifier">MyClass</span><span class="special">,</span> <span class="identifier">remove_reference</span><span class="special">&lt;</span><span class="identifier">myspace</span><span class="special">::</span><span class="identifier">MyClass</span><span class="special">&amp;&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">));</span>
<span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">((</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="identifier">myspace</span><span class="special">::</span><span class="identifier">MyClass</span><span class="special">,</span> <span class="identifier">remove_const</span><span class="special">&lt;</span><span class="identifier">myspace</span><span class="special">::</span><span class="identifier">MyClass</span> <span class="keyword">const</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">));</span>
<span class="comment">// etc.</span>
</pre>
<p>
Note that the macro BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION evaluates
to nothing on those compilers that <span class="bold"><strong>do</strong></span> support
partial specialization.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
Watanabe<p>
<td align="right"><div class="copyright-footer">Copyright © 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Glen Fernandes, Aleksey Gurtovoy,
Howard Hinnant, Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander
Nasonov, Thorsten Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert
Stewart and Steven Watanabe<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>

View File

@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Type Traits that Describe the Properties of a Type</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="up" href="../category.html" title="Type Traits by Category">
<link rel="prev" href="../category.html" title="Type Traits by Category">
<link rel="next" href="value_traits/primary.html" title="Categorizing a Type">
@ -22,12 +22,12 @@
<div class="spirit-nav">
<a accesskey="p" href="../category.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../category.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="value_traits/primary.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section boost_typetraits_category_value_traits">
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_typetraits.category.value_traits"></a><a class="link" href="value_traits.html" title="Type Traits that Describe the Properties of a Type">Type Traits that
Describe the Properties of a Type</a>
</h3></div></div></div>
<div class="toc"><dl>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="value_traits/primary.html">Categorizing
a Type</a></span></dt>
<dt><span class="section"><a href="value_traits/properties.html">General
@ -50,11 +50,11 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
Watanabe<p>
<td align="right"><div class="copyright-footer">Copyright © 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Glen Fernandes, Aleksey Gurtovoy,
Howard Hinnant, Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander
Nasonov, Thorsten Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert
Stewart and Steven Watanabe<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>

View File

@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Operator Type Traits</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="up" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type">
<link rel="prev" href="relate.html" title="Relationships Between Two Types">
<link rel="next" href="../transform.html" title="Type Traits that Transform One Type to Another">
@ -22,14 +22,14 @@
<div class="spirit-nav">
<a accesskey="p" href="relate.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../value_traits.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../transform.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section boost_typetraits_category_value_traits_operators">
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_typetraits.category.value_traits.operators"></a><a class="link" href="operators.html" title="Operator Type Traits">Operator
Type Traits</a>
</h4></div></div></div>
<h6>
<a name="boost_typetraits.category.value_traits.operators.h0"></a>
<span><a name="boost_typetraits.category.value_traits.operators.introduction"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.introduction">Introduction</a>
<span class="phrase"><a name="boost_typetraits.category.value_traits.operators.introduction"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.introduction">Introduction</a>
</h6>
<p>
These traits are all <span class="emphasis"><em>value traits</em></span> inheriting from
@ -65,7 +65,7 @@
</p>
<h6>
<a name="boost_typetraits.category.value_traits.operators.h1"></a>
<span><a name="boost_typetraits.category.value_traits.operators.example_of_application"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.example_of_application">Example
<span class="phrase"><a name="boost_typetraits.category.value_traits.operators.example_of_application"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.example_of_application">Example
of application</a>
</h6>
<p>
@ -150,7 +150,7 @@
</p>
<h6>
<a name="boost_typetraits.category.value_traits.operators.h2"></a>
<span><a name="boost_typetraits.category.value_traits.operators.description"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.description">Description</a>
<span class="phrase"><a name="boost_typetraits.category.value_traits.operators.description"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.description">Description</a>
</h6>
<p>
The syntax is the following:
@ -162,7 +162,7 @@
<p>
where:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
op represents the operator name
</li>
@ -204,7 +204,7 @@
operators.
</p>
<div class="table">
<a name="boost_typetraits.category.value_traits.operators.supported_prefix_operators"></a><p class="title"><b>Table&#160;1.4.&#160;Supported prefix operators</b></p>
<a name="boost_typetraits.category.value_traits.operators.supported_prefix_operators"></a><p class="title"><b>Table 1.4. Supported prefix operators</b></p>
<div class="table-contents"><table class="table" summary="Supported prefix operators">
<colgroup>
<col>
@ -315,7 +315,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_typetraits.category.value_traits.operators.supported_postfix_operators"></a><p class="title"><b>Table&#160;1.5.&#160;Supported postfix operators</b></p>
<a name="boost_typetraits.category.value_traits.operators.supported_postfix_operators"></a><p class="title"><b>Table 1.5. Supported postfix operators</b></p>
<div class="table-contents"><table class="table" summary="Supported postfix operators">
<colgroup>
<col>
@ -366,7 +366,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_typetraits.category.value_traits.operators.supported_binary_operators"></a><p class="title"><b>Table&#160;1.6.&#160;Supported binary operators</b></p>
<a name="boost_typetraits.category.value_traits.operators.supported_binary_operators"></a><p class="title"><b>Table 1.6. Supported binary operators</b></p>
<div class="table-contents"><table class="table" summary="Supported binary operators">
<colgroup>
<col>
@ -734,7 +734,7 @@
</p>
<h6>
<a name="boost_typetraits.category.value_traits.operators.h3"></a>
<span><a name="boost_typetraits.category.value_traits.operators.cv_qualifiers_and_references"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.cv_qualifiers_and_references">cv
<span class="phrase"><a name="boost_typetraits.category.value_traits.operators.cv_qualifiers_and_references"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.cv_qualifiers_and_references">cv
qualifiers and references</a>
</h6>
<p>
@ -769,7 +769,7 @@
to be <code class="computeroutput"><span class="keyword">true</span></code>.
</p>
<div class="table">
<a name="boost_typetraits.category.value_traits.operators.necessary_and_non_sufficient_condition_on_operator_argument_for_value_to_be_true"></a><p class="title"><b>Table&#160;1.7.&#160;necessary and non sufficient condition on operator argument for
<a name="boost_typetraits.category.value_traits.operators.necessary_and_non_sufficient_condition_on_operator_argument_for_value_to_be_true"></a><p class="title"><b>Table 1.7. necessary and non sufficient condition on operator argument for
value to be true</b></p>
<div class="table-contents"><table class="table" summary="necessary and non sufficient condition on operator argument for
value to be true">
@ -905,7 +905,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_typetraits.category.value_traits.operators.necessary_and_non_sufficient_condition_on_operator_return_type_for_value_to_be_true"></a><p class="title"><b>Table&#160;1.8.&#160;necessary and non sufficient condition on operator return type for
<a name="boost_typetraits.category.value_traits.operators.necessary_and_non_sufficient_condition_on_operator_return_type_for_value_to_be_true"></a><p class="title"><b>Table 1.8. necessary and non sufficient condition on operator return type for
value to be true</b></p>
<div class="table-contents"><table class="table" summary="necessary and non sufficient condition on operator return type for
value to be true">
@ -1129,7 +1129,7 @@
</div>
<br class="table-break"><h6>
<a name="boost_typetraits.category.value_traits.operators.h4"></a>
<span><a name="boost_typetraits.category.value_traits.operators.implementation"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.implementation">Implementation</a>
<span class="phrase"><a name="boost_typetraits.category.value_traits.operators.implementation"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.implementation">Implementation</a>
</h6>
<p>
The implementation consists in only header files. The following headers
@ -1226,7 +1226,7 @@
<span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Rhs</span> <span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">operator_returns_Ret</span> <span class="special">&lt;</span> <span class="identifier">Rhs</span><span class="special">,</span> <span class="keyword">void</span><span class="special">,</span> <span class="keyword">true</span> <span class="special">&gt;</span> <span class="special">{</span>
<span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="keyword">bool</span> <span class="identifier">value</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">value</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">;</span>
<span class="special">};</span>
<span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Rhs</span> <span class="special">&gt;</span>
@ -1321,17 +1321,17 @@
</p>
<h6>
<a name="boost_typetraits.category.value_traits.operators.h5"></a>
<span><a name="boost_typetraits.category.value_traits.operators.limitation"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.limitation">Limitation</a>
<span class="phrase"><a name="boost_typetraits.category.value_traits.operators.limitation"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.limitation">Limitation</a>
</h6>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
Requires a compiler with working SFINAE.
</li></ul></div>
<h6>
<a name="boost_typetraits.category.value_traits.operators.h6"></a>
<span><a name="boost_typetraits.category.value_traits.operators.known_issues"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.known_issues">Known
<span class="phrase"><a name="boost_typetraits.category.value_traits.operators.known_issues"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.known_issues">Known
issues</a>
</h6>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
These traits cannot detect whether the operators are public or not:
if an operator is defined as a private member of type <code class="computeroutput"><span class="identifier">T</span></code> then the instantiation of the corresponding
@ -1411,7 +1411,7 @@
</ul></div>
<h6>
<a name="boost_typetraits.category.value_traits.operators.h7"></a>
<span><a name="boost_typetraits.category.value_traits.operators.acknowledgments"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.acknowledgments">Acknowledgments</a>
<span class="phrase"><a name="boost_typetraits.category.value_traits.operators.acknowledgments"></a></span><a class="link" href="operators.html#boost_typetraits.category.value_traits.operators.acknowledgments">Acknowledgments</a>
</h6>
<p>
Frederic Bron is very thankful to numerous people from the boost mailing
@ -1423,11 +1423,11 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
Watanabe<p>
<td align="right"><div class="copyright-footer">Copyright © 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Glen Fernandes, Aleksey Gurtovoy,
Howard Hinnant, Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander
Nasonov, Thorsten Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert
Stewart and Steven Watanabe<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>

View File

@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Categorizing a Type</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="up" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type">
<link rel="prev" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type">
<link rel="next" href="properties.html" title="General Type Properties">
@ -22,7 +22,7 @@
<div class="spirit-nav">
<a accesskey="p" href="../value_traits.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../value_traits.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="properties.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section boost_typetraits_category_value_traits_primary">
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_typetraits.category.value_traits.primary"></a><a class="link" href="primary.html" title="Categorizing a Type">Categorizing
a Type</a>
@ -119,11 +119,11 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
Watanabe<p>
<td align="right"><div class="copyright-footer">Copyright © 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Glen Fernandes, Aleksey Gurtovoy,
Howard Hinnant, Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander
Nasonov, Thorsten Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert
Stewart and Steven Watanabe<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>

View File

@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>General Type Properties</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="up" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type">
<link rel="prev" href="primary.html" title="Categorizing a Type">
<link rel="next" href="relate.html" title="Relationships Between Two Types">
@ -22,7 +22,7 @@
<div class="spirit-nav">
<a accesskey="p" href="primary.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../value_traits.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="relate.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section boost_typetraits_category_value_traits_properties">
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_typetraits.category.value_traits.properties"></a><a class="link" href="properties.html" title="General Type Properties">General
Type Properties</a>
@ -54,6 +54,9 @@
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/has_nothrow_copy.html" title="has_nothrow_copy">has_nothrow_copy_constructor</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/has_nothrow_destruct.html" title="has_nothrow_destructor">has_nothrow_destructor</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/has_trivial_assign.html" title="has_trivial_assign">has_trivial_assign</a><span class="special">;</span>
@ -78,12 +81,36 @@
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/is_abstract.html" title="is_abstract">is_abstract</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/is_assignable.html" title="is_assignable">is_assignable</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/is_copy_constructible.html" title="is_copy_constructible">is_copy_constructible</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/is_copy_assignable.html" title="is_copy_assignable">is_copy_assignable</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span><span class="special">...</span> <span class="identifier">Args</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/is_constructible.html" title="is_constructible">is_constructible</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/is_default_constructible.html" title="is_default_constructible">is_default_constructible</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span><span class="special">...</span> <span class="identifier">Args</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/is_list_constructible.html" title="is_list_constructible">is_list_constructible</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/is_destructible.html" title="is_destructible">is_destructible</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/is_const.html" title="is_const">is_const</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/is_empty.html" title="is_empty">is_empty</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/is_final.html" title="is_final">is_final</a><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="../../reference/is_stateless.html" title="is_stateless">is_stateless</a><span class="special">;</span>
@ -111,11 +138,11 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
Watanabe<p>
<td align="right"><div class="copyright-footer">Copyright © 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Glen Fernandes, Aleksey Gurtovoy,
Howard Hinnant, Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander
Nasonov, Thorsten Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert
Stewart and Steven Watanabe<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>

View File

@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Relationships Between Two Types</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="up" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type">
<link rel="prev" href="properties.html" title="General Type Properties">
<link rel="next" href="operators.html" title="Operator Type Traits">
@ -22,7 +22,7 @@
<div class="spirit-nav">
<a accesskey="p" href="properties.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../value_traits.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="operators.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section boost_typetraits_category_value_traits_relate">
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_typetraits.category.value_traits.relate"></a><a class="link" href="relate.html" title="Relationships Between Two Types">Relationships
Between Two Types</a>
@ -49,11 +49,11 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
Watanabe<p>
<td align="right"><div class="copyright-footer">Copyright © 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Glen Fernandes, Aleksey Gurtovoy,
Howard Hinnant, Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander
Nasonov, Thorsten Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert
Stewart and Steven Watanabe<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>

View File

@ -1,11 +1,11 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Credits</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="prev" href="history.html" title="History">
<link rel="next" href="../index/s11.html" title="Class Index">
</head>
@ -22,7 +22,7 @@
<div class="spirit-nav">
<a accesskey="p" href="history.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../index/s11.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section boost_typetraits_credits">
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_typetraits.credits"></a><a class="link" href="credits.html" title="Credits">Credits</a>
</h2></div></div></div>
@ -39,7 +39,7 @@
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 and Jeremy Siek.
Ramey, Jeremy Siek, Antony Polukhin and Glen Fernandes.
</p>
<p>
Mat Marcus and Jesse Jones invented, and <a href="http://opensource.adobe.com/project4/project.shtml" target="_top">published
@ -62,11 +62,11 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
Watanabe<p>
<td align="right"><div class="copyright-footer">Copyright © 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Glen Fernandes, Aleksey Gurtovoy,
Howard Hinnant, Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander
Nasonov, Thorsten Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert
Stewart and Steven Watanabe<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>

View File

@ -1,11 +1,11 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Examples</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="up" href="../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="prev" href="mpl.html" title="MPL Interoperability">
<link rel="next" href="examples/copy.html" title="An Optimized Version of std::copy">
</head>
@ -22,11 +22,11 @@
<div class="spirit-nav">
<a accesskey="p" href="mpl.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="examples/copy.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section boost_typetraits_examples">
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_typetraits.examples"></a><a class="link" href="examples.html" title="Examples">Examples</a>
</h2></div></div></div>
<div class="toc"><dl>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="examples/copy.html">An Optimized Version
of std::copy</a></span></dt>
<dt><span class="section"><a href="examples/fill.html">An Optimised Version
@ -43,11 +43,11 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
Watanabe<p>
<td align="right"><div class="copyright-footer">Copyright © 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Glen Fernandes, Aleksey Gurtovoy,
Howard Hinnant, Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander
Nasonov, Thorsten Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert
Stewart and Steven Watanabe<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>

View File

@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>An Optimized Version of std::copy</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.TypeTraits">
<link rel="up" href="../examples.html" title="Examples">
<link rel="prev" href="../examples.html" title="Examples">
<link rel="next" href="fill.html" title="An Optimised Version of std::fill">
@ -22,7 +22,7 @@
<div class="spirit-nav">
<a accesskey="p" href="../examples.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../examples.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fill.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section boost_typetraits_examples_copy">
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_typetraits.examples.copy"></a><a class="link" href="copy.html" title="An Optimized Version of std::copy">An Optimized Version
of std::copy</a>
@ -78,11 +78,11 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
Watanabe<p>
<td align="right"><div class="copyright-footer">Copyright © 2000, 2011 Adobe Systems Inc, David Abrahams,
Frederic Bron, Steve Cleary, Beman Dawes, Glen Fernandes, Aleksey Gurtovoy,
Howard Hinnant, Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander
Nasonov, Thorsten Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert
Stewart and Steven Watanabe<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>

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