Compare commits

..

356 Commits

Author SHA1 Message Date
nobody
bf2154d563 This commit was manufactured by cvs2svn to create branch
'array_wrapper'.

[SVN r31998]
2005-12-12 15:22:03 +00:00
Douglas Gregor
f66e844ff1 Merged from Version_1_33_1
[SVN r31949]
2005-12-08 03:23:02 +00:00
Jeremiah Willcock
62e8cc2b36 Attempted portability fix for Sun compilers
[SVN r31904]
2005-12-04 18:47:02 +00:00
Peter Dimov
30236f8915 Made the Boost logo link to the home page
[SVN r31112]
2005-09-25 21:54:19 +00:00
Douglas Gregor
155e787ea3 Fix reporting of enable_if tests
[SVN r31060]
2005-09-20 18:35:26 +00:00
John Maddock
1d60d49136 Large patch from Ulrich Eckhardt to fix support for EVC++ 4.
[SVN r30670]
2005-08-25 16:27:28 +00:00
Hartmut Kaiser
2dffdac9fe Disabiguated the detail namespace.
[SVN r30558]
2005-08-12 19:06:10 +00:00
Douglas Gregor
ddf00eb29d Merged from 1.33.0 release
[SVN r30540]
2005-08-12 13:02:37 +00:00
Dave Abrahams
0a6acd8ce8 Fix broken links
[SVN r30403]
2005-08-03 13:01:57 +00:00
Dave Abrahams
745322e797 Fix broken links
[SVN r30401]
2005-08-03 12:25:30 +00:00
Dave Abrahams
9f10fc03ce More Parameter library reference edits
[SVN r30276]
2005-07-28 04:19:28 +00:00
Dave Abrahams
84fbb3c896 Fix mis-nested namespace scope/#ifdef
[SVN r30159]
2005-07-18 18:50:47 +00:00
Douglas Gregor
865c707756 BOOST_NO_RESULT_OF support
[SVN r30040]
2005-07-13 12:35:37 +00:00
Markus Schöpflin
871f3a6779 Don't use the self contained include files for boost.test as this test is linked
with the boost.test library. We end up with multiple defined symbols, otherwise.


[SVN r29559]
2005-06-14 13:46:20 +00:00
John Maddock
aaca5ca871 Updated Borland workaround.
[SVN r29462]
2005-06-07 09:44:19 +00:00
Dave Abrahams
5a4e19989f Workaround for nonconformance to CWG issue 298, checked in on behalf of John Maddock
[SVN r29415]
2005-06-03 19:11:54 +00:00
John Maddock
6ea398c446 Make it clear that POD's are not zero initialised.
[SVN r29254]
2005-05-28 11:51:04 +00:00
Douglas Gregor
1bd83d43e8 Improvements in type_traits have gotten MSVC 7.0 and prior down to 12 failures here
[SVN r29170]
2005-05-24 14:53:49 +00:00
Fernando Cacciola
5ca5b4102b Optional's Assignment fixed
[SVN r28412]
2005-04-22 13:28:34 +00:00
Vladimir Prus
aca7699046 Add V2 Jamfile
[SVN r28246]
2005-04-14 13:15:46 +00:00
John Maddock
e702a944ca Fixes to get the tests working with the latest type traits and Boost.Test versions.
[SVN r27864]
2005-03-29 11:21:53 +00:00
John Maddock
a157c345ee Updated is_convertible test cases to check polymorphic-type conversions.
Added more test types to testing header.
Changed utility code to use new test header.


[SVN r27807]
2005-03-24 18:20:18 +00:00
Peter Dimov
dcb2dd4736 Removed type_traits include, added more tests
[SVN r27712]
2005-03-16 22:02:22 +00:00
Eric Niebler
ae19cd6236 work-around for Borland addressof(array) bug and associated tests
[SVN r27656]
2005-03-14 23:03:42 +00:00
Rene Rivera
3ab4d38931 Apply typo fixes from Julio M. Merino Vidal
[SVN r27513]
2005-02-27 17:28:24 +00:00
Fernando Cacciola
18c7fb72b5 ADL problem (with VC7.1) fixed
[SVN r27495]
2005-02-24 16:04:49 +00:00
Beman Dawes
6bb092a9b1 Add comment explaining use of assert.h
[SVN r27473]
2005-02-21 12:32:20 +00:00
Stefan Slapeta
f721b8b28c replaced BOOST_TEST
[SVN r27054]
2005-02-03 13:48:49 +00:00
Aleksey Gurtovoy
e5ba34472d merge RC_1_32_0 fixes
[SVN r26333]
2004-11-28 04:44:21 +00:00
Aleksey Gurtovoy
082ae17eaf merge RC_1_32_0 fixes
[SVN r26328]
2004-11-28 03:35:12 +00:00
Aleksey Gurtovoy
dd86e09ab4 merge RC_1_32_0 tab fixes
[SVN r26327]
2004-11-28 03:27:25 +00:00
Daniel Frey
baff23116e Fixed link to function_output_iterator
[SVN r25949]
2004-10-29 19:19:20 +00:00
Aleksey Gurtovoy
e549baf93a move enable_if tests into their own subdirectory
[SVN r25649]
2004-10-10 16:15:58 +00:00
Fernando Cacciola
30d46adcb7 bad links fixed
added myself to people


[SVN r25610]
2004-10-07 16:01:24 +00:00
Aleksey Gurtovoy
e854726be0 c++boost.gif -> boost.png replacement
[SVN r25573]
2004-10-05 15:45:52 +00:00
Joaquín M. López Muñoz
d198bd9d96 added explicit return to main
[SVN r25387]
2004-09-24 06:17:26 +00:00
Fernando Cacciola
5eb23cecd0 In-place factories moved from /detail to /utility
New value_initalized tests added


[SVN r25377]
2004-09-23 17:03:54 +00:00
Joaquín M. López Muñoz
eff2c75bba taken care of BOOST_NO_STDC_NAMESPACE
[SVN r25345]
2004-09-22 17:18:06 +00:00
Fernando Cacciola
325bd73df7 In-place factories moved from /detail to /utility
New value_initalized tests added


[SVN r25313]
2004-09-21 14:54:32 +00:00
Fernando Cacciola
0fcc554abd Initial commit
[SVN r25178]
2004-09-17 16:53:57 +00:00
John Maddock
b685784155 Added new types boost::long_long_type and boost::ulong_long_type in boost/config.hpp and applied these types in place of "long long" throughout. As a result, almost all of boost now compiles cleanly with -ansi -pedantic with gcc. Changes tested with gcc 3.3, 2.95, VC7.1 and Intel 8.
[SVN r24899]
2004-09-04 10:34:49 +00:00
Aleksey Gurtovoy
ac90fdc611 merge new MPL version from 'mplbook' branch
[SVN r24874]
2004-09-02 15:41:37 +00:00
Fernando Cacciola
51077e49f5 Fixed CW problems and refactored fail cases
[SVN r24870]
2004-09-02 13:19:50 +00:00
Fernando Cacciola
0c3199f72d Added my long name
[SVN r24869]
2004-09-02 12:59:42 +00:00
Dave Abrahams
62675a3bcd added copyright/license
[SVN r24814]
2004-08-30 01:31:40 +00:00
Daryle Walker
c26dbaa620 Updated copyright year list, since the interface changed
[SVN r24801]
2004-08-28 20:51:19 +00:00
Daryle Walker
8201624959 Moved a template argument default for base_from_member to primary header; removed forwarding header as it's not needed anymore
[SVN r24800]
2004-08-28 20:46:17 +00:00
Daryle Walker
f2116413d6 Changed constructor templates to be generated with the Preprocessor library; added a control macro for the maximum constructor argument length
[SVN r24799]
2004-08-28 20:24:17 +00:00
Dave Abrahams
b0baebeb0a fix noncopyable, finally
[SVN r24618]
2004-08-20 17:17:06 +00:00
Douglas Gregor
fb943b77d5 License updates
[SVN r24597]
2004-08-19 15:19:17 +00:00
Dave Abrahams
b4b39510fc ADL protection
[SVN r24595]
2004-08-19 13:12:35 +00:00
Aleksey Gurtovoy
6f0f05ba12 remove forward declaration for noncopyable
[SVN r24578]
2004-08-19 02:31:29 +00:00
Dave Abrahams
f0b64b6229 ADL protection
[SVN r24564]
2004-08-18 17:01:11 +00:00
Dave Abrahams
4229488989 Added redirection to fix old links.
[SVN r24558]
2004-08-18 13:55:35 +00:00
John Maddock
acd2e6ef2b Added Daryle Walker's copyrights as requested.
[SVN r24481]
2004-08-15 10:13:49 +00:00
Douglas Gregor
c26aaed71f Moved to BSL
[SVN r24446]
2004-08-12 17:13:07 +00:00
John Maddock
326d7ad4d7 Removed boost.org copyright assignments, and reverted to orginal author (as based on cvs history).
[SVN r24402]
2004-08-11 10:59:33 +00:00
Douglas Gregor
c76a2f4aab Add my license info
[SVN r24373]
2004-08-10 13:57:30 +00:00
John Maddock
d8b0ff2d7e Removed Boost.org copyrights and replaced with originating authors copyright instead.
[SVN r24372]
2004-08-10 12:53:34 +00:00
John Maddock
996ce2d307 Updated Beman Dawes' licence statement to use the new prefered form of words.
[SVN r24370]
2004-08-10 10:34:20 +00:00
Douglas Gregor
167fa4154f Eliminated unreviewed, unused, noncompiling code
[SVN r24314]
2004-08-05 18:57:39 +00:00
Stefan Slapeta
0c7e7c3c39 half_open_range_test removed
[SVN r24313]
2004-08-05 18:46:55 +00:00
Stefan Slapeta
9d8f8f41dc Include for test library fixed
[SVN r24299]
2004-08-05 09:23:05 +00:00
Aleksey Gurtovoy
39c4445b39 add missing tests, reorder tests by filename
[SVN r24216]
2004-08-01 05:40:21 +00:00
Douglas Gregor
7819b022ad License update
[SVN r24180]
2004-07-30 04:46:56 +00:00
Douglas Gregor
65d27e7f86 License update
[SVN r24175]
2004-07-30 01:47:08 +00:00
Douglas Gregor
212a70bf77 Remove "and" from copyright
[SVN r24167]
2004-07-29 15:50:36 +00:00
Douglas Gregor
6b5dc18a46 Converted to Boost Software License, Version 1.0
[SVN r24096]
2004-07-27 03:43:34 +00:00
Douglas Gregor
0917f83b9c Converted to Boost Software License, Version 1.0
[SVN r24055]
2004-07-26 00:32:12 +00:00
Douglas Gregor
7322bd3903 License update
[SVN r24048]
2004-07-25 19:13:06 +00:00
Douglas Gregor
e998010184 Add license
[SVN r24021]
2004-07-25 03:57:20 +00:00
Douglas Gregor
918a1c93e4 Doug Gregor -> Douglas Gregor
[SVN r24016]
2004-07-25 02:29:29 +00:00
Douglas Gregor
14c87853c2 Needed to include cstddef to get std::size_t
[SVN r24000]
2004-07-23 18:42:30 +00:00
Vladimir Prus
d5a5b84a40 Switch the test to use std::stringstream, not std::ostrstream, since
the latter is deprecated and gcc warns whenever one tries to use it.


[SVN r23896]
2004-07-21 12:28:18 +00:00
Vladimir Prus
35d3c03d19 Update
[SVN r23085]
2004-06-11 11:18:50 +00:00
Vladimir Prus
8933fbb254 The binary_search_test does not require Boost.Test all all, and does not
provide 'test_main' or 'unit_test_main', so don't link to Boost.Test.


[SVN r23073]
2004-06-10 11:49:39 +00:00
Jaakko Järvi
c320330cd5 fixed a typo
[SVN r22754]
2004-05-06 22:38:34 +00:00
Douglas Gregor
822b46a3df Complain when compiler can't support result_of
[SVN r22749]
2004-05-06 17:29:54 +00:00
Jaakko Järvi
a821ef6e2c Added enable_if.hpp as an include
[SVN r22735]
2004-05-04 16:07:00 +00:00
Douglas Gregor
491db15997 boost/utility/result_of.hpp, boost/utility/detail/result_of_iterate.hpp:
- result_of implementation

libs/utility/test/result_of_test.cpp:
  - result_of tests

libs/utility/test/Jamfile, libs/utility/test/Jamfile.v2:
  - run result_of tests

libs/utility/utility.htm:
  - document result_of

libs/libraries.htm:
  - list result_of

index.htm:
  - announce result_of


[SVN r22720]
2004-05-02 19:55:02 +00:00
Ronald Garcia
b6c826a139 shared_container_iterator library:
- updated Copyright and License notices
 - Added shared_iterator_test to the iterator test suite.


[SVN r22140]
2004-02-02 22:16:36 +00:00
Dave Abrahams
7b472a05ee Obsoleted old iterator adaptor docs
[SVN r22101]
2004-02-01 04:30:15 +00:00
John Maddock
9a07bc0d9b Added missing include <cstddef>
[SVN r21993]
2004-01-27 11:24:25 +00:00
John Maddock
154d6bb198 When we have a compressed pair of two types that are the same, and both empty, then we must still have two distict objects in the pair.
[SVN r21958]
2004-01-26 11:29:07 +00:00
Aleksey Gurtovoy
0dde936e61 DM fixes
[SVN r21933]
2004-01-26 00:19:59 +00:00
Fernando Cacciola
918bf25039 Fixed documentation for less_pointees
[SVN r21737]
2004-01-14 20:22:00 +00:00
Vladimir Prus
04fda4fb4e Use proper syntax to refer to Boost.Test.
[SVN r21566]
2004-01-09 13:03:16 +00:00
Dave Abrahams
e14a250d6e pro9 workarounds; some ADL protection for is_xxx
[SVN r21529]
2004-01-07 14:07:21 +00:00
Rene Rivera
806745f24e Fix tabs in file.
[SVN r21399]
2003-12-26 23:26:49 +00:00
Beman Dawes
4231f774e4 fix next_prior_test.cpp directory
[SVN r21384]
2003-12-23 19:14:37 +00:00
Dave Abrahams
dfc320124f Extended next/prior using patch from Daniel Walker (Daniel.Walker-at-bowneglobal.com)
[SVN r21382]
2003-12-23 14:59:59 +00:00
Eric Friedman
be43ba1569 Improved workarounds.
[SVN r21157]
2003-12-06 03:57:54 +00:00
Fernando Cacciola
f3f879555a Fixed result_type
[SVN r21155]
2003-12-05 22:03:33 +00:00
Jaakko Järvi
3155044abd added dummy versions of enable_if templates for platforms that
have BOOST_NO_SFINAE defined


[SVN r21154]
2003-12-05 21:38:43 +00:00
Jaakko Järvi
484d184de5 guarded enable_if definitions with BOOST_NO_SFINAE
[SVN r21149]
2003-12-05 16:31:38 +00:00
Fernando Cacciola
3305cf1592 Fixed a bug in the semantics of less_pointees() {again}
[SVN r21133]
2003-12-04 01:53:29 +00:00
Fernando Cacciola
ec36cd8c54 Fixed a bug in the semantics of less_pointees()
[SVN r21132]
2003-12-04 01:47:31 +00:00
Beman Dawes
61fb5a0b8f fix broken link to logo
[SVN r21122]
2003-12-03 14:36:38 +00:00
John Maddock
8024c3e9c7 Updated license terms
[SVN r21120]
2003-12-03 13:34:11 +00:00
Daniel Frey
2f5945d0cd Removed bool_testable, added note about portability of separate, explicit instantiation, changed license of documentation
[SVN r21110]
2003-12-03 07:01:28 +00:00
Jaakko Järvi
929517d6d7 Added enable_if library
[SVN r21090]
2003-12-02 21:41:15 +00:00
Peter Dimov
abcab174a5 _MSC_VER use clarified.
[SVN r20992]
2003-11-28 15:35:21 +00:00
Fernando Cacciola
801be90699 Moved from "utility" to "detail" until a Fast Track Review formalizes it.
[SVN r20983]
2003-11-28 14:36:21 +00:00
Dave Abrahams
265c2348b8 Removed access category tags from iterator library, made corresponding
changes elsewhere.

boost/iterator and libs/iterator/test were updated from
branch "simplify"


[SVN r20905]
2003-11-22 01:18:37 +00:00
Daryle Walker
fb95bcc64c Moved some of my stuff to the Boost Software License, Version 1.0
[SVN r20681]
2003-11-05 07:04:53 +00:00
Fernando Cacciola
aedc410525 New License
[SVN r20607]
2003-11-03 02:59:08 +00:00
Fernando Cacciola
7fa440c154 *** empty log message ***
[SVN r20511]
2003-10-28 00:09:18 +00:00
John Maddock
746e0fad2b Changed email address to john@johnmaddock.co.uk
[SVN r20472]
2003-10-24 11:13:42 +00:00
Dave Abrahams
1616f6f5a8 Update credits for R. Samuel Klatchko
[SVN r20325]
2003-10-09 14:16:15 +00:00
Vladimir Prus
ca3e7d8530 Add V2 Jamfile
[SVN r20270]
2003-10-07 07:25:24 +00:00
Fernando Cacciola
f0f753ba6c Typed in place construction added
[SVN r20070]
2003-09-15 20:28:10 +00:00
Beman Dawes
532065b51b Change license message to reference Boost Software License
[SVN r20038]
2003-09-12 17:09:29 +00:00
Fernando Cacciola
4bfb534bae Added for new Boost.Optional functionality
[SVN r19995]
2003-09-10 15:40:47 +00:00
Dave Abrahams
95ba7a4381 Use the import rule
[SVN r19968]
2003-09-08 17:38:49 +00:00
Aleksey Gurtovoy
e92213431e Removed tie_example.cpp per Daniel's request
[SVN r19910]
2003-09-03 05:24:48 +00:00
Daniel Frey
7dd7daee1b Removed obsolete references to utility/tie
[SVN r19902]
2003-09-01 21:04:26 +00:00
Dave Abrahams
953cc46220 Removed code-breaking change from boost/detail/iterator.hpp and
corresponding workarounds from tests.

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


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

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

Reinstated libs/utility/iterator_traits_test.cpp


[SVN r19840]
2003-08-28 16:52:02 +00:00
Daniel Frey
c86fcbf456 Fix for Metrowerks CW
[SVN r19626]
2003-08-16 01:05:43 +00:00
Ronald Garcia
6ded8b9ad6 Initial revision.
[SVN r19536]
2003-08-11 19:24:03 +00:00
Ronald Garcia
bb6a6272e1 Updated shared_container_iterator to use the new iterator adaptors library.
Updated the documentation and examples as well to reflect the changes.


[SVN r19535]
2003-08-11 16:29:47 +00:00
Daniel Frey
242634b3fc Added safe_bool_testable_test
[SVN r19373]
2003-07-30 21:33:37 +00:00
Daniel Frey
662cf14bf6 Initial version
[SVN r19372]
2003-07-30 21:32:19 +00:00
Dave Abrahams
fe3aaf62cd Undo overeager workarounding and safe_bool.
[SVN r19364]
2003-07-30 12:41:10 +00:00
Dave Abrahams
cb189bd6be operators.hpp, operators_test.cpp - workaround for compilers not
supporting the PP lib, many workarounds for another problem which
   may be our bug.

linear_congruential.hpp - Borland workaround


[SVN r19350]
2003-07-30 01:11:14 +00:00
Dave Abrahams
f57c914b8f Preparation for delivering nicely-formatted error messages in
Boost.Python.  The major change is that, instead of being
boost::function2<PyObject*,PyObject*,PyObject*>, py_function is now a
runtime-polymorphic wrapper for compile-time polymorphic
behavior (just like function) of our own which carries more
information/behaviors.  In particular, you can retrieve an array of
c-strings describing the types in the function signature.
Additionally, the minimum and maximum arity are stored in the
py_function object instead of in the 'function' object which wraps it.

* data_members.hpp -

     Adjustments for the new py_function.  Workarounds for CodeWarrior
     Pro 8.3 bugs in function template argument deduction with
     pointers-to-members.

* has_back_reference.hpp, test/back_reference.cpp,
  test/select_holder.cpp -

     Updated to follow the metafunction protocol

* init.hpp, detail/defaults_gen.hpp -

     Make Keywords a more-specific type in function signatures to
     prevent string literals that show up as char[N] from binding to
     the wrong argument (at least Intel 7.1 for Windows does this).

* make_function.hpp -

     Adjustments for the new py_function.  Arities are now computed
     by caller<>.

* opaque_pointer_converter.hpp, type_id.hpp -

     Use BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS facilities;
     generate specializations that all compilers can handle.

* raw_function.hpp -

     Adjustments for the new py_function.

* caller.hpp -

     Added arity and signature type name reporting.

* detail/config.hpp

     Enable __declspec(dllexport) for Cygwin, thereby fixing the
     recent horrible Cygwin linking problems.


* detail/msvc_typeinfo.hpp -

     Always pass boost::type<T>* explicitly, thereby working around
     incompatible notions of how to specialize function templates with
     default arguments on various compilers.

*   object/function.hpp
  , object/function_handle.hpp
  , object/function_object.hpp
  , object/function_object.cpp

     Adjustments for the new py_function.  Arities are carried by
     py_function.

* object/iterator.hpp, object/iterator.cpp

     Adjustments for the new py_function; we have to compute a
     signature of types to construct it with.

* object/py_function.hpp

     Removed dependency on boost::function; see the comment at the
     top of this entry for more details.

* object/select_holder.hpp

     Clean up to more closely follow MPL idioms.

* test/Jamfile -

     Adjust the embedding test for the new Cygwin use of declspec.
     Update bases and pointee tests with missing properties.

* test/input_iterator.cpp -

     Updates for the new iterator adaptors.

* test/opaque.py -

     Add Python encoding comment to suppress PendinDeprecationWarning
     with recent Python builds.

* test/str.cpp

     Pass a Python long instead of a float to string.expandtabs,
     suppressing a PendinDeprecationWarning with recent Python builds.

* libs/utility/counting_iterator_example.cpp

     Borland workaround

* libs/utility/indirect_iterator_example.cpp

     const-correctness fix.

*


[SVN r19247]
2003-07-22 00:06:41 +00:00
Thomas Witt
7cec198e14 Added missing algorithm include.
[SVN r19230]
2003-07-20 19:17:18 +00:00
Dave Abrahams
52d3120528 Borland workaround
[SVN r19157]
2003-07-16 19:10:34 +00:00
Dave Abrahams
f1aff5670c strict 2-phase ADL fixes.
[SVN r19152]
2003-07-16 15:16:21 +00:00
Dave Abrahams
632f682292 Satisfy assignable requirement for output iterators.
[SVN r19150]
2003-07-16 14:30:47 +00:00
Peter Dimov
d1d0d6b788 Fixed Intel 7 issue (reported by Daniel Frey)
[SVN r19145]
2003-07-16 10:53:06 +00:00
Jens Maurer
3bd833c8ff avoid default parameters for function templates, they confuse SunCC
[SVN r19100]
2003-07-13 18:59:08 +00:00
Jens Maurer
1ef77b0853 fix cut-and-paste problem with subproject path
[SVN r19084]
2003-07-12 09:37:36 +00:00
Dave Abrahams
074007ab8c Get examples working, mostly. Some interface expansion for a few of
the adaptors, allowing default construction of UnaryFunction and
Predicate arguments when they are class types.


[SVN r19081]
2003-07-12 04:15:13 +00:00
Dave Abrahams
c4b7aaf281 Move to new iterator adaptors
[SVN r19074]
2003-07-11 22:18:58 +00:00
Dave Abrahams
22b8494e9a Factored out separate utility/test Jamfile
[SVN r19068]
2003-07-11 17:24:18 +00:00
Daryle Walker
c1c8329403 Expanded base-from-member constructors to 10 arguments; did minor tweaks
[SVN r18791]
2003-06-15 01:16:49 +00:00
Peter Dimov
20a89040e1 -Wundef fixes.
[SVN r18788]
2003-06-12 17:09:24 +00:00
Peter Dimov
1c7a2a1476 IBM C++ support added.
[SVN r18587]
2003-05-28 13:45:58 +00:00
Daniel Frey
7c40cc0b63 Fixed bool_testable for compilers with BOOST_NO_OPERATORS_IN_NAMESPACE
[SVN r18521]
2003-05-23 23:09:21 +00:00
Peter Dimov
73a9e0d351 Intel support.
[SVN r18520]
2003-05-23 22:30:23 +00:00
Daniel Frey
dc9856744a Fixed tests for bool_testable
[SVN r18502]
2003-05-23 00:18:57 +00:00
Daniel Frey
88f4e47550 Added bool_testable by Sam Partington
[SVN r18413]
2003-05-15 22:40:33 +00:00
Dave Abrahams
1be04eeec5 Fix a bug in preprocessor usage
[SVN r18231]
2003-04-11 06:56:52 +00:00
Daniel Frey
56acf9c325 Fixed shift-operators to respect BOOST_FORCE_SYMMETRIC_OPERATORS
[SVN r17664]
2003-02-26 21:26:57 +00:00
Aleksey Gurtovoy
c6e3957efc MPL names/directory structure refactoring
[SVN r17651]
2003-02-25 23:11:41 +00:00
Peter Dimov
25e8284950 Qualified checked_delete calls to prevent ADL (reported by Daniel Frey)
[SVN r17636]
2003-02-25 13:00:22 +00:00
Dave Abrahams
37a6537a5b fix metafunctions for MPL
[SVN r17621]
2003-02-25 00:57:33 +00:00
Aleksey Gurtovoy
80df1d8f12 split utility.hpp header
[SVN r17472]
2003-02-17 06:20:57 +00:00
Peter Dimov
75afed7f17 Made operator()s const.
[SVN r17411]
2003-02-14 16:20:01 +00:00
Peter Dimov
1d7066aee1 __func__ is a predefined identifier, not a macro.
[SVN r17308]
2003-02-10 16:25:41 +00:00
Fernando Cacciola
12272a38d4 Initial Commit (was left out when the Optional Library was commited)
[SVN r17204]
2003-02-04 15:29:12 +00:00
Jeremy Siek
04f901e52e fixed some typos
[SVN r17052]
2003-01-27 19:14:18 +00:00
Beman Dawes
fabfb31bf6 add value_init
[SVN r16826]
2003-01-09 13:26:13 +00:00
Beman Dawes
683701cd07 fix invalid bookmarks
[SVN r16823]
2003-01-09 13:03:37 +00:00
Dave Abrahams
119c64be0b Workaround VC7 bug which strips const from nested classes
[SVN r16797]
2003-01-08 17:21:10 +00:00
Beman Dawes
d429c9a7d8 minor cleanup
[SVN r16709]
2002-12-27 16:58:27 +00:00
Beman Dawes
1e8216431b add or update See www.boost.org comments
[SVN r16708]
2002-12-27 16:51:53 +00:00
Peter Dimov
e45b2e2136 Doc link updated.
[SVN r16699]
2002-12-24 12:34:42 +00:00
Beman Dawes
9e6951009b Add /libs/lib-name to comment
[SVN r16685]
2002-12-23 02:43:12 +00:00
Dave Abrahams
a009a209f1 Use BOOST_WORKAROUND
[SVN r16668]
2002-12-20 00:03:04 +00:00
Peter Dimov
97605056ed Added a note that throw_exception must not return (Beman Dawes)
[SVN r16471]
2002-12-02 12:12:42 +00:00
Peter Dimov
8fcfa33d33 Fix: Comeau with bcc32 as backend defines __BORLANDC__ as 1.
[SVN r16455]
2002-11-28 13:32:44 +00:00
Toon Knapen
aa65e3da3b sort_by_value(std::list<std::string>& l) is not declared inline anymore to make it compile with vacpp
[SVN r16407]
2002-11-25 15:54:37 +00:00
Peter Dimov
b4cfadb4d5 Metrowerks support (Bertolt Mildner)
[SVN r16263]
2002-11-15 19:44:18 +00:00
Peter Dimov
45a6249668 New BOOST_ASSERT, including documentation.
[SVN r16240]
2002-11-14 16:09:29 +00:00
Peter Dimov
1d601aef4d boost::throw_exception documentation added.
[SVN r16239]
2002-11-14 15:13:59 +00:00
Peter Dimov
32fb45eba9 checked_delete.hpp documentation added.
[SVN r16238]
2002-11-14 14:53:32 +00:00
Peter Dimov
2b7d10aceb BOOST_CURRENT_FUNCTION documentation added.
[SVN r16236]
2002-11-14 14:41:25 +00:00
Dave Abrahams
5dc62711e1 Fix from Yitzhak Sapir <yitzhaks@actimize.com>
[SVN r16198]
2002-11-11 19:50:05 +00:00
Dave Abrahams
252c02aca0 Works with MSVC and Intel5 now. Thanks, Aleksey!!
[SVN r16165]
2002-11-08 17:08:17 +00:00
Dave Abrahams
9655beb7ba Cleanups on boost::iterator_traits<>
Broke MSVC though :(


[SVN r16157]
2002-11-08 06:57:31 +00:00
Dave Abrahams
f0ea53e77e rip out illegal semicolons
[SVN r16134]
2002-11-06 18:20:38 +00:00
Dave Abrahams
4755b42909 Daniel Frey's NRVO patches
[SVN r16084]
2002-11-04 01:59:32 +00:00
Peter Dimov
ef9af03c6c Changed typename to class; some libraries helpfully #define typename
[SVN r15970]
2002-10-23 13:55:18 +00:00
Björn Karlsson
7439073cbf Merged from branch to trunk
[SVN r15572]
2002-09-30 16:54:26 +00:00
Ralf W. Grosse-Kunstleve
aff985a563 explicit "private" inheritance to avoid compiler warnings (MIPSpro)
[SVN r15422]
2002-09-17 21:06:32 +00:00
Dave Abrahams
db425222d5 mpl_v2 branch checkin
[SVN r15258]
2002-09-11 05:35:41 +00:00
Ronald Garcia
e20af510f7 Initial Revision
[SVN r15254]
2002-09-10 16:13:08 +00:00
Ronald Garcia
d8230c6a73 Added Shared Container Iterator adaptor to iterator adaptor library.
[SVN r15169]
2002-09-05 14:05:29 +00:00
Beman Dawes
f5690787bf Distinguish between VC++ versions
[SVN r15127]
2002-09-01 14:57:40 +00:00
John Maddock
a4fd7b32dd Misc Kylix fixes
[SVN r15086]
2002-08-25 11:57:37 +00:00
Ronald Garcia
f4336ec693 fixed typo.
[SVN r14798]
2002-08-12 20:47:54 +00:00
Beman Dawes
03d906976b Reduced probes from 10,000 to 1,000 to speed regression tests
[SVN r14789]
2002-08-12 15:05:23 +00:00
Beman Dawes
4ba6a96822 fix test_main signature
[SVN r14783]
2002-08-12 13:22:40 +00:00
John Maddock
1ea4140d56 Added tests for BOOST_NO_STD_ITERATOR_TRAITS
[SVN r14654]
2002-07-31 11:25:25 +00:00
Douglas Gregor
351d4ecb15 Document policies() member of iterator_adaptor
[SVN r14613]
2002-07-26 00:03:24 +00:00
Beman Dawes
7fbf84dcc6 BaseType -> Base in one more place
[SVN r14605]
2002-07-25 19:10:05 +00:00
Dave Abrahams
3ff49b272d fixup
[SVN r14598]
2002-07-25 14:16:54 +00:00
Dave Abrahams
5b52e3d418 Fix doc based on Beman's feedback
[SVN r14596]
2002-07-25 13:52:48 +00:00
Dave Abrahams
8c0eb498d3 Fix unversioned VC++ checks
[SVN r14436]
2002-07-13 12:26:19 +00:00
Dave Abrahams
48a81ef7ea VC++ fixes
[SVN r14435]
2002-07-13 12:22:51 +00:00
Dave Abrahams
f7610c9b26 fix link
[SVN r14318]
2002-07-05 23:51:20 +00:00
Dave Abrahams
1755eaf019 Merged from RC_1_28_0
[SVN r13944]
2002-05-16 00:56:42 +00:00
John Maddock
6b8b218efb Removed tabs, fixed end of files.
[SVN r13803]
2002-05-10 11:35:38 +00:00
Beman Dawes
333d79b345 Add index.html so automatic tools work correctly
[SVN r13725]
2002-05-07 19:23:05 +00:00
John Maddock
f0fa436fe4 Added new config macro BOOST_HAS_MS_INT64 to detect presence of __int64 data type.
Modified boost source to use BOOST_HAS_LONG_LONG and BOOST_HAS_MS_INT64
   where appropriate to do so.


[SVN r13714]
2002-05-07 11:24:29 +00:00
John Maddock
13e6d78fa8 Fixes for Borland C++ Builder 6
[SVN r13662]
2002-05-04 11:03:42 +00:00
John Maddock
7126ea2685 Borland C++ Builder 6 fixes
[SVN r13659]
2002-05-04 10:55:15 +00:00
John Maddock
a37518cb4a Fixed broken links.
[SVN r13574]
2002-04-27 11:05:49 +00:00
Jens Maurer
64b3e8c3bd add missing #include <iterator>
[SVN r13554]
2002-04-23 19:52:11 +00:00
Peter Dimov
339937380e MSVC fixes.
[SVN r13476]
2002-04-13 13:19:57 +00:00
Dave Abrahams
6156f0d302 Roll addressof() patch back in!
[SVN r13433]
2002-04-10 17:01:35 +00:00
Douglas Gregor
00560e8e17 addressof.hpp:
- Peter Dimov suggested a fix to deal with those evil cv-qualifiers


[SVN r13431]
2002-04-10 14:47:32 +00:00
Dave Abrahams
029ff9828f Roll back addressof() patch temporarily
[SVN r13428]
2002-04-10 09:48:30 +00:00
Douglas Gregor
ec188c7c3e Make local classes nonlocal to silence annoying warnings from Borland C++
[SVN r13418]
2002-04-10 04:00:22 +00:00
Douglas Gregor
0a0296a5d0 ref.hpp:
- Use addressof() instead of & operator


[SVN r13416]
2002-04-10 03:36:17 +00:00
Douglas Gregor
6e26a5bbe7 boost/utility.hpp:
- Include boost/utility/addressof.hpp

boost/utility/addressof.hpp:
  - addressof() implementation

libs/utility/utility.htm:
  - Document addressof

libs/utility/addressof_test.cpp:
  - Test addressof()


[SVN r13414]
2002-04-10 03:31:18 +00:00
Douglas Gregor
dc1b6246a0 boost/ref.hpp:
- Added get_pointer method to return a pointer (instead of a reference)

libs/bind/ref.html:
  - Document get_pointer


[SVN r13322]
2002-03-31 00:24:00 +00:00
John Maddock
15f69eaf14 Fixed new problem with Borland compile -
code clashes with some new type traits workarounds for some reason.


[SVN r13226]
2002-03-19 11:33:00 +00:00
Dave Abrahams
4774a0d325 Added Copyright
[SVN r13145]
2002-03-09 20:34:06 +00:00
Jens Maurer
be78ab72c9 update expected failures for Sun CC
[SVN r13101]
2002-03-05 20:41:37 +00:00
Dave Abrahams
0bc4a1b20d Warning suppressioni from Craig Rodrigues
[SVN r13098]
2002-03-05 18:55:49 +00:00
Darin Adler
c8b674d105 Add missing paren.
[SVN r12997]
2002-03-01 17:43:00 +00:00
John Maddock
b421d4725a Fixed expected failures for gcc 3.1
[SVN r12994]
2002-03-01 12:27:01 +00:00
Dave Abrahams
1662bb5713 use of "small" changed to "small_" to suppress confusion on some compilers
[SVN r12916]
2002-02-24 02:35:19 +00:00
Toon Knapen
ad79a21abd added portability note about using std::vector's as Base with VC++
[SVN r12875]
2002-02-21 12:09:46 +00:00
Peter Dimov
19645a52e6 Added a default constructor to shared_count and shared_ptr for incomplete types (void).
[SVN r12815]
2002-02-15 13:31:58 +00:00
John Maddock
74c3077c9a Added test cases for incomplete and abstract base class types.
[SVN r12803]
2002-02-14 12:57:32 +00:00
John Maddock
1f29191329 Modified call_traits to work with incomplete types.
[SVN r12800]
2002-02-14 12:54:57 +00:00
Darin Adler
4b636a7680 Always say "private noncopyable" to avoid warnings.
[SVN r12762]
2002-02-08 20:08:15 +00:00
Jeremy Siek
e6fc2555f3 removed tabs
[SVN r12707]
2002-02-04 20:29:35 +00:00
Darin Adler
e27d0fcf2a New smart pointer documentation. Related clean-up of the smart pointer
library. Changing includes to include the new individual smart pointer
headers. Replacing old smart pointer library with an include of the new
smart pointer headers. Simplify ifdefs that involve the member templates
macros now that BOOST_MSVC6_MEMBER_TEMPLATES is also guaranteed to bet
set for platforms that have full member templates.


[SVN r12647]
2002-02-02 18:36:12 +00:00
Dave Abrahams
2643c33b20 Doc fixes from Thomas Witt
[SVN r12621]
2002-02-01 13:03:21 +00:00
Aleksey Gurtovoy
71af1e77c8 compile-time ref.hpp header test, initial checkin
[SVN r12525]
2002-01-27 13:39:06 +00:00
Aleksey Gurtovoy
99e7406bd9 ref_ct_test.cpp
[SVN r12524]
2002-01-27 13:32:37 +00:00
Aleksey Gurtovoy
413265f497 compile-time ref.hpp header test, initial checkin
[SVN r12522]
2002-01-27 13:07:20 +00:00
Aleksey Gurtovoy
fe44cdf09b made 'reference_wrapper' Assignable
[SVN r12520]
2002-01-27 13:02:27 +00:00
Peter Dimov
e413428d71 Added tests for the new smart pointers.
[SVN r12500]
2002-01-25 13:54:30 +00:00
Darin Adler
88b9822db7 Mark inline to avoid warning with "require prototypes" on.
[SVN r12490]
2002-01-24 19:15:30 +00:00
Peter Dimov
24045c0cd7 #included <boost/checked_delete.hpp>, removed unnecessary #includes.
[SVN r12488]
2002-01-24 17:47:08 +00:00
Dave Abrahams
d2aa9f4a84 added missing #include of boost/config.hpp
[SVN r12483]
2002-01-24 16:55:41 +00:00
Dave Abrahams
d2a5fd169f initial checkin
[SVN r12481]
2002-01-24 16:52:06 +00:00
Peter Dimov
4e350d9934 Modified is_reference_wrapper<> to work for reference types.
[SVN r12475]
2002-01-24 13:28:08 +00:00
Dave Abrahams
f3f697bbc8 added is_reference_wrapper<>, unwrap_reference<>
[SVN r12470]
2002-01-23 21:19:14 +00:00
Darin Adler
c7c09696db Tweak comments. Include <assert.h> and <boost/current_function.hpp> only
when needed.


[SVN r12446]
2002-01-22 18:28:33 +00:00
Peter Dimov
dbcc58d984 Smart pointer enhancements, initial commit
[SVN r12439]
2002-01-22 13:38:52 +00:00
Dave Abrahams
8231310c4d initial checkin
[SVN r12390]
2002-01-21 01:29:06 +00:00
Beman Dawes
2988140430 tabs
[SVN r12360]
2002-01-19 16:07:28 +00:00
John Maddock
7387966005 Stripped tabs from source
[SVN r12351]
2002-01-19 12:38:14 +00:00
Jeremy Siek
e0a5a61375 removed eroneous "detail::" prefix
[SVN r12326]
2002-01-15 19:14:53 +00:00
Jeremy Siek
66ecd70689 removed std:: prefix from slist
[SVN r12310]
2002-01-14 14:57:20 +00:00
Dave Abrahams
67f4f45653 Fixed violation of 'explicit' constructor
[SVN r12256]
2002-01-09 13:15:54 +00:00
Dave Abrahams
1bf28b3de2 Fixes for Borland
[SVN r12254]
2002-01-09 12:11:37 +00:00
John Maddock
eb3c3435d7 Updated expected results
[SVN r12250]
2002-01-08 13:01:15 +00:00
Dave Abrahams
8a81d8b16c Workarounds for MSVC
[SVN r12246]
2002-01-07 19:24:45 +00:00
Toon Knapen
bc9d8b13d0 converted some of the old terminology (OrderIterator) to the current
terminology (IndexIterator)


[SVN r12164]
2001-12-28 15:49:45 +00:00
Dave Abrahams
4768b167ab Removed obsolete mentions of "less"; Added formalized Policies Concept description
[SVN r12056]
2001-12-14 12:54:21 +00:00
Dave Abrahams
591ff70ed1 many fixes
[SVN r12054]
2001-12-13 19:43:35 +00:00
Dave Abrahams
7bf2ad0b22 VC6 patch
[SVN r12045]
2001-12-13 18:24:29 +00:00
Jens Maurer
409c79b2e4 fix example (thanks to Michael Stevens)
[SVN r11979]
2001-12-08 08:39:27 +00:00
Toon Knapen
d0410691a1 removed calls to non-standard std::iota (SGI extension)
[SVN r11904]
2001-12-04 08:02:36 +00:00
Dave Abrahams
64e5115138 Fixed spelling error ing gcc-3.0 bug workaround
[SVN r11888]
2001-12-03 21:48:54 +00:00
Dave Abrahams
7ae912d83c Rolled in Helmut's fixes for random_access_iterable; rolled back
workarounds for that problem.


[SVN r11887]
2001-12-03 21:47:58 +00:00
Toon Knapen
2937f5876c changed std::iota call (SGI extension) to a manual loop
in permutation_iterator test


[SVN r11869]
2001-12-03 08:35:08 +00:00
Beman Dawes
8619c9b5c3 fix gcc looping (from Dave Abrahams)
[SVN r11839]
2001-11-30 17:55:39 +00:00
Toon Knapen
e4d5684f6b added test for permutation_iterator
[SVN r11825]
2001-11-30 11:10:07 +00:00
Toon Knapen
3d69cf95da added documentation for the permutation_iterator_adaptor
and linked to it from the iterator_adaptors documentation.


[SVN r11824]
2001-11-30 10:40:03 +00:00
Dave Abrahams
18944572b7 committing Daryle and Helmut's changes
[SVN r11813]
2001-11-29 21:22:52 +00:00
Jens Maurer
3e9d0f80c2 add generator iterator adaptor
[SVN r11736]
2001-11-19 22:11:51 +00:00
Jens Maurer
a2c4d1990a add boost::generator_iterator_policies and convenience classes
[SVN r11725]
2001-11-18 17:56:43 +00:00
Jens Maurer
404261c6ee add definition for integral constants initialized in-class
[SVN r11723]
2001-11-18 17:32:19 +00:00
Peter Dimov
87abc59612 #undef BOOST_REF_CONST added
[SVN r11674]
2001-11-14 14:40:29 +00:00
Peter Dimov
cb98ddf7db Fixed a bug w/ adaptable function objects + nested binds, made ref<> return const
[SVN r11670]
2001-11-13 13:56:05 +00:00
Peter Dimov
7d2e6c9025 __stdcall support added.
[SVN r11649]
2001-11-10 19:18:58 +00:00
Dave Abrahams
75eaa14a18 Removed defunct boost::tied (thanks, Daryle Walker)
[SVN r11622]
2001-11-07 10:35:12 +00:00
Jeremy Siek
082d6e3b32 *** empty log message ***
[SVN r11614]
2001-11-06 16:09:14 +00:00
Jeremy Siek
35b3770b6f *** empty log message ***
[SVN r11613]
2001-11-06 16:05:25 +00:00
Jeremy Siek
5b9d20c7e2 *** empty log message ***
[SVN r11611]
2001-11-06 15:52:56 +00:00
Jeremy Siek
5bbed2372e *** empty log message ***
[SVN r11602]
2001-11-05 21:03:59 +00:00
Jens Maurer
a9d407d239 update SunCC to 6.u2 (C++ 5.3)
[SVN r11601]
2001-11-05 21:00:53 +00:00
Jeremy Siek
3ca4a33a65 updated for named parameters
[SVN r11566]
2001-11-04 16:21:51 +00:00
Jeremy Siek
95197f427c remoeved #if 0
[SVN r11565]
2001-11-04 16:18:10 +00:00
Jeremy Siek
84cdfb032c commit these changes
[SVN r11563]
2001-11-04 04:37:14 +00:00
Dave Abrahams
ec2ceb9c96 no message
[SVN r11508]
2001-11-01 17:22:39 +00:00
John Maddock
6286c893fd Minor regression fixes for Borland and Sunpro tests.
[SVN r11470]
2001-10-30 11:41:35 +00:00
Jeremy Siek
354aef0e8c changed named parameters doc to match new stuff
[SVN r11417]
2001-10-22 17:04:23 +00:00
John Maddock
139e33c36d Updated preprocessor logic to use BOOST_HAS_LONG_LONG
[SVN r11399]
2001-10-18 11:33:52 +00:00
Dave Abrahams
e01de59cdd Made these actually compile
[SVN r11378]
2001-10-12 22:22:42 +00:00
Darin Adler
686f822dea Fix spelling error: "occurances" -> "occurrences".
[SVN r11376]
2001-10-11 17:26:04 +00:00
John Maddock
9961d5c9af Last fix had broken preprocessor logic, now fixed.
[SVN r11373]
2001-10-11 12:04:00 +00:00
John Maddock
628be0d125 Fixes for Sunpro C++ 5.3 (code now works!)
[SVN r11368]
2001-10-09 11:24:56 +00:00
John Maddock
633e45f61a Fixed test to work with sunpro 5.3 (omits array specialisation tests)
[SVN r11359]
2001-10-08 11:35:05 +00:00
John Maddock
2f357c3805 Partial fixes for sunpro 5.3 - doesn't actually work yet though
[SVN r11355]
2001-10-08 11:31:29 +00:00
John Maddock
cda0894d0d Fix for sunpro 5.3 (array specialisations don't work)
[SVN r11354]
2001-10-08 11:30:53 +00:00
Beman Dawes
117720a8bc 1.25.0 Final runup
[SVN r11315]
2001-10-01 15:54:23 +00:00
Beman Dawes
a6f6c3613a Change comments to make it clear why forward declaration header is required.
[SVN r11314]
2001-10-01 14:15:44 +00:00
Darin Adler
7914f5b931 Fixed unused variables that show up as warnings when doing regression
tests.


[SVN r11241]
2001-09-24 23:21:16 +00:00
John Maddock
a1add0a6f6 Intel C++ fixes: Added class copy constructor.
[SVN r11200]
2001-09-22 11:52:56 +00:00
Beman Dawes
c032b337c4 Fix broken links and other HTML changes related to new config system
[SVN r11142]
2001-09-18 21:24:51 +00:00
Jens Maurer
ec363261ae remove "explicit" on two- and three-argument constructors to avoid
error on HP aCC


[SVN r11097]
2001-09-11 18:42:25 +00:00
Beman Dawes
97cde2183d Initial base_from_member commit
[SVN r11086]
2001-09-10 14:04:28 +00:00
Dave Abrahams
7f43c682db Fixed the pair_generator documentation. Order of parameters was wrong; reordered
the table to match the corrected order.


[SVN r11035]
2001-09-05 16:29:29 +00:00
Jeremy Siek
0c9eee3c6b changed note about the move to the tuples library
[SVN r10972]
2001-08-30 19:45:19 +00:00
John Maddock
3b1afa3ba6 changed "empty-member" to "empty base-class"
[SVN r10966]
2001-08-30 10:58:19 +00:00
Jeremy Siek
93e6a75125 changed #include for tie() to tuple.hpp
[SVN r10951]
2001-08-28 19:09:33 +00:00
Jeremy Siek
52f8a7c0ca changed #include for tie()
[SVN r10950]
2001-08-28 19:07:51 +00:00
Jeremy Siek
55bfeb646f removed tie() and class tied
[SVN r10938]
2001-08-26 19:55:49 +00:00
Jeremy Siek
75c9dd3be1 added not about constness of operator* and operator[]
[SVN r10931]
2001-08-24 15:28:20 +00:00
Dave Abrahams
6392e2788f Removed incorrect statics, added const
[SVN r10930]
2001-08-24 12:09:34 +00:00
Peter Dimov
6a97f3f9ba Tabs converted to spaces.
[SVN r10916]
2001-08-23 19:05:21 +00:00
Peter Dimov
6e5f52e279 initial commit
[SVN r10914]
2001-08-23 18:42:16 +00:00
Darin Adler
7f92bed902 Fix some broken links. Fix order of constructor initializers.
[SVN r10913]
2001-08-23 17:42:07 +00:00
Beman Dawes
d68a11cc42 Misc; mostly fix links to hard disk locations
[SVN r10902]
2001-08-20 13:04:43 +00:00
Beman Dawes
328a81e194 Fix broken hyperlink
[SVN r10896]
2001-08-19 15:08:33 +00:00
Beman Dawes
31d0908b74 Add workaround for BOOST_NO_STDC_NAMESPACE
[SVN r10681]
2001-07-20 21:29:36 +00:00
Dave Abrahams
32c77599f4 Fixes for ICL
[SVN r10613]
2001-07-14 12:51:59 +00:00
Beman Dawes
812ebf3562 Back out commit made in error
[SVN r10596]
2001-07-12 16:15:30 +00:00
Beman Dawes
37f476013d Change absolute URL's to relative
[SVN r10594]
2001-07-12 15:31:15 +00:00
Dave Abrahams
9f3104166f output_iterator_helper changes: removed default template parameters, added
support for self-proxying, additional documentation and tests (Aleksey Gurtovoy)


[SVN r10576]
2001-07-09 23:51:49 +00:00
Dave Abrahams
64cc0daf34 Integrate Aleksey's changes
[SVN r10575]
2001-07-09 23:50:55 +00:00
Beman Dawes
d5d64df124 Fix broken link
[SVN r10553]
2001-07-06 19:19:45 +00:00
Beman Dawes
0edcfcd5c1 Tuples library causes tie to be deprecated
[SVN r10552]
2001-07-06 19:16:39 +00:00
John Maddock
50ba2d419a Tweeked gcc workaround (gcc 3 still has same problem as gcc 2.9x), added tentative Metrowerks and Intel compiler workarounds.
[SVN r10422]
2001-06-25 11:31:14 +00:00
John Maddock
ff3a77ca5a Fixed problem with VC6 compilers - probably a temporary fix.
[SVN r10361]
2001-06-20 11:43:57 +00:00
Jens Maurer
4eaed6c23d remove superfluous, illegal "typename" (twice)
[SVN r10314]
2001-06-12 18:50:37 +00:00
Jeremy Siek
4d0dd46471 meant to add as a branch
[SVN r10280]
2001-06-06 19:16:34 +00:00
Jeremy Siek
9c2549bd00 files for the tmpw2001 paper about iterator adaptors
[SVN r10278]
2001-06-06 19:08:51 +00:00
Dave Abrahams
b7c8e0c17f changes from Daryle Walker
[SVN r10264]
2001-06-04 11:57:37 +00:00
Jeremy Siek
dd3cfe1837 removed old arg ordering, use defaults instead
[SVN r10258]
2001-06-03 20:00:24 +00:00
Beman Dawes
43f525298e Remove compiler workarounds no longer needed due to BOOST_STATIC_ASSERT fix. For stylistic reasons, change sizeof() test to sizeof() != 0
[SVN r10236]
2001-05-28 14:22:30 +00:00
Beman Dawes
1bb1898ab9 Dave says qualifiers weren't really needed
[SVN r10222]
2001-05-24 19:11:51 +00:00
Beman Dawes
9578f24be9 Workaround compiler problems while waiting to find out if BOOST_STATIC_ASSERT is broken
[SVN r10218]
2001-05-24 16:02:42 +00:00
Jens Maurer
46fae3aed2 added check_delete workaround for Sun CC
[SVN r10213]
2001-05-24 09:26:48 +00:00
Beman Dawes
e35f91a70a Smart pointer and utility changes related to adding checked_delere and checked_array_delete
[SVN r10189]
2001-05-22 18:58:21 +00:00
John Maddock
851052fcca Updated docs - added VC6 bug warning
[SVN r10062]
2001-05-08 11:17:44 +00:00
John Maddock
5ef81b2952 Updated/stricter test program
[SVN r10061]
2001-05-08 11:17:05 +00:00
John Maddock
ef2851c053 Fixes for Sun C++ 5.1
[SVN r10060]
2001-05-08 11:16:35 +00:00
John Maddock
0b4387cff5 reorganised tests to show up VC6 bugs
[SVN r10002]
2001-05-02 10:59:32 +00:00
John Maddock
a40cf11fbf Rewritten compressed_pair regression script to test everything in a more methodical way
[SVN r10000]
2001-05-01 11:17:02 +00:00
Beman Dawes
5c495cd223 Change all eGroups references to YahooGroups
[SVN r9979]
2001-04-25 00:24:50 +00:00
Jeremy Siek
cf1296dff8 added stuff about Default Constructible needed for the function object
[SVN r9683]
2001-03-29 16:26:42 +00:00
Jeremy Siek
d6d88db6e8 std::bind1st -> boost::bind1st
[SVN r9682]
2001-03-29 16:19:34 +00:00
Jeremy Siek
85c2a35257 std::binder1st -> boost::binder1st
[SVN r9681]
2001-03-29 16:18:41 +00:00
Jeremy Siek
836d8b1c64 added spaces in name
[SVN r9673]
2001-03-29 04:08:38 +00:00
John Maddock
98d8c8ab71 fixed broken link
[SVN r9645]
2001-03-27 10:54:12 +00:00
Jeremy Siek
db45013339 fixed sgi stl link
[SVN r9631]
2001-03-22 16:06:15 +00:00
Jeremy Siek
a55c37e7f6 fixed sgi stl links
[SVN r9630]
2001-03-22 16:05:48 +00:00
Jeremy Siek
46a270fcca fixed link to sgi stl
[SVN r9629]
2001-03-22 16:02:11 +00:00
Jeremy Siek
967856518e updated link to sgi stl
[SVN r9628]
2001-03-22 16:01:18 +00:00
Jeremy Siek
7f93e739fe added documentation for initialize() policy function
[SVN r9592]
2001-03-19 21:46:14 +00:00
Jeremy Siek
2cd1422514 added comment about abstract base classes as value_type
[SVN r9584]
2001-03-19 17:31:27 +00:00
Beman Dawes
feb370b201 1.21.0 run up including fixing broken links
[SVN r9523]
2001-03-09 14:36:41 +00:00
Dave Abrahams
d1b34e64d8 Fixes for validator.w3.org
[SVN r9518]
2001-03-09 03:28:13 +00:00
Dave Abrahams
b9a1eead40 Mostly clarification. Fix: changed "category" to "iterator_category" in one place.
[SVN r9517]
2001-03-09 03:10:32 +00:00
Jeremy Siek
1e4bfac98c added named template parameter to table of contents
[SVN r9510]
2001-03-08 21:36:09 +00:00
Jeremy Siek
3bb504fbf3 added revision history line
[SVN r9506]
2001-03-08 20:50:14 +00:00
Jeremy Siek
5029791c90 split off indirect and transform tests into separate files
[SVN r9505]
2001-03-08 20:49:05 +00:00
Beman Dawes
a1a68f0970 1.21.0 run up
[SVN r9502]
2001-03-08 20:35:52 +00:00
Jeremy Siek
f8543d79eb added more static asserts
[SVN r9500]
2001-03-08 20:02:00 +00:00
Jeremy Siek
f353415136 added docs for iterator_traits_generator
[SVN r9498]
2001-03-08 19:19:46 +00:00
Jeremy Siek
26240403b0 added a test to make sure that the type set by the generator is really the
type used


[SVN r9497]
2001-03-08 19:04:29 +00:00
Jeremy Siek
3a39729b58 new file
[SVN r9488]
2001-03-08 16:33:40 +00:00
Dave Abrahams
096c961d9a Patches for Intel C++
[SVN r9425]
2001-03-04 16:08:20 +00:00
Dave Abrahams
01fe04a6a2 Workaround for Borland
[SVN r9424]
2001-03-04 16:07:11 +00:00
John Maddock
7ea4014993 Misc fixes that missed the last commit..
[SVN r9402]
2001-03-04 11:08:29 +00:00
5 changed files with 1265 additions and 443 deletions

View File

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

View File

@@ -0,0 +1,432 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
// See http://www.boost.org/libs/utility for most recent version including documentation.
// compressed_pair: pair that "compresses" empty members
// (see libs/utility/compressed_pair.htm)
//
// JM changes 25 Jan 2004:
// For the case where T1 == T2 and both are empty, then first() and second()
// should return different objects.
// JM changes 25 Jan 2000:
// Removed default arguments from compressed_pair_switch to get
// C++ Builder 4 to accept them
// rewriten swap to get gcc and C++ builder to compile.
// added partial specialisations for case T1 == T2 to avoid duplicate constructor defs.
#ifndef BOOST_DETAIL_COMPRESSED_PAIR_HPP
#define BOOST_DETAIL_COMPRESSED_PAIR_HPP
#include <algorithm>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/type_traits/is_empty.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/call_traits.hpp>
namespace boost
{
template <class T1, class T2>
class compressed_pair;
// compressed_pair
namespace details
{
// JM altered 26 Jan 2000:
template <class T1, class T2, bool IsSame, bool FirstEmpty, bool SecondEmpty>
struct compressed_pair_switch;
template <class T1, class T2>
struct compressed_pair_switch<T1, T2, false, false, false>
{static const int value = 0;};
template <class T1, class T2>
struct compressed_pair_switch<T1, T2, false, true, true>
{static const int value = 3;};
template <class T1, class T2>
struct compressed_pair_switch<T1, T2, false, true, false>
{static const int value = 1;};
template <class T1, class T2>
struct compressed_pair_switch<T1, T2, false, false, true>
{static const int value = 2;};
template <class T1, class T2>
struct compressed_pair_switch<T1, T2, true, true, true>
{static const int value = 4;};
template <class T1, class T2>
struct compressed_pair_switch<T1, T2, true, false, false>
{static const int value = 5;};
template <class T1, class T2, int Version> class compressed_pair_imp;
#ifdef __GNUC__
// workaround for GCC (JM):
using std::swap;
#endif
//
// can't call unqualified swap from within classname::swap
// as Koenig lookup rules will find only the classname::swap
// member function not the global declaration, so use cp_swap
// as a forwarding function (JM):
template <typename T>
inline void cp_swap(T& t1, T& t2)
{
#ifndef __GNUC__
using std::swap;
#endif
swap(t1, t2);
}
// 0 derive from neither
template <class T1, class T2>
class compressed_pair_imp<T1, T2, 0>
{
public:
typedef T1 first_type;
typedef T2 second_type;
typedef typename call_traits<first_type>::param_type first_param_type;
typedef typename call_traits<second_type>::param_type second_param_type;
typedef typename call_traits<first_type>::reference first_reference;
typedef typename call_traits<second_type>::reference second_reference;
typedef typename call_traits<first_type>::const_reference first_const_reference;
typedef typename call_traits<second_type>::const_reference second_const_reference;
compressed_pair_imp() {}
compressed_pair_imp(first_param_type x, second_param_type y)
: first_(x), second_(y) {}
compressed_pair_imp(first_param_type x)
: first_(x) {}
compressed_pair_imp(second_param_type y)
: second_(y) {}
first_reference first() {return first_;}
first_const_reference first() const {return first_;}
second_reference second() {return second_;}
second_const_reference second() const {return second_;}
void swap(::boost::compressed_pair<T1, T2>& y)
{
cp_swap(first_, y.first());
cp_swap(second_, y.second());
}
private:
first_type first_;
second_type second_;
};
// 1 derive from T1
template <class T1, class T2>
class compressed_pair_imp<T1, T2, 1>
: private ::boost::remove_cv<T1>::type
{
public:
typedef T1 first_type;
typedef T2 second_type;
typedef typename call_traits<first_type>::param_type first_param_type;
typedef typename call_traits<second_type>::param_type second_param_type;
typedef typename call_traits<first_type>::reference first_reference;
typedef typename call_traits<second_type>::reference second_reference;
typedef typename call_traits<first_type>::const_reference first_const_reference;
typedef typename call_traits<second_type>::const_reference second_const_reference;
compressed_pair_imp() {}
compressed_pair_imp(first_param_type x, second_param_type y)
: first_type(x), second_(y) {}
compressed_pair_imp(first_param_type x)
: first_type(x) {}
compressed_pair_imp(second_param_type y)
: second_(y) {}
first_reference first() {return *this;}
first_const_reference first() const {return *this;}
second_reference second() {return second_;}
second_const_reference second() const {return second_;}
void swap(::boost::compressed_pair<T1,T2>& y)
{
// no need to swap empty base class:
cp_swap(second_, y.second());
}
private:
second_type second_;
};
// 2 derive from T2
template <class T1, class T2>
class compressed_pair_imp<T1, T2, 2>
: private ::boost::remove_cv<T2>::type
{
public:
typedef T1 first_type;
typedef T2 second_type;
typedef typename call_traits<first_type>::param_type first_param_type;
typedef typename call_traits<second_type>::param_type second_param_type;
typedef typename call_traits<first_type>::reference first_reference;
typedef typename call_traits<second_type>::reference second_reference;
typedef typename call_traits<first_type>::const_reference first_const_reference;
typedef typename call_traits<second_type>::const_reference second_const_reference;
compressed_pair_imp() {}
compressed_pair_imp(first_param_type x, second_param_type y)
: second_type(y), first_(x) {}
compressed_pair_imp(first_param_type x)
: first_(x) {}
compressed_pair_imp(second_param_type y)
: second_type(y) {}
first_reference first() {return first_;}
first_const_reference first() const {return first_;}
second_reference second() {return *this;}
second_const_reference second() const {return *this;}
void swap(::boost::compressed_pair<T1,T2>& y)
{
// no need to swap empty base class:
cp_swap(first_, y.first());
}
private:
first_type first_;
};
// 3 derive from T1 and T2
template <class T1, class T2>
class compressed_pair_imp<T1, T2, 3>
: private ::boost::remove_cv<T1>::type,
private ::boost::remove_cv<T2>::type
{
public:
typedef T1 first_type;
typedef T2 second_type;
typedef typename call_traits<first_type>::param_type first_param_type;
typedef typename call_traits<second_type>::param_type second_param_type;
typedef typename call_traits<first_type>::reference first_reference;
typedef typename call_traits<second_type>::reference second_reference;
typedef typename call_traits<first_type>::const_reference first_const_reference;
typedef typename call_traits<second_type>::const_reference second_const_reference;
compressed_pair_imp() {}
compressed_pair_imp(first_param_type x, second_param_type y)
: first_type(x), second_type(y) {}
compressed_pair_imp(first_param_type x)
: first_type(x) {}
compressed_pair_imp(second_param_type y)
: second_type(y) {}
first_reference first() {return *this;}
first_const_reference first() const {return *this;}
second_reference second() {return *this;}
second_const_reference second() const {return *this;}
//
// no need to swap empty bases:
void swap(::boost::compressed_pair<T1,T2>&) {}
};
// JM
// 4 T1 == T2, T1 and T2 both empty
// Note does not actually store an instance of T2 at all -
// but reuses T1 base class for both first() and second().
template <class T1, class T2>
class compressed_pair_imp<T1, T2, 4>
: private ::boost::remove_cv<T1>::type
{
public:
typedef T1 first_type;
typedef T2 second_type;
typedef typename call_traits<first_type>::param_type first_param_type;
typedef typename call_traits<second_type>::param_type second_param_type;
typedef typename call_traits<first_type>::reference first_reference;
typedef typename call_traits<second_type>::reference second_reference;
typedef typename call_traits<first_type>::const_reference first_const_reference;
typedef typename call_traits<second_type>::const_reference second_const_reference;
compressed_pair_imp() {}
compressed_pair_imp(first_param_type x, second_param_type y)
: first_type(x), m_second(y) {}
compressed_pair_imp(first_param_type x)
: first_type(x), m_second(x) {}
first_reference first() {return *this;}
first_const_reference first() const {return *this;}
second_reference second() {return m_second;}
second_const_reference second() const {return m_second;}
void swap(::boost::compressed_pair<T1,T2>&) {}
private:
T2 m_second;
};
// 5 T1 == T2 and are not empty: //JM
template <class T1, class T2>
class compressed_pair_imp<T1, T2, 5>
{
public:
typedef T1 first_type;
typedef T2 second_type;
typedef typename call_traits<first_type>::param_type first_param_type;
typedef typename call_traits<second_type>::param_type second_param_type;
typedef typename call_traits<first_type>::reference first_reference;
typedef typename call_traits<second_type>::reference second_reference;
typedef typename call_traits<first_type>::const_reference first_const_reference;
typedef typename call_traits<second_type>::const_reference second_const_reference;
compressed_pair_imp() {}
compressed_pair_imp(first_param_type x, second_param_type y)
: first_(x), second_(y) {}
compressed_pair_imp(first_param_type x)
: first_(x), second_(x) {}
first_reference first() {return first_;}
first_const_reference first() const {return first_;}
second_reference second() {return second_;}
second_const_reference second() const {return second_;}
void swap(::boost::compressed_pair<T1, T2>& y)
{
cp_swap(first_, y.first());
cp_swap(second_, y.second());
}
private:
first_type first_;
second_type second_;
};
} // details
template <class T1, class T2>
class compressed_pair
: private ::boost::details::compressed_pair_imp<T1, T2,
::boost::details::compressed_pair_switch<
T1,
T2,
::boost::is_same<typename remove_cv<T1>::type, typename remove_cv<T2>::type>::value,
::boost::is_empty<T1>::value,
::boost::is_empty<T2>::value>::value>
{
private:
typedef details::compressed_pair_imp<T1, T2,
::boost::details::compressed_pair_switch<
T1,
T2,
::boost::is_same<typename remove_cv<T1>::type, typename remove_cv<T2>::type>::value,
::boost::is_empty<T1>::value,
::boost::is_empty<T2>::value>::value> base;
public:
typedef T1 first_type;
typedef T2 second_type;
typedef typename call_traits<first_type>::param_type first_param_type;
typedef typename call_traits<second_type>::param_type second_param_type;
typedef typename call_traits<first_type>::reference first_reference;
typedef typename call_traits<second_type>::reference second_reference;
typedef typename call_traits<first_type>::const_reference first_const_reference;
typedef typename call_traits<second_type>::const_reference second_const_reference;
compressed_pair() : base() {}
compressed_pair(first_param_type x, second_param_type y) : base(x, y) {}
explicit compressed_pair(first_param_type x) : base(x) {}
explicit compressed_pair(second_param_type y) : base(y) {}
first_reference first() {return base::first();}
first_const_reference first() const {return base::first();}
second_reference second() {return base::second();}
second_const_reference second() const {return base::second();}
void swap(compressed_pair& y) { base::swap(y); }
};
// JM
// Partial specialisation for case where T1 == T2:
//
template <class T>
class compressed_pair<T, T>
: private details::compressed_pair_imp<T, T,
::boost::details::compressed_pair_switch<
T,
T,
::boost::is_same<typename remove_cv<T>::type, typename remove_cv<T>::type>::value,
::boost::is_empty<T>::value,
::boost::is_empty<T>::value>::value>
{
private:
typedef details::compressed_pair_imp<T, T,
::boost::details::compressed_pair_switch<
T,
T,
::boost::is_same<typename remove_cv<T>::type, typename remove_cv<T>::type>::value,
::boost::is_empty<T>::value,
::boost::is_empty<T>::value>::value> base;
public:
typedef T first_type;
typedef T second_type;
typedef typename call_traits<first_type>::param_type first_param_type;
typedef typename call_traits<second_type>::param_type second_param_type;
typedef typename call_traits<first_type>::reference first_reference;
typedef typename call_traits<second_type>::reference second_reference;
typedef typename call_traits<first_type>::const_reference first_const_reference;
typedef typename call_traits<second_type>::const_reference second_const_reference;
compressed_pair() : base() {}
compressed_pair(first_param_type x, second_param_type y) : base(x, y) {}
#if !(defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530))
explicit
#endif
compressed_pair(first_param_type x) : base(x) {}
first_reference first() {return base::first();}
first_const_reference first() const {return base::first();}
second_reference second() {return base::second();}
second_const_reference second() const {return base::second();}
void swap(::boost::compressed_pair<T,T>& y) { base::swap(y); }
};
template <class T1, class T2>
inline
void
swap(compressed_pair<T1, T2>& x, compressed_pair<T1, T2>& y)
{
x.swap(y);
}
} // boost
#endif // BOOST_DETAIL_COMPRESSED_PAIR_HPP

View File

@@ -0,0 +1,168 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
// See http://www.boost.org/libs/utility for most recent version including documentation.
//
// Crippled version for crippled compilers:
// see libs/utility/call_traits.htm
//
/* Release notes:
01st October 2000:
Fixed call_traits on VC6, using "poor man's partial specialisation",
using ideas taken from "Generative programming" by Krzysztof Czarnecki
& Ulrich Eisenecker.
*/
#ifndef BOOST_OB_CALL_TRAITS_HPP
#define BOOST_OB_CALL_TRAITS_HPP
#ifndef BOOST_CONFIG_HPP
#include <boost/config.hpp>
#endif
#ifndef BOOST_ARITHMETIC_TYPE_TRAITS_HPP
#include <boost/type_traits/arithmetic_traits.hpp>
#endif
#ifndef BOOST_COMPOSITE_TYPE_TRAITS_HPP
#include <boost/type_traits/composite_traits.hpp>
#endif
namespace boost{
#ifdef BOOST_MSVC6_MEMBER_TEMPLATES
//
// use member templates to emulate
// partial specialisation:
//
namespace detail{
template <class T>
struct standard_call_traits
{
typedef T value_type;
typedef T& reference;
typedef const T& const_reference;
typedef const T& param_type;
};
template <class T>
struct simple_call_traits
{
typedef T value_type;
typedef T& reference;
typedef const T& const_reference;
typedef const T param_type;
};
template <class T>
struct reference_call_traits
{
typedef T value_type;
typedef T reference;
typedef T const_reference;
typedef T param_type;
};
template <bool pointer, bool arithmetic, bool reference>
struct call_traits_chooser
{
template <class T>
struct rebind
{
typedef standard_call_traits<T> type;
};
};
template <>
struct call_traits_chooser<true, false, false>
{
template <class T>
struct rebind
{
typedef simple_call_traits<T> type;
};
};
template <>
struct call_traits_chooser<false, false, true>
{
template <class T>
struct rebind
{
typedef reference_call_traits<T> type;
};
};
template <bool size_is_small>
struct call_traits_sizeof_chooser2
{
template <class T>
struct small_rebind
{
typedef simple_call_traits<T> small_type;
};
};
template<>
struct call_traits_sizeof_chooser2<false>
{
template <class T>
struct small_rebind
{
typedef standard_call_traits<T> small_type;
};
};
template <>
struct call_traits_chooser<false, true, false>
{
template <class T>
struct rebind
{
enum { sizeof_choice = (sizeof(T) <= sizeof(void*)) };
typedef call_traits_sizeof_chooser2<(sizeof(T) <= sizeof(void*))> chooser;
typedef typename chooser::template small_rebind<T> bound_type;
typedef typename bound_type::small_type type;
};
};
} // namespace detail
template <typename T>
struct call_traits
{
private:
typedef detail::call_traits_chooser<
::boost::is_pointer<T>::value,
::boost::is_arithmetic<T>::value,
::boost::is_reference<T>::value
> chooser;
typedef typename chooser::template rebind<T> bound_type;
typedef typename bound_type::type call_traits_type;
public:
typedef typename call_traits_type::value_type value_type;
typedef typename call_traits_type::reference reference;
typedef typename call_traits_type::const_reference const_reference;
typedef typename call_traits_type::param_type param_type;
};
#else
//
// sorry call_traits is completely non-functional
// blame your broken compiler:
//
template <typename T>
struct call_traits
{
typedef T value_type;
typedef T& reference;
typedef const T& const_reference;
typedef const T& param_type;
};
#endif // member templates
}
#endif // BOOST_OB_CALL_TRAITS_HPP

View File

@@ -0,0 +1,510 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
// See http://www.boost.org/libs/utility for most recent version including documentation.
// see libs/utility/compressed_pair.hpp
//
/* Release notes:
20 Jan 2001:
Fixed obvious bugs (David Abrahams)
07 Oct 2000:
Added better single argument constructor support.
03 Oct 2000:
Added VC6 support (JM).
23rd July 2000:
Additional comments added. (JM)
Jan 2000:
Original version: this version crippled for use with crippled compilers
- John Maddock Jan 2000.
*/
#ifndef BOOST_OB_COMPRESSED_PAIR_HPP
#define BOOST_OB_COMPRESSED_PAIR_HPP
#include <algorithm>
#ifndef BOOST_OBJECT_TYPE_TRAITS_HPP
#include <boost/type_traits/object_traits.hpp>
#endif
#ifndef BOOST_SAME_TRAITS_HPP
#include <boost/type_traits/same_traits.hpp>
#endif
#ifndef BOOST_CALL_TRAITS_HPP
#include <boost/call_traits.hpp>
#endif
namespace boost
{
#ifdef BOOST_MSVC6_MEMBER_TEMPLATES
//
// use member templates to emulate
// partial specialisation. Note that due to
// problems with overload resolution with VC6
// each of the compressed_pair versions that follow
// have one template single-argument constructor
// in place of two specific constructors:
//
template <class T1, class T2>
class compressed_pair;
namespace detail{
template <class A, class T1, class T2>
struct best_conversion_traits
{
typedef char one;
typedef char (&two)[2];
static A a;
static one test(T1);
static two test(T2);
enum { value = sizeof(test(a)) };
};
template <int>
struct init_one;
template <>
struct init_one<1>
{
template <class A, class T1, class T2>
static void init(const A& a, T1* p1, T2*)
{
*p1 = a;
}
};
template <>
struct init_one<2>
{
template <class A, class T1, class T2>
static void init(const A& a, T1*, T2* p2)
{
*p2 = a;
}
};
// T1 != T2, both non-empty
template <class T1, class T2>
class compressed_pair_0
{
private:
T1 _first;
T2 _second;
public:
typedef T1 first_type;
typedef T2 second_type;
typedef typename call_traits<first_type>::param_type first_param_type;
typedef typename call_traits<second_type>::param_type second_param_type;
typedef typename call_traits<first_type>::reference first_reference;
typedef typename call_traits<second_type>::reference second_reference;
typedef typename call_traits<first_type>::const_reference first_const_reference;
typedef typename call_traits<second_type>::const_reference second_const_reference;
compressed_pair_0() : _first(), _second() {}
compressed_pair_0(first_param_type x, second_param_type y) : _first(x), _second(y) {}
template <class A>
explicit compressed_pair_0(const A& val)
{
init_one<best_conversion_traits<A, T1, T2>::value>::init(val, &_first, &_second);
}
compressed_pair_0(const ::boost::compressed_pair<T1,T2>& x)
: _first(x.first()), _second(x.second()) {}
#if 0
compressed_pair_0& operator=(const compressed_pair_0& x) {
cout << "assigning compressed pair 0" << endl;
_first = x._first;
_second = x._second;
cout << "finished assigning compressed pair 0" << endl;
return *this;
}
#endif
first_reference first() { return _first; }
first_const_reference first() const { return _first; }
second_reference second() { return _second; }
second_const_reference second() const { return _second; }
void swap(compressed_pair_0& y)
{
using std::swap;
swap(_first, y._first);
swap(_second, y._second);
}
};
// T1 != T2, T2 empty
template <class T1, class T2>
class compressed_pair_1 : T2
{
private:
T1 _first;
public:
typedef T1 first_type;
typedef T2 second_type;
typedef typename call_traits<first_type>::param_type first_param_type;
typedef typename call_traits<second_type>::param_type second_param_type;
typedef typename call_traits<first_type>::reference first_reference;
typedef typename call_traits<second_type>::reference second_reference;
typedef typename call_traits<first_type>::const_reference first_const_reference;
typedef typename call_traits<second_type>::const_reference second_const_reference;
compressed_pair_1() : T2(), _first() {}
compressed_pair_1(first_param_type x, second_param_type y) : T2(y), _first(x) {}
template <class A>
explicit compressed_pair_1(const A& val)
{
init_one<best_conversion_traits<A, T1, T2>::value>::init(val, &_first, static_cast<T2*>(this));
}
compressed_pair_1(const ::boost::compressed_pair<T1,T2>& x)
: T2(x.second()), _first(x.first()) {}
#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
// Total weirdness. If the assignment to _first is moved after
// the call to the inherited operator=, then this breaks graph/test/graph.cpp
// by way of iterator_adaptor.
compressed_pair_1& operator=(const compressed_pair_1& x) {
_first = x._first;
T2::operator=(x);
return *this;
}
#endif
first_reference first() { return _first; }
first_const_reference first() const { return _first; }
second_reference second() { return *this; }
second_const_reference second() const { return *this; }
void swap(compressed_pair_1& y)
{
// no need to swap empty base class:
using std::swap;
swap(_first, y._first);
}
};
// T1 != T2, T1 empty
template <class T1, class T2>
class compressed_pair_2 : T1
{
private:
T2 _second;
public:
typedef T1 first_type;
typedef T2 second_type;
typedef typename call_traits<first_type>::param_type first_param_type;
typedef typename call_traits<second_type>::param_type second_param_type;
typedef typename call_traits<first_type>::reference first_reference;
typedef typename call_traits<second_type>::reference second_reference;
typedef typename call_traits<first_type>::const_reference first_const_reference;
typedef typename call_traits<second_type>::const_reference second_const_reference;
compressed_pair_2() : T1(), _second() {}
compressed_pair_2(first_param_type x, second_param_type y) : T1(x), _second(y) {}
template <class A>
explicit compressed_pair_2(const A& val)
{
init_one<best_conversion_traits<A, T1, T2>::value>::init(val, static_cast<T1*>(this), &_second);
}
compressed_pair_2(const ::boost::compressed_pair<T1,T2>& x)
: T1(x.first()), _second(x.second()) {}
#if 0
compressed_pair_2& operator=(const compressed_pair_2& x) {
cout << "assigning compressed pair 2" << endl;
T1::operator=(x);
_second = x._second;
cout << "finished assigning compressed pair 2" << endl;
return *this;
}
#endif
first_reference first() { return *this; }
first_const_reference first() const { return *this; }
second_reference second() { return _second; }
second_const_reference second() const { return _second; }
void swap(compressed_pair_2& y)
{
// no need to swap empty base class:
using std::swap;
swap(_second, y._second);
}
};
// T1 != T2, both empty
template <class T1, class T2>
class compressed_pair_3 : T1, T2
{
public:
typedef T1 first_type;
typedef T2 second_type;
typedef typename call_traits<first_type>::param_type first_param_type;
typedef typename call_traits<second_type>::param_type second_param_type;
typedef typename call_traits<first_type>::reference first_reference;
typedef typename call_traits<second_type>::reference second_reference;
typedef typename call_traits<first_type>::const_reference first_const_reference;
typedef typename call_traits<second_type>::const_reference second_const_reference;
compressed_pair_3() : T1(), T2() {}
compressed_pair_3(first_param_type x, second_param_type y) : T1(x), T2(y) {}
template <class A>
explicit compressed_pair_3(const A& val)
{
init_one<best_conversion_traits<A, T1, T2>::value>::init(val, static_cast<T1*>(this), static_cast<T2*>(this));
}
compressed_pair_3(const ::boost::compressed_pair<T1,T2>& x)
: T1(x.first()), T2(x.second()) {}
first_reference first() { return *this; }
first_const_reference first() const { return *this; }
second_reference second() { return *this; }
second_const_reference second() const { return *this; }
void swap(compressed_pair_3& y)
{
// no need to swap empty base classes:
}
};
// T1 == T2, and empty
template <class T1, class T2>
class compressed_pair_4 : T1
{
public:
typedef T1 first_type;
typedef T2 second_type;
typedef typename call_traits<first_type>::param_type first_param_type;
typedef typename call_traits<second_type>::param_type second_param_type;
typedef typename call_traits<first_type>::reference first_reference;
typedef typename call_traits<second_type>::reference second_reference;
typedef typename call_traits<first_type>::const_reference first_const_reference;
typedef typename call_traits<second_type>::const_reference second_const_reference;
compressed_pair_4() : T1() {}
compressed_pair_4(first_param_type x, second_param_type y) : T1(x), m_second(y) {}
// only one single argument constructor since T1 == T2
explicit compressed_pair_4(first_param_type x) : T1(x), m_second(x) {}
compressed_pair_4(const ::boost::compressed_pair<T1,T2>& x)
: T1(x.first()), m_second(x.second()) {}
first_reference first() { return *this; }
first_const_reference first() const { return *this; }
second_reference second() { return m_second; }
second_const_reference second() const { return m_second; }
void swap(compressed_pair_4& y)
{
// no need to swap empty base classes:
}
private:
T2 m_second;
};
// T1 == T2, not empty
template <class T1, class T2>
class compressed_pair_5
{
private:
T1 _first;
T2 _second;
public:
typedef T1 first_type;
typedef T2 second_type;
typedef typename call_traits<first_type>::param_type first_param_type;
typedef typename call_traits<second_type>::param_type second_param_type;
typedef typename call_traits<first_type>::reference first_reference;
typedef typename call_traits<second_type>::reference second_reference;
typedef typename call_traits<first_type>::const_reference first_const_reference;
typedef typename call_traits<second_type>::const_reference second_const_reference;
compressed_pair_5() : _first(), _second() {}
compressed_pair_5(first_param_type x, second_param_type y) : _first(x), _second(y) {}
// only one single argument constructor since T1 == T2
explicit compressed_pair_5(first_param_type x) : _first(x), _second(x) {}
compressed_pair_5(const ::boost::compressed_pair<T1,T2>& c)
: _first(c.first()), _second(c.second()) {}
first_reference first() { return _first; }
first_const_reference first() const { return _first; }
second_reference second() { return _second; }
second_const_reference second() const { return _second; }
void swap(compressed_pair_5& y)
{
using std::swap;
swap(_first, y._first);
swap(_second, y._second);
}
};
template <bool e1, bool e2, bool same>
struct compressed_pair_chooser
{
template <class T1, class T2>
struct rebind
{
typedef compressed_pair_0<T1, T2> type;
};
};
template <>
struct compressed_pair_chooser<false, true, false>
{
template <class T1, class T2>
struct rebind
{
typedef compressed_pair_1<T1, T2> type;
};
};
template <>
struct compressed_pair_chooser<true, false, false>
{
template <class T1, class T2>
struct rebind
{
typedef compressed_pair_2<T1, T2> type;
};
};
template <>
struct compressed_pair_chooser<true, true, false>
{
template <class T1, class T2>
struct rebind
{
typedef compressed_pair_3<T1, T2> type;
};
};
template <>
struct compressed_pair_chooser<true, true, true>
{
template <class T1, class T2>
struct rebind
{
typedef compressed_pair_4<T1, T2> type;
};
};
template <>
struct compressed_pair_chooser<false, false, true>
{
template <class T1, class T2>
struct rebind
{
typedef compressed_pair_5<T1, T2> type;
};
};
template <class T1, class T2>
struct compressed_pair_traits
{
private:
typedef compressed_pair_chooser<is_empty<T1>::value, is_empty<T2>::value, is_same<T1,T2>::value> chooser;
typedef typename chooser::template rebind<T1, T2> bound_type;
public:
typedef typename bound_type::type type;
};
} // namespace detail
template <class T1, class T2>
class compressed_pair : public detail::compressed_pair_traits<T1, T2>::type
{
private:
typedef typename detail::compressed_pair_traits<T1, T2>::type base_type;
public:
typedef T1 first_type;
typedef T2 second_type;
typedef typename call_traits<first_type>::param_type first_param_type;
typedef typename call_traits<second_type>::param_type second_param_type;
typedef typename call_traits<first_type>::reference first_reference;
typedef typename call_traits<second_type>::reference second_reference;
typedef typename call_traits<first_type>::const_reference first_const_reference;
typedef typename call_traits<second_type>::const_reference second_const_reference;
compressed_pair() : base_type() {}
compressed_pair(first_param_type x, second_param_type y) : base_type(x, y) {}
template <class A>
explicit compressed_pair(const A& x) : base_type(x){}
first_reference first() { return base_type::first(); }
first_const_reference first() const { return base_type::first(); }
second_reference second() { return base_type::second(); }
second_const_reference second() const { return base_type::second(); }
};
template <class T1, class T2>
inline void swap(compressed_pair<T1, T2>& x, compressed_pair<T1, T2>& y)
{
x.swap(y);
}
#else
// no partial specialisation, no member templates:
template <class T1, class T2>
class compressed_pair
{
private:
T1 _first;
T2 _second;
public:
typedef T1 first_type;
typedef T2 second_type;
typedef typename call_traits<first_type>::param_type first_param_type;
typedef typename call_traits<second_type>::param_type second_param_type;
typedef typename call_traits<first_type>::reference first_reference;
typedef typename call_traits<second_type>::reference second_reference;
typedef typename call_traits<first_type>::const_reference first_const_reference;
typedef typename call_traits<second_type>::const_reference second_const_reference;
compressed_pair() : _first(), _second() {}
compressed_pair(first_param_type x, second_param_type y) : _first(x), _second(y) {}
explicit compressed_pair(first_param_type x) : _first(x), _second() {}
// can't define this in case T1 == T2:
// explicit compressed_pair(second_param_type y) : _first(), _second(y) {}
first_reference first() { return _first; }
first_const_reference first() const { return _first; }
second_reference second() { return _second; }
second_const_reference second() const { return _second; }
void swap(compressed_pair& y)
{
using std::swap;
swap(_first, y._first);
swap(_second, y._second);
}
};
template <class T1, class T2>
inline void swap(compressed_pair<T1, T2>& x, compressed_pair<T1, T2>& y)
{
x.swap(y);
}
#endif
} // boost
#endif // BOOST_OB_COMPRESSED_PAIR_HPP

View File

@@ -1,443 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Indirect Iterator Adaptor Documentation</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<img src="../../c++boost.gif" alt="c++boost.gif (8819 bytes)" align=
"center" width="277" height="86">
<h1>Indirect Iterator Adaptor</h1>
Defined in header <a href=
"../../boost/iterator_adaptors.hpp">boost/iterator_adaptors.hpp</a>
<p>The indirect iterator adaptor augments an iterator by applying an
<b>extra</b> dereference inside of <tt>operator*()</tt>. For example, this
iterator makes it possible to view a container of pointers or
smart-pointers (e.g. <tt>std::list&lt;boost::shared_ptr&lt;foo&gt;
&gt;</tt>) as if it were a container of the pointed-to type. The following
<b>pseudo-code</b> shows the basic idea of the indirect iterator:
<blockquote>
<pre>
// inside a hypothetical indirect_iterator class...
typedef std::iterator_traits&lt;BaseIterator&gt;::value_type Pointer;
typedef std::iterator_traits&lt;Pointer&gt;::reference reference;
reference indirect_iterator::operator*() const {
return **this-&gt;base_iterator;
}
</pre>
</blockquote>
<h2>Synopsis</h2>
<blockquote>
<pre>
namespace boost {
template &lt;class BaseIterator,
class Value, class Reference, class Category, class Pointer&gt;
struct indirect_iterator_generator;
template &lt;class BaseIterator,
class Value, class Reference, class ConstReference,
class Category, class Pointer, class ConstPointer&gt;
struct indirect_iterator_pair_generator;
template &lt;class BaseIterator&gt;
typename indirect_iterator_generator&lt;BaseIterator&gt;::type
make_indirect_iterator(BaseIterator base)
}
</pre>
</blockquote>
<hr>
<h2><a name="indirect_iterator_generator">The Indirect Iterator Type
Generator</a></h2>
The <tt>indirect_iterator_generator</tt> template is a <a href=
"../../more/generic_programming.html#type_generator">generator</a> of
indirect iterator types. The main template parameter for this class is the
<tt>BaseIterator</tt> type that is being wrapped. In most cases the type of
the elements being pointed to can be deduced using
<tt>std::iterator_traits</tt>, but in some situations the user may want to
override this type, so there are also template parameters that allow a user
to control the <tt>value_type</tt>, <tt>pointer</tt>, and
<tt>reference</tt> types of the resulting iterators.
<blockquote>
<pre>
template &lt;class BaseIterator,
class Value, class Reference, class Pointer&gt;
class indirect_iterator_generator
{
public:
typedef <tt><a href=
"./iterator_adaptors.htm#iterator_adaptor">iterator_adaptor</a>&lt;...&gt;</tt> type; // the resulting indirect iterator type
};
</pre>
</blockquote>
<h3>Example</h3>
This example uses the <tt>indirect_iterator_generator</tt> to create
indirect iterators which dereference the pointers stored in the
<tt>pointers_to_chars</tt> array to access the <tt>char</tt>s in the
<tt>characters</tt> array.
<blockquote>
<pre>
#include &lt;boost/config.hpp&gt;
#include &lt;vector&gt;
#include &lt;iostream&gt;
#include &lt;iterator&gt;
#include &lt;boost/iterator_adaptors.hpp&gt;
int main(int, char*[])
{
char characters[] = "abcdefg";
const int N = sizeof(characters)/sizeof(char) - 1; // -1 since characters has a null char
char* pointers_to_chars[N]; // at the end.
for (int i = 0; i &lt; N; ++i)
pointers_to_chars[i] = &amp;characters[i];
boost::indirect_iterator_generator&lt;char**, char&gt;::type
indirect_first(pointers_to_chars), indirect_last(pointers_to_chars + N);
std::copy(indirect_first, indirect_last, std::ostream_iterator&lt;char&gt;(std::cout, ","));
std::cout &lt;&lt; std::endl;
// to be continued...
</pre>
</blockquote>
<h3>Template Parameters</h3>
<table border>
<tr>
<th>Parameter
<th>Description
<tr>
<td><tt>BaseIterator</tt>
<td>The iterator type being wrapped. The <tt>value_type</tt>
of the base iterator should itself be dereferenceable.
The return type of the <tt>operator*</tt> for the
<tt>value_type</tt> should match the <tt>Reference</tt> type.
<tr>
<td><tt>Value</tt>
<td>The <tt>value_type</tt> of the resulting iterator, unless const. If
Value is <tt>const X</tt>, a conforming compiler makes the
<tt>value_type</tt> <tt><i>non-</i>const X</tt><a href=
"iterator_adaptors.htm#1">[1]</a>. Note that if the default
is used for <tt>Value</tt>, then there must be a valid specialization
of <tt>iterator_traits</tt> for the value type of the base iterator.
<br>
<b>Default:</b> <tt>std::iterator_traits&lt;<br>
<20> std::iterator_traits&lt;BaseIterator&gt;::value_type
&gt;::value_type</tt><a href="#2">[2]</a>
<tr>
<td><tt>Reference</tt>
<td>The <tt>reference</tt> type of the resulting iterator, and in
particular, the result type of <tt>operator*()</tt>.<br>
<b>Default:</b> <tt>Value&amp;</tt>
<tr>
<td><tt>Pointer</tt>
<td>The <tt>pointer</tt> type of the resulting iterator, and in
particular, the result type of <tt>operator-&gt;()</tt>.<br>
<b>Default:</b> <tt>Value*</tt>
<tr>
<td><tt>Category</tt>
<td>The <tt>iterator_category</tt> type for the resulting iterator.<br>
<b>Default:</b>
<tt>std::iterator_traits&lt;BaseIterator&gt;::iterator_category</tt>
</table>
<h3>Concept Model</h3>
The indirect iterator will model whichever <a href=
"http://www.sgi.com/tech/stl/Iterators.html">standard iterator
concept category</a> is modeled by the base iterator. Thus, if the
base iterator is a model of <a href=
"http://www.sgi.com/tech/stl/RandomAccessIterator.html">Random
Access Iterator</a> then so is the resulting indirect iterator. If
the base iterator models a more restrictive concept, the resulting
indirect iterator will model the same concept <a href="#3">[3]</a>.
<h3>Members</h3>
The indirect iterator type implements the member functions and operators
required of the <a href=
"http://www.sgi.com/tech/stl/RandomAccessIterator.html">Random Access
Iterator</a> concept. In addition it has the following constructor:
<pre>
explicit indirect_iterator_generator::type(const BaseIterator&amp; it)
</pre>
<br>
<br>
<hr>
<p>
<h2><a name="indirect_iterator_pair_generator">The Indirect Iterator Pair
Generator</a></h2>
Sometimes a pair of <tt>const</tt>/non-<tt>const</tt> pair of iterators is
needed, such as when implementing a container. The
<tt>indirect_iterator_pair_generator</tt> class makes it more convenient to
create this pair of iterator types.
<blockquote>
<pre>
template &lt;class BaseIterator,
class Value, class Pointer, class Reference,
class ConstPointer, class ConstReference&gt;
class indirect_iterator_pair_generator
{
public:
typedef <tt><a href=
"./iterator_adaptors.htm#iterator_adaptor">iterator_adaptor</a>&lt;...&gt;</tt> iterator; // the mutable indirect iterator type
typedef <tt><a href=
"./iterator_adaptors.htm#iterator_adaptor">iterator_adaptor</a>&lt;...&gt;</tt> const_iterator; // the immutable indirect iterator type
};
</pre>
</blockquote>
<h3>Example</h3>
<blockquote>
<pre>
// continuing from the last example...
typedef boost::indirect_iterator_pair_generator&lt;char**,
char, char*, char&amp;, const char*, const char&amp;&gt; PairGen;
char mutable_characters[N];
char* pointers_to_mutable_chars[N];
for (int i = 0; i &lt; N; ++i)
pointers_to_mutable_chars[i] = &amp;mutable_characters[i];
PairGen::iterator mutable_indirect_first(pointers_to_mutable_chars),
mutable_indirect_last(pointers_to_mutable_chars + N);
PairGen::const_iterator const_indirect_first(pointers_to_chars),
const_indirect_last(pointers_to_chars + N);
std::transform(const_indirect_first, const_indirect_last,
mutable_indirect_first, std::bind1st(std::plus&lt;char&gt;(), 1));
std::copy(mutable_indirect_first, mutable_indirect_last,
std::ostream_iterator&lt;char&gt;(std::cout, ","));
std::cout &lt;&lt; std::endl;
// to be continued...
</pre>
</blockquote>
<p>The output is:
<blockquote>
<pre>
b,c,d,e,f,g,h,
</pre>
</blockquote>
<h3>Template Parameters</h3>
<table border>
<tr>
<th>Parameter
<th>Description
<tr>
<td><tt>BaseIterator</tt>
<td>The iterator type being wrapped. The <tt>value_type</tt> of the
base iterator should itself be dereferenceable.
The return type of the <tt>operator*</tt> for the
<tt>value_type</tt> should match the <tt>Reference</tt> type.
<tr>
<td><tt>Value</tt>
<td>The <tt>value_type</tt> of the resulting iterators.
If Value is <tt>const X</tt>, a conforming compiler makes the
<tt>value_type</tt> <tt><i>non-</i>const X</tt><a href=
"iterator_adaptors.htm#1">[1]</a>. Note that if the default
is used for <tt>Value</tt>, then there must be a valid
specialization of <tt>iterator_traits</tt> for the value type
of the base iterator.<br>
<b>Default:</b> <tt>std::iterator_traits&lt;<br>
<20> std::iterator_traits&lt;BaseIterator&gt;::value_type
&gt;::value_type</tt><a href="#2">[2]</a>
<tr>
<td><tt>Reference</tt>
<td>The <tt>reference</tt> type of the resulting <tt>iterator</tt>, and
in particular, the result type of its <tt>operator*()</tt>.<br>
<b>Default:</b> <tt>Value&amp;</tt>
<tr>
<td><tt>Pointer</tt>
<td>The <tt>pointer</tt> type of the resulting <tt>iterator</tt>, and
in particular, the result type of its <tt>operator-&gt;()</tt>.<br>
<b>Default:</b> <tt>Value*</tt>
<tr>
<td><tt>ConstReference</tt>
<td>The <tt>reference</tt> type of the resulting
<tt>const_iterator</tt>, and in particular, the result type of its
<tt>operator*()</tt>.<br>
<b>Default:</b> <tt>const Value&amp;</tt>
<tr>
<td><tt>ConstPointer</tt>
<td>The <tt>pointer</tt> type of the resulting <tt>const_iterator</tt>,
and in particular, the result type of its <tt>operator-&gt;()</tt>.<br>
<b>Default:</b> <tt>const Value*</tt>
<tr>
<td><tt>Category</tt>
<td>The <tt>iterator_category</tt> type for the resulting iterator.<br>
<b>Default:</b>
<tt>std::iterator_traits&lt;BaseIterator&gt;::iterator_category</tt>
</table>
<h3>Concept Model</h3>
The indirect iterators will model whichever <a href=
"http://www.sgi.com/tech/stl/Iterators.html">standard iterator
concept category</a> is modeled by the base iterator. Thus, if the
base iterator is a model of <a href=
"http://www.sgi.com/tech/stl/RandomAccessIterator.html">Random
Access Iterator</a> then so are the resulting indirect
iterators. If the base iterator models a more restrictive concept,
the resulting indirect iterators will model the same concept <a
href="#3">[3]</a>.
<h3>Members</h3>
The resulting <tt>iterator</tt> and <tt>const_iterator</tt> types implement
the member functions and operators required of the <a href=
"http://www.sgi.com/tech/stl/RandomAccessIterator.html">Random Access
Iterator</a> concept. In addition they support the following constructors:
<blockquote>
<pre>
explicit indirect_iterator_pair_generator::iterator(const BaseIterator&amp; it)
explicit indirect_iterator_pair_generator::const_iterator(const BaseIterator&amp; it)
</pre>
</blockquote>
<br>
<br>
<hr>
<p>
<h2><a name="make_indirect_iterator">The Indirect Iterator Object
Generator</a></h2>
The <tt>make_indirect_iterator()</tt> function provides a more convenient
way to create indirect iterator objects. The function saves the user the
trouble of explicitly writing out the iterator types.
<blockquote>
<pre>
template &lt;class BaseIterator&gt;
typename indirect_iterator_generator&lt;BaseIterator&gt;::type
make_indirect_iterator(BaseIterator base)
</pre>
</blockquote>
<h3>Example</h3>
Here we again print the <tt>char</tt>s from the array <tt>characters</tt>
by accessing them through the array of pointers <tt>pointer_to_chars</tt>,
but this time we use the <tt>make_indirect_iterator()</tt> function which
saves us some typing.
<blockquote>
<pre>
// continuing from the last example...
std::copy(boost::make_indirect_iterator(pointers_to_chars),
boost::make_indirect_iterator(pointers_to_chars + N),
std::ostream_iterator&lt;char&gt;(std::cout, ","));
std::cout &lt;&lt; std::endl;
return 0;
}
</pre>
</blockquote>
The output is:
<blockquote>
<pre>
a,b,c,d,e,f,g,
</pre>
</blockquote>
<hr>
<h3>Notes</h3>
<p>
<p><a name="2">[2]</a> If your compiler does not support partial
specialization and the base iterator or its <tt>value_type</tt> is a
builtin pointer type, you will not be able to use the default for
<tt>Value</tt> and will need to specify this type explicitly.
<p><a name="3">[3]</a>There is a caveat to which concept the
indirect iterator can model. If the return type of the
<tt>operator*</tt> for the base iterator's value type is not a
true reference, then strickly speaking, the indirect iterator can
not be a model of <a href=
"http://www.sgi.com/tech/stl/ForwardIterator.html">Forward
Iterator</a> or any of the concepts that refine it. In this case
the <tt>Category</tt> for the indirect iterator should be
specified as <tt>std::input_iterator_tag</tt>. However, even in
this case, if the base iterator is a random access iterator, the
resulting indirect iterator will still satisfy most of the
requirements for <a href=
"http://www.sgi.com/tech/stl/RandomAccessIterator.html">Random
Access Iterator</a>.
<hr>
<p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan -->18 Feb 2001<!--webbot bot="Timestamp" endspan i-checksum="14389" -->
<p>&copy; Copyright Jeremy Siek and David Abrahams 2001. Permission to
copy, use, modify, sell and distribute this document is granted provided
this copyright notice appears in all copies. This document is provided "as
is" without express or implied warranty, and with no claim as to its
suitability for any purpose.
<!-- LocalWords: html charset alt gif hpp BaseIterator const namespace struct
-->
<!-- LocalWords: ConstPointer ConstReference typename iostream int abcdefg
-->
<!-- LocalWords: sizeof PairGen pre Jeremy Siek David Abrahams
-->
</body>
</html>