Compare commits

..

308 Commits

Author SHA1 Message Date
0fc602069f This commit was manufactured by cvs2svn to create branch 'mplbook'.
[SVN r21831]
2004-01-19 20:45:34 +00:00
99891db75c last nights intense scramble to get a revision ready for the C++ std committee
[SVN r21828]
2004-01-19 18:52:48 +00:00
287c7ed0e7 Fixed some formatting.
[SVN r21824]
2004-01-18 21:21:06 +00:00
8bd881070c added changes from indirect iterator
[SVN r21823]
2004-01-18 21:18:22 +00:00
9cce6e8052 Finished 9.46 and fixed the ReST.
[SVN r21822]
2004-01-18 21:04:11 +00:00
b6068667c9 Fixed base() to always return const&. Cleaned up iterator_adaptor
specification of inheritance and base class parameters.


[SVN r21821]
2004-01-18 20:54:59 +00:00
309f741588 blah
[SVN r21818]
2004-01-18 20:44:10 +00:00
858e0e0c0b new file
[SVN r21817]
2004-01-18 20:26:02 +00:00
01fd0c92e3 initial commit
[SVN r21816]
2004-01-18 20:14:06 +00:00
23dcc53fed Add typos issue
[SVN r21815]
2004-01-18 20:13:23 +00:00
08cd7bf6e7 blah
[SVN r21814]
2004-01-18 20:09:56 +00:00
35c14adc12 initial commit
[SVN r21813]
2004-01-18 20:04:59 +00:00
3b992521af removed the word "options"
[SVN r21812]
2004-01-18 20:04:24 +00:00
646e78dc14 added transform_iterator_ref.diff's to 9.37
[SVN r21811]
2004-01-18 19:57:58 +00:00
4a7f6afd6a initial commit
[SVN r21810]
2004-01-18 19:56:39 +00:00
8294e14664 added smart pointer issue
[SVN r21809]
2004-01-18 19:53:29 +00:00
1102c88de7 removed an unchanged line
[SVN r21808]
2004-01-18 19:40:32 +00:00
c98620a552 new file
[SVN r21807]
2004-01-18 19:38:51 +00:00
24fcaed649 removed obsolete comment about istreambuf_iterator
[SVN r21806]
2004-01-18 19:23:42 +00:00
2c1eadfea3 added numbers for the new issues
also added new issue about transform iter


[SVN r21805]
2004-01-18 18:57:02 +00:00
ffe87e904f Changed contact witt. Fixed typo.
[SVN r21804]
2004-01-18 17:04:54 +00:00
fbd5da7237 Removed reference to numeri types.
[SVN r21803]
2004-01-18 17:02:58 +00:00
ecccc89a70 Updated contact details witt.
[SVN r21802]
2004-01-18 16:41:20 +00:00
2bacc663b1 vc6 workaround and a bugfix
[SVN r21799]
2004-01-18 16:17:39 +00:00
c5dc0fbf0e Updated contact details witt.
[SVN r21797]
2004-01-18 15:51:06 +00:00
f358cf3bf4 Fixed typo. Fixed operator- Returns clause.
[SVN r21796]
2004-01-18 14:52:21 +00:00
6b00e8e0ca fixed bug in copy constructor of iterator_archetype, base was not
being copy constructed


[SVN r21785]
2004-01-16 18:46:08 +00:00
5abf4d7556 Added iterator_archetype doc.
[SVN r21783]
2004-01-16 18:31:09 +00:00
8ca421c140 Disabled default construction for iterator archetypes that are not forward traversal iterators
[SVN r21781]
2004-01-16 06:18:44 +00:00
1e3da4b77f Return base by const&
[SVN r21775]
2004-01-15 19:06:25 +00:00
7c784ad112 Base returns by const&
[SVN r21773]
2004-01-15 19:02:46 +00:00
f72d264b6b changed the element type to be different from the index type to bring out more errors
[SVN r21771]
2004-01-15 19:01:38 +00:00
c6526fc609 fixed the value_type and reference
[SVN r21770]
2004-01-15 19:01:03 +00:00
3741fa77d2 changed m_iterator to m_elt and changed semantics of base() to return m_order
[SVN r21768]
2004-01-15 18:51:59 +00:00
ca70d5dee8 small change to models section with respect to interop
[SVN r21767]
2004-01-15 18:50:43 +00:00
85ad1f59da removed the use of += and + on a non-random access iterator
[SVN r21766]
2004-01-15 18:49:05 +00:00
73e6736566 removed use of std::distance and std::advance
also simplified the implementation by using the index iterator as
the base instead of the element iterator


[SVN r21765]
2004-01-15 18:48:35 +00:00
c08cc33394 Added thomas' interoperability idea
[SVN r21762]
2004-01-15 17:08:04 +00:00
8c3ed628dc Handled the rest of my issues.
[SVN r21752]
2004-01-15 04:31:50 +00:00
792acdb408 small linguistic cleanups
[SVN r21747]
2004-01-15 00:06:57 +00:00
c3fd7076c1 Applied use of iterator-category to specialized adapters
[SVN r21745]
2004-01-15 00:01:33 +00:00
33f630beca deleted the paragraph about iterator_traversal that was the result of my confusion
[SVN r21744]
2004-01-14 23:50:59 +00:00
f1f6262be7 Fixed up definition of facade's iterator_category
fixed table widths in new-iter-concepts

cross-referenced interoperability concept in iterator_facade_tutorial

iterator_traversal can't satisfy UnaryTypeTrait: that's a boolean trait.


[SVN r21742]
2004-01-14 23:23:54 +00:00
42147b9e86 added more rationale to the operator-> issue
[SVN r21739]
2004-01-14 20:29:51 +00:00
2854c5c761 added pseudo-code for facade_iterator_category type function
[SVN r21736]
2004-01-14 19:57:11 +00:00
731576fbfe updates
[SVN r21735]
2004-01-14 18:04:41 +00:00
36329b053d Issue 9.23, 9.35
[SVN r21734]
2004-01-14 17:32:12 +00:00
3b93bb25ff Issue 9.26
[SVN r21733]
2004-01-14 17:15:32 +00:00
2496402a8c changed use of interoperable to say "if and only if"
also changed models section in indirect_iterator to mention
  iterator_traversal<>::type in addition to iterator_category


[SVN r21732]
2004-01-14 17:04:04 +00:00
8a0e9a4fe5 updated as per Dave's comments (about Interoperable Iterators)
[SVN r21730]
2004-01-14 14:25:45 +00:00
5049bcdce5 some changes to Interoperable Iterators as per Dave's comments
[SVN r21729]
2004-01-14 14:23:38 +00:00
1c77a5a4ab fix typo
[SVN r21723]
2004-01-14 04:48:53 +00:00
9c42ccb0bd Undo regressions
[SVN r21721]
2004-01-14 04:38:14 +00:00
dd50d3f2ab More progress on indirect_iterator
[SVN r21720]
2004-01-14 04:16:27 +00:00
5f3b97ceff added more examples
[SVN r21719]
2004-01-14 03:56:16 +00:00
2d1e40bd20 made some changes to InteroperableIteratorConcept to match the current
docs, as per suggestions from Dave and Thomas


[SVN r21718]
2004-01-14 03:44:45 +00:00
a0bb423311 added test for InteroperableIteratorConcept
[SVN r21717]
2004-01-14 03:43:48 +00:00
0f8c236e9d Some progress on indirect_iterator
[SVN r21710]
2004-01-13 23:03:18 +00:00
736044938d added interoperability to permutation iterator
[SVN r21707]
2004-01-13 21:22:34 +00:00
983ba32def changes from Thomas for Interoperable Iterators
[SVN r21706]
2004-01-13 21:18:09 +00:00
d2dae62215 removed same diff type req from Interoperator
and did some work on permutation iterator


[SVN r21705]
2004-01-13 21:00:31 +00:00
9540444061 Some progress on indirect_iterator
[SVN r21704]
2004-01-13 20:22:58 +00:00
482c0cf52b changed comments about inheritance overspec
[SVN r21702]
2004-01-13 19:58:23 +00:00
849f01a0d1 added use of interoperable with to specialized iterators
[SVN r21701]
2004-01-13 19:55:24 +00:00
11770763df a couple small edits to the iterator adaptor tutorial
[SVN r21700]
2004-01-13 19:35:41 +00:00
df66940f0f added another valid expression to Interoperable Iterators
[SVN r21699]
2004-01-13 19:25:15 +00:00
80f6a13e79 added Interoperable Iterators
[SVN r21698]
2004-01-13 19:21:18 +00:00
0f8aa07e5c Kill off outer cv-stripping of Dereferenceable
[SVN r21696]
2004-01-13 19:18:42 +00:00
6b77e7f8bd added that Interoperable Iterator refines Single Pass Iterator
[SVN r21694]
2004-01-13 19:02:19 +00:00
838decca95 chagned the name from InteroperatorConcept to InteroperatorIteratorConcept
[SVN r21693]
2004-01-13 18:56:36 +00:00
e6c5b80afd uncommented the constrains on the operations for InteroperableIteratorConcept
(also changed the name)


[SVN r21692]
2004-01-13 18:52:30 +00:00
e7b5604ec5 fixed a transform_iterator issue
[SVN r21688]
2004-01-13 18:30:23 +00:00
ea3baba376 changed the stuff about iterator_category in reverse_iterator to match
the language we decided on for filter_iterator


[SVN r21687]
2004-01-13 18:17:27 +00:00
c6a5b7c292 changed algorithm for iterator_facade::iterator_category
and for filter_iterator


[SVN r21686]
2004-01-13 18:09:30 +00:00
45e90e0134 switched to using the no_proxy version of input_iterator_archetype
[SVN r21685]
2004-01-13 18:06:08 +00:00
18b1414d6c changed iterator_facade_default_category to stop lying about output_iterator_tag
[SVN r21683]
2004-01-13 18:04:13 +00:00
7facdd8590 simplified make_filter_iterator
also regen html using newer rst


[SVN r21682]
2004-01-13 15:59:47 +00:00
6cf1230c13 tweaked the models section of counting_iterator
[SVN r21678]
2004-01-13 14:22:39 +00:00
d70b0d3f05 fix from Dave, removed req. for Readable Iterator from reverse_iterator
[SVN r21677]
2004-01-13 14:14:47 +00:00
527b5e3caa more fixes from Dave
[SVN r21676]
2004-01-13 14:10:54 +00:00
4e1b53ed36 added the requirement that Predicate be a class (not a function pointer)
to one of filter iterator's constructors


[SVN r21675]
2004-01-13 13:53:34 +00:00
eb69638be1 unspecified instead of implementation defined
[SVN r21674]
2004-01-13 13:51:28 +00:00
a5c4497c01 Separate scanning of .rst and .tex files
[SVN r21673]
2004-01-13 13:38:19 +00:00
1033aeb186 tweaks
[SVN r21672]
2004-01-13 13:36:55 +00:00
e5d502d2f8 tweaks
[SVN r21671]
2004-01-13 13:12:45 +00:00
55e4fe2ab7 Fix abstract formatting
[SVN r21670]
2004-01-13 12:54:41 +00:00
8e2d210d42 Various fixups
[SVN r21669]
2004-01-13 12:51:08 +00:00
ec8d069057 more work on the specification of iterator_category
[SVN r21662]
2004-01-13 05:56:29 +00:00
2edb688882 further edits to filter_iterator's iterator_category
[SVN r21661]
2004-01-13 05:19:22 +00:00
3403cbbae6 fixes to iterator_category spec for filter_iterator
[SVN r21660]
2004-01-13 03:20:14 +00:00
b52b9325ba regen the html
[SVN r21659]
2004-01-13 02:58:21 +00:00
1e3b131a84 some changes from Dave
[SVN r21658]
2004-01-13 02:53:04 +00:00
250a374e07 changes as per Dave's comments
[SVN r21656]
2004-01-13 02:15:04 +00:00
f618d71c0e generating html
[SVN r21653]
2004-01-13 00:29:42 +00:00
3d37ba5120 updated abstract for counting iterator
[SVN r21652]
2004-01-13 00:27:51 +00:00
e785cc70d1 some major changes to the requirements/models section of counting_iterator
[SVN r21651]
2004-01-12 21:18:52 +00:00
3bf52ec2f2 Finished iterator_adaptor tutorial
Added example test code
Rolled forward old counting_iterator abstract for boost docs.


[SVN r21649]
2004-01-12 20:58:22 +00:00
19dbb5304c I forget
[SVN r21648]
2004-01-12 20:50:44 +00:00
4d13c285ea updated to match the changes to the standards proposal
[SVN r21647]
2004-01-12 20:43:30 +00:00
08ce6903ce resolved Howards issue about a->m
[SVN r21646]
2004-01-12 20:31:44 +00:00
75e76eb637 added member typedefs to reverse_iterator spec
[SVN r21645]
2004-01-12 20:26:36 +00:00
954d12a04d indenting, and forgot to say on the last checkin, added member typedefs
[SVN r21644]
2004-01-12 20:19:50 +00:00
bcc0e80439 improved the models section of transform iterator to discuss old iterator
categories


[SVN r21643]
2004-01-12 20:18:41 +00:00
436f7411f8 resolved the istreambuf_iterator/reference issue
[SVN r21642]
2004-01-12 20:03:47 +00:00
21381f3fa7 removed constraints on reference from Readable Iterator
[SVN r21641]
2004-01-12 19:54:57 +00:00
db9d88ad7b updated some issues for indirect_iterator
[SVN r21640]
2004-01-12 19:30:48 +00:00
6085e03da0 resolved some issues with counting_iterator
[SVN r21639]
2004-01-12 19:01:57 +00:00
b2407b0191 resolved some issues with transform iterator
[SVN r21638]
2004-01-12 18:38:32 +00:00
8181625365 resolved issue with reverse iterator abstract
[SVN r21637]
2004-01-12 18:31:01 +00:00
24052c3dff a couple edits
[SVN r21636]
2004-01-12 18:07:12 +00:00
c15707fd70 added requirements on the Base argument
[SVN r21635]
2004-01-12 18:03:04 +00:00
b4f1b069be Really re-resolved title level problem
A few minor edits


[SVN r21634]
2004-01-12 18:02:50 +00:00
129815f3dd added links to example source code
[SVN r21632]
2004-01-12 16:10:29 +00:00
a7eaa017b1 Fixed general formatting, re-resolved title level problem,
acknowledged Keith MacDonald for inspiring the tutorial.


[SVN r21631]
2004-01-12 16:05:15 +00:00
6e326921f9 moved from utility
[SVN r21630]
2004-01-12 16:00:57 +00:00
4a3fd9984d filled out some missing operator--, added a comment about the operations and concepts,
and added some text to the indirect iterator example


[SVN r21629]
2004-01-12 15:53:04 +00:00
0074f50573 fixed problem with V, C, R, D
[SVN r21628]
2004-01-12 15:26:20 +00:00
ba8dc44eac new file
[SVN r21627]
2004-01-12 15:20:01 +00:00
b0d3d34fcd small edit to emphasize where the iterator adaptor and facade docs are
[SVN r21626]
2004-01-12 15:14:26 +00:00
7f0ed4f5be resolved title level problem
[SVN r21625]
2004-01-12 15:02:21 +00:00
7fc54ec2d8 a couple small edits to the iterator facade tutorial
[SVN r21620]
2004-01-12 04:36:23 +00:00
f0add8a043 added base() function to the interface of the specialized adaptors
[SVN r21619]
2004-01-12 04:17:26 +00:00
5b608e114b added example to permutation iterator, and also the make_... function
[SVN r21616]
2004-01-12 03:41:47 +00:00
06e1fa88b9 tutorial updates
[SVN r21615]
2004-01-12 02:49:55 +00:00
a6b2a098c1 new file
[SVN r21614]
2004-01-12 01:53:23 +00:00
4f0684ffac fixed a typo
[SVN r21613]
2004-01-12 01:52:47 +00:00
fbfcf97e18 some progress on transform_iterator
[SVN r21612]
2004-01-12 01:51:27 +00:00
45b6a92f61 added make_xxx functions for some of the iterators
[SVN r21611]
2004-01-12 01:30:47 +00:00
c6814925ac some progress
[SVN r21610]
2004-01-12 00:48:21 +00:00
6c114a539d changed models section
[SVN r21609]
2004-01-12 00:14:12 +00:00
b6c82968b8 new file
[SVN r21605]
2004-01-11 17:48:31 +00:00
2271aceab8 improvements to the spec
[SVN r21604]
2004-01-11 17:46:42 +00:00
0db07e9455 added concept checks
[SVN r21603]
2004-01-11 17:45:33 +00:00
f158591054 added const to dummyT for readable_lvalue
[SVN r21601]
2004-01-11 17:28:45 +00:00
1b210355bf added bodies to functions to prevent linker errors
[SVN r21600]
2004-01-11 17:27:59 +00:00
075c341a37 added const to operator*
[SVN r21599]
2004-01-11 16:54:00 +00:00
bab25c04db added some missing peices to the spec
[SVN r21598]
2004-01-11 16:40:48 +00:00
2a60dfa087 progress on filter iterator
[SVN r21594]
2004-01-11 15:46:34 +00:00
ef69c73e89 added some concept checks
[SVN r21593]
2004-01-11 15:45:16 +00:00
bf9534e1ee Changed the constructor parameter to be a const reference.
[SVN r21592]
2004-01-11 15:43:29 +00:00
0e11bd6a0c added some more tests
[SVN r21591]
2004-01-11 15:13:07 +00:00
ff10cfd5dc Fix case of is_pod.hpp
[SVN r21589]
2004-01-11 15:11:52 +00:00
400f35cbb0 fixed some bugs
[SVN r21588]
2004-01-11 15:09:26 +00:00
59340bca4c Began tutorial and examples.
[SVN r21584]
2004-01-11 01:02:36 +00:00
6c62f31f0a Updated pointee and indirect_reference so that pointee represents the
immutability of the pointed-to type via const qualification.  The
pointee of a proxy-based iterator will be const qualified unless a
mutable reference to the value_type can be bound to the returned
proxy.

Added a test for pointee

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

Updated iterator_facade operator[] docs for accuracy.

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


[SVN r21579]
2004-01-11 00:03:09 +00:00
dd5fb425fa updates
[SVN r21577]
2004-01-10 19:00:48 +00:00
c903cf4801 resolved a cvs confict in merge
added a rationale note about indirect_iterator requirements muddled


[SVN r21576]
2004-01-10 18:05:19 +00:00
1c26f7dd43 ETI workarounds for vc6
[SVN r21547]
2004-01-08 14:57:59 +00:00
c546a3e875 Intel8 GCC-spoofing workaround
[SVN r21531]
2004-01-07 15:21:57 +00:00
2183de96a1 Reverted unwanted checkin.
[SVN r21520]
2004-01-06 19:44:06 +00:00
fb1fc6f909 *** empty log message ***
[SVN r21519]
2004-01-06 19:37:17 +00:00
20b31d1cca Added traits:
is_incrementable.hpp: checks whether ++x is well-formed

   pointee.hpp: value_type of iterators or smart pointers

   indirect_reference.hpp: reference type of iterators or smart pointers

indirect_iterator.hpp
indirect_iterator_member_types.cpp

   Use pointee/indirect_reference to select value/reference type.

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

minimum_category.hpp: Better error messages for vc6

indirect_iterator_test.cpp: Workarounds for compilers without SFINAE

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

zip_iterator_test.hpp: Added missing #include

Jamfile: made zip_iterator test pass with vc6/stlport


[SVN r21514]
2004-01-06 17:35:36 +00:00
f716d705c5 change to iterator_traits for custom pointer
[SVN r21483]
2004-01-04 18:44:54 +00:00
1fca93be10 first stab at simplified version
[SVN r21482]
2004-01-04 18:44:29 +00:00
f96a2b3d81 removed referent, use iterator_traits for smart pointers too
[SVN r21481]
2004-01-04 18:17:32 +00:00
a7edd713d8 added no_traversal_tag
[SVN r21480]
2004-01-04 18:03:13 +00:00
bca1c2dea5 Added my name to some issues, fixed more of the formatting.
[SVN r21479]
2004-01-04 17:08:56 +00:00
dfad37d0f9 added indirect_iterator_member_types.cpp
[SVN r21478]
2004-01-04 16:35:22 +00:00
3376955b80 added a test with no defaults
[SVN r21477]
2004-01-04 16:15:55 +00:00
e98b130d77 fixed a bug in get_from_iter
[SVN r21476]
2004-01-04 16:07:58 +00:00
a450053b0a no change
[SVN r21475]
2004-01-04 16:07:24 +00:00
0b5b315a7f Re-ReST-ify
[SVN r21474]
2004-01-04 14:10:44 +00:00
5cc31f6539 removed inheritance, specified member types explicitly
[SVN r21471]
2004-01-04 04:29:50 +00:00
f0248daa1e a few edits
[SVN r21470]
2004-01-04 04:27:43 +00:00
798562e75b fixed a bug in default_indirect_value
[SVN r21469]
2004-01-04 04:26:23 +00:00
68e7d3f0d5 new file
[SVN r21468]
2004-01-03 22:58:56 +00:00
e9bb297ed2 ReST-ified
[SVN r21467]
2004-01-03 21:55:25 +00:00
d5e525dd19 added my name to a bunch of them
[SVN r21465]
2004-01-03 20:39:39 +00:00
c326818764 intel 8.0 workaround
[SVN r21464]
2004-01-03 20:38:58 +00:00
57ec457f32 replaced old list with Matt's list, and added some missing ones
[SVN r21463]
2004-01-03 20:31:48 +00:00
c04b13641f GCC-3.1 deque iterator no-interop workaround.
[SVN r21461]
2004-01-03 20:21:41 +00:00
0bf570c98d Workaround for older EDGs
[SVN r21455]
2004-01-03 16:00:49 +00:00
28dfcbd6b0 Fixes for gcc-3.4
[SVN r21453]
2004-01-03 02:47:08 +00:00
9338b11799 Fix tabs in file.
[SVN r21399]
2003-12-26 23:26:49 +00:00
ad5defc9af edits to take into account that the access requirements for Iterator are not
determined by the CategoryOrTraversal tag. The access req. is just readable.


[SVN r21343]
2003-12-19 21:20:36 +00:00
81242ad5ae further edits attempting to get the requirements section right
[SVN r21341]
2003-12-19 16:47:47 +00:00
8997a587e9 VC 7.1 workaround
[SVN r21320]
2003-12-18 11:31:25 +00:00
83de27a445 change from "same as" to "convertible to"
[SVN r21309]
2003-12-17 20:16:46 +00:00
44d7dfeb9b more edits
[SVN r21307]
2003-12-17 19:32:31 +00:00
84f22cde8d a little progress with indirect iterator
[SVN r21294]
2003-12-16 22:15:48 +00:00
9387c05d12 some edits
[SVN r21293]
2003-12-16 22:10:51 +00:00
66feb45676 finished adding all the issues form the reflector
[SVN r21292]
2003-12-16 20:43:27 +00:00
bdbfcd308e starting dumping some issues in here
[SVN r21291]
2003-12-16 17:04:15 +00:00
44757cfcc1 Fixed typo
[SVN r21240]
2003-12-12 16:42:51 +00:00
c1be620888 Fix vc7.1 workaround. Beman reports vc8 working on this case.
[SVN r21228]
2003-12-11 15:27:16 +00:00
36d9a73a60 Workaround vc7.1 bug
[SVN r21223]
2003-12-11 13:37:09 +00:00
f14701232a Fix const/non-const interop for transform_iterator
[SVN r21172]
2003-12-07 20:33:18 +00:00
296ce3aa89 const/non-const interoperability.
[SVN r21171]
2003-12-07 20:28:30 +00:00
1f7c08615f Added BOOST_NO_SFINAE config macro, removed internal version from
the iterator library


[SVN r21125]
2003-12-03 19:26:15 +00:00
1b29ec1741 Fixed issue with "writable iterators must include in their
documentation..."


[SVN r21082]
2003-12-02 14:44:43 +00:00
593311f43e Cleaned up some of Jeremy's wording. Added a few comments on changes
from the accepted paper.  Committed Python doc regeneration scripts.


[SVN r21079]
2003-12-02 13:10:55 +00:00
fe52e0d665 updated to match .rst
[SVN r21059]
2003-12-02 03:12:04 +00:00
52e34b2e26 removed iterator_tag and reworded some paragraphs
[SVN r21046]
2003-12-01 16:38:36 +00:00
8cfa950f10 moved a paragraph about algorithm changes
[SVN r21043]
2003-12-01 15:02:48 +00:00
cc282d81c0 vc6 workaround
[SVN r21007]
2003-11-29 21:02:45 +00:00
8c01469b3c Fixes for libs without numeric_limits<wchar_t> specializations.
[SVN r21006]
2003-11-29 18:19:24 +00:00
a6ffdb8ebf More warning suppression
[SVN r20996]
2003-11-28 16:25:35 +00:00
2ad29da3b5 Bcc564 workaround
[SVN r20995]
2003-11-28 16:21:15 +00:00
459387273b Minor doc fixes
[SVN r20933]
2003-11-24 05:13:03 +00:00
09ea8d27e2 Documentation updates, added GNUMakefile for building
[SVN r20931]
2003-11-24 05:02:46 +00:00
ca1ee306b7 Remove bogus check for use_default
[SVN r20926]
2003-11-23 17:07:36 +00:00
b63814d3f2 Check *implicit* convertibility from reference to value
[SVN r20925]
2003-11-23 17:07:04 +00:00
dfc09c4b26 Make sure a precise copy of n1550 is in the CVS.
[SVN r20908]
2003-11-22 13:57:57 +00:00
f6715137cf vc6 workaround
[SVN r20906]
2003-11-22 03:20:17 +00:00
f18906ac6b 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
522195fd64 Stop making the incorrect assumption that x == j[n] is legitimate
whenever x = j[n] and x == x are.  j[n] may be a proxy convertible to
typeof(x) and x == x may use a templated operator==, which wouldn't
match the proxy.


[SVN r20887]
2003-11-20 21:36:54 +00:00
bdc1304326 Got everything working with GCC
[SVN r20864]
2003-11-19 20:08:00 +00:00
633bb0762e new version
[SVN r20852]
2003-11-19 01:24:28 +00:00
b0b5699a01 added more stuff about removing iterator_tag
[SVN r20851]
2003-11-19 01:23:55 +00:00
943d2c872b removing iterator_tag
[SVN r20850]
2003-11-19 01:05:00 +00:00
4ec68b7a0e Note missing link
[SVN r20845]
2003-11-18 16:03:24 +00:00
e295f71a85 fix emacs-o
#2


[SVN r20840]
2003-11-18 03:04:15 +00:00
a8a68dbb7b fix emacs-o
[SVN r20839]
2003-11-18 03:02:40 +00:00
8d5717081e Factor out any_conversion_eater
[SVN r20838]
2003-11-18 03:00:39 +00:00
76880f6ce2 initial commit
[SVN r20837]
2003-11-18 02:58:15 +00:00
50e645261c responses to Dave's comments
[SVN r20835]
2003-11-17 20:21:40 +00:00
f25ff7a1a4 Edits for clarity and correctness.
[SVN r20831]
2003-11-17 17:15:26 +00:00
104faa5ab3 new file
[SVN r20830]
2003-11-17 16:52:29 +00:00
4cc5f9a4d6 iterator_categories reformed, test added
[SVN r20829]
2003-11-17 16:52:15 +00:00
7946d32cef added my name to the Author list
[SVN r20828]
2003-11-17 16:33:28 +00:00
69d8856572 major revision, narrowed the focus of the paper
[SVN r20826]
2003-11-17 16:24:29 +00:00
c055f1afae fixed typo
[SVN r20805]
2003-11-13 18:18:23 +00:00
cb34b65f3f Fix missing is_readable_iterator test
Fix naming for is_lvalue_iterator and is_mutable_lvalue_iterator


[SVN r20772]
2003-11-10 04:13:16 +00:00
f8cd96cb2e Added
[SVN r20771]
2003-11-10 04:07:26 +00:00
fed5967d9d checkpoint
[SVN r20728]
2003-11-07 19:03:58 +00:00
81870ac8b6 progress
[SVN r20691]
2003-11-06 03:07:31 +00:00
6ef3e5d1c7 Added is_readable_iterator, is_writable_iterator tests and preliminary issues document
[SVN r20686]
2003-11-05 21:48:16 +00:00
dfa751077a Added is_lvalue_iterator
[SVN r20632]
2003-11-04 08:03:29 +00:00
14134e4610 Revert attempted fix for MSVC 6, which broke Borland
[SVN r20618]
2003-11-03 22:04:07 +00:00
c7bec1cf56 A little extra qualification to help out MSVC 6
[SVN r20606]
2003-11-02 19:51:23 +00:00
e888f18b5a Edits for committee meeting, moving algorithm changes to suggestions for WP.
[SVN r20568]
2003-10-30 21:11:10 +00:00
15abd4c56e removed algorithm changes
[SVN r20567]
2003-10-30 19:10:02 +00:00
17026cc30d Fixed is-writable computation. Traits protocol still needs fixing.
[SVN r20398]
2003-10-16 13:57:35 +00:00
1c39976ccd Correct broken #include
[SVN r20231]
2003-09-30 12:22:56 +00:00
361f62d022 Add V2 Jamfile
[SVN r20211]
2003-09-29 16:27:55 +00:00
ebb09db44e Separate access and traversal for iterator_adaptor
[SVN r20162]
2003-09-22 19:55:01 +00:00
50fe1b062b fixed another small bug in inherit-category
[SVN r20161]
2003-09-22 16:51:02 +00:00
30ca43dd08 fixed bug in inherit-category that Thomas found
[SVN r20160]
2003-09-22 16:48:40 +00:00
ac0c6461fb small edits
[SVN r20159]
2003-09-22 16:32:56 +00:00
d85b8db0aa added more design rationale, and moved some text
[SVN r20158]
2003-09-22 16:28:27 +00:00
a3856b5c60 Typos
[SVN r20157]
2003-09-22 16:24:44 +00:00
20e2818844 fixed iterator_tag in first part to match iterator_tag in the second part
[SVN r20156]
2003-09-22 16:07:24 +00:00
d68ac3db4c hierarchy->group
[SVN r20155]
2003-09-22 16:04:44 +00:00
5efcabf3bd small change to iterator_tag body
[SVN r20154]
2003-09-22 15:55:22 +00:00
9ac583096c added the paper number and resolved some conflicts
[SVN r20152]
2003-09-22 15:45:58 +00:00
1710c484b3 Table formatting tweaks for PDF/tex generation.
Some minor editing for language improvements.


[SVN r20151]
2003-09-22 15:10:34 +00:00
f6cbffeda0 updated to match the rst file
[SVN r20150]
2003-09-22 13:58:20 +00:00
50ab635593 Changed email address.
[SVN r20148]
2003-09-22 08:43:20 +00:00
d958a5bc82 change to lvalue stuff and changing access tag to enum and bits
[SVN r20145]
2003-09-22 04:57:00 +00:00
5339d7a9d4 Reverted change to traversal category.
[SVN r20131]
2003-09-21 11:13:46 +00:00
fd29e538ed Minor grammatical correction + comment
[SVN r20130]
2003-09-21 09:17:31 +00:00
1c41a7d0ec some edits based on comments from Howard Hinnant
[SVN r20125]
2003-09-21 00:30:15 +00:00
85873e924a some minor edits
[SVN r20124]
2003-09-20 23:43:30 +00:00
d9b4e41d5a Made transform_iterator documentation refer to result_of.
[SVN r20123]
2003-09-20 21:30:10 +00:00
4968b50fc2 Remove outdated comment; use boost::detail::iterator_traits instead of
std::iterator_traits exclusively.


[SVN r20117]
2003-09-19 18:44:53 +00:00
cbeb7f0632 fixed up copyrights, some small progress on new adaptor category choice semantics
[SVN r20047]
2003-09-14 02:17:41 +00:00
abf8390020 Fix the implementation of operator_arrow_result so that it checks the
reference type instead of the category.


[SVN r20046]
2003-09-14 01:53:59 +00:00
2c89e2b15a initial commit
[SVN r19978]
2003-09-09 03:22:50 +00:00
3f49409843 Use the import rule
[SVN r19968]
2003-09-08 17:38:49 +00:00
abafc5d1be Added missing lambda support for broken compilers
[SVN r19936]
2003-09-06 14:24:01 +00:00
2b7ed5f7a8 Added traversal_category and access_category specializations for MPL lambda support
[SVN r19921]
2003-09-04 21:15:38 +00:00
f801c39a59 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
bb7ac6bd84 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
f325582c40 some fixes to writable iterators
[SVN r19609]
2003-08-14 20:05:44 +00:00
36feca8a52 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
a5179f6dfc clean up formatting
[SVN r19476]
2003-08-06 14:36:16 +00:00
f98f3497b8 generated output
[SVN r19468]
2003-08-05 19:48:41 +00:00
76af84c0e7 factoring the specialized iterator adaptors
[SVN r19467]
2003-08-05 19:42:37 +00:00
0f42b93c3b factored iterator adaptor stuff and a few other edits
[SVN r19465]
2003-08-05 18:19:55 +00:00
19977c757f factored iterator facade stuff into several files
[SVN r19464]
2003-08-05 16:36:51 +00:00
508696a169 initial commit
[SVN r19349]
2003-07-29 22:25:39 +00:00
3ab9da6a99 Added dividers
[SVN r19348]
2003-07-29 22:24:57 +00:00
bd3312cdf2 Add empty :alt: field for the logo so it doesn't produce document
title text


[SVN r19347]
2003-07-29 21:20:39 +00:00
87f93ec521 initial commit
[SVN r19345]
2003-07-29 16:11:14 +00:00
afa92675a2 Fixed struct/class mixup in indirect_iterator declaration.
[SVN r19249]
2003-07-22 07:56:08 +00:00
ed8c60c20b Improved category handling in iterator_adaptor.
[SVN r19231]
2003-07-20 19:18:40 +00:00
3fe0d4b532 * Use boost::referent<> metafunction for detecting the value type of
indirect_iterator.

* Change the order of tests in the Jamfile so expected failures come
  last, accounting for some recent Boost.Build change I suppose.


[SVN r19158]
2003-07-16 19:35:46 +00:00
8a51271e3b deque libcomo workaround
[SVN r19143]
2003-07-16 10:36:53 +00:00
52c0d22cff Bugfixes and workarounds
[SVN r19121]
2003-07-14 23:05:57 +00:00
e4447b8e83 Bug fix for code not being exercised currently.
[SVN r19118]
2003-07-14 21:31:44 +00:00
42e873e10c various bugfixes. filter_/transform_iterator were misusing enable_if
in a non-template context , and iterator_facade needed a forward
declaration for full conformance.


[SVN r19112]
2003-07-14 16:22:10 +00:00
57a40c8cd2 Added arg dependent workaround for msvc < 7.1
[SVN r19110]
2003-07-14 13:13:49 +00:00
a982c42303 Various updates and clarifications.
[SVN r19106]
2003-07-13 22:47:15 +00:00
9db269bb5b iterator-categories.html is obsolete.
[SVN r19103]
2003-07-13 21:50:30 +00:00
e5eaaf6a55 Fix detail::enable_if -> iterators::enable_if (really this time)
^


[SVN r19102]
2003-07-13 21:45:33 +00:00
2225787093 Fix detail::enable_if -> iterator::enable_if
[SVN r19101]
2003-07-13 20:22:47 +00:00
f19c1c4059 Moved enable_if to boost::iterators from boost::detail to avoid
conflicting with the definition in the function library.


[SVN r19092]
2003-07-13 01:27:38 +00:00
b0aef5a66d Fixup some tables. Restore the equivalence between readable
single-pass iterator and input iterator by restricting the allowed
return type of r++.


[SVN r19091]
2003-07-12 20:16:49 +00:00
dfc43d81cf Fix a couple of typos
[SVN r19089]
2003-07-12 16:39:19 +00:00
eda969d7b5 add "subproject" line
[SVN r19086]
2003-07-12 10:41:38 +00:00
4c8415a99f 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
1d6f36e35d Move to new iterator adaptors
[SVN r19074]
2003-07-11 22:18:58 +00:00
04301ac6e9 Workaround some CWPro8 bugs
[SVN r19072]
2003-07-11 22:16:52 +00:00
a1ec9da737 Moved to boost/iterator (new version)
[SVN r19026]
2003-07-10 12:58:28 +00:00
e2a47bdbe5 Moved to boost/iterator
[SVN r19025]
2003-07-10 12:52:06 +00:00
2b1fc22b61 Move to Iterator Adapters from sand-box
[SVN r19024]
2003-07-10 12:49:49 +00:00
273ec4b975 BOOST_NO_MPL_AUX_HAS_XXX -> BOOST_MPL_NO_AUX_HAS_XXX
[SVN r18974]
2003-07-08 05:10:04 +00:00
4716891117 Move from boost-sandbox
[SVN r18960]
2003-07-07 14:26:16 +00:00
80d9e8e4c1 Move from boost-sandbox
[SVN r18959]
2003-07-07 14:20:34 +00:00
53eb5346de Move from boost-sanbox [ JDG ]
[SVN r18958]
2003-07-07 14:14:36 +00:00
e28ca345ea added copyright/license
[SVN r18836]
2003-06-18 13:20:02 +00:00
92d461cda1 Removed unused #include
[SVN r18474]
2003-05-20 23:20:49 +00:00
8dace06f04 add or update See www.boost.org comments
[SVN r16708]
2002-12-27 16:51:53 +00:00
ef0bff57d3 Use BOOST_WORKAROUND
[SVN r16528]
2002-12-06 19:09:22 +00:00
5bacd289b6 Roll back MPL v2 fix as it's no longer needed and was breaking Borland
[SVN r15264]
2002-09-11 14:46:40 +00:00
77c1698c6e mpl_v2 branch checkin
[SVN r15258]
2002-09-11 05:35:41 +00:00
2c302ee549 operator[] workaround from "Yitzhak Sapir" <yitzhaks@actimize.com>
[SVN r15244]
2002-09-09 21:15:41 +00:00
a586f20d19 Added Shared Container Iterator adaptor to iterator adaptor library.
[SVN r15169]
2002-09-05 14:05:29 +00:00
11 changed files with 68 additions and 2660 deletions

View File

@ -1,229 +0,0 @@
// (C) Copyright David Abrahams and Jeremy Siek 2000-2001. Permission to copy,
// use, modify, sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided "as is"
// without express or implied warranty, and with no claim as to its suitability
// for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
//
// Supplies:
//
// template <class Incrementable> class counting_iterator_traits;
// template <class Incrementable> class counting_iterator_policies;
//
// Iterator traits and policies for adapted iterators whose dereferenced
// value progresses through consecutive values of Incrementable when the
// iterator is derferenced.
//
// template <class Incrementable> struct counting_iterator_generator;
//
// A "type generator" whose nested type "type" is a counting iterator as
// described above.
//
// template <class Incrementable>
// typename counting_iterator_generator<Incrementable>::type
// make_counting_iterator(Incrementable);
//
// A function which produces an adapted counting iterator over values of
// Incrementable.
//
// Revision History
// 14 Feb 2001 Removed unnecessary typedefs from counting_iterator_traits
// (Jeremy Siek)
// 11 Feb 2001 Use BOOST_STATIC_CONSTANT (Dave Abrahams)
// 11 Feb 2001 Clean up after John Maddocks's (finally effective!) Borland
// fixes (David Abrahams).
// 10 Feb 2001 Use new iterator_adaptor<> interface (David Abrahams)
// 10 Feb 2001 Rolled in supposed Borland fixes from John Maddock, but not
// seeing any improvement yet (David Abrahams)
// 09 Feb 2001 Factored out is_numeric computation. Borland still
// unhappy :( (David Abrahams)
// 08 Feb 2001 Beginning of a failed attempt to appease Borland
// (David Abrahams)
// 07 Feb 2001 rename counting_iterator() -> make_counting_iterator()
// (David Abrahams)
// 04 Feb 2001 Added counting_iterator_generator; updated comments
// (David Abrahams)
// 24 Jan 2001 initial revision, based on Jeremy Siek's
// boost/pending/integer_range.hpp (David Abrahams)
#ifndef BOOST_COUNTING_ITERATOR_HPP_DWA20000119
# define BOOST_COUNTING_ITERATOR_HPP_DWA20000119
# include <boost/config.hpp>
# include <boost/detail/iterator.hpp>
# include <boost/iterator_adaptors.hpp>
# include <boost/type_traits.hpp>
# include <boost/detail/numeric_traits.hpp>
# include <boost/static_assert.hpp>
# include <boost/limits.hpp>
namespace boost {
namespace detail {
// Template class counting_iterator_traits_select -- choose an
// iterator_category and difference_type for a counting_iterator at
// compile-time based on whether or not it wraps an integer or an iterator,
// using "poor man's partial specialization".
template <bool is_integer> struct counting_iterator_traits_select;
// Incrementable is an iterator type
template <>
struct counting_iterator_traits_select<false>
{
template <class Incrementable>
struct traits
{
private:
typedef boost::detail::iterator_traits<Incrementable> x;
public:
typedef typename x::iterator_category iterator_category;
typedef typename x::difference_type difference_type;
};
};
// Incrementable is a numeric type
template <>
struct counting_iterator_traits_select<true>
{
template <class Incrementable>
struct traits
{
typedef typename
boost::detail::numeric_traits<Incrementable>::difference_type
difference_type;
typedef std::random_access_iterator_tag iterator_category;
};
};
// Template class distance_policy_select -- choose a policy for computing the
// distance between counting_iterators at compile-time based on whether or not
// the iterator wraps an integer or an iterator, using "poor man's partial
// specialization".
template <bool is_integer> struct distance_policy_select;
// A policy for wrapped iterators
template <>
struct distance_policy_select<false>
{
template <class Distance, class Incrementable>
struct policy {
static Distance distance(Incrementable x, Incrementable y)
{ return boost::detail::distance(x, y); }
};
};
// A policy for wrapped numbers
template <>
struct distance_policy_select<true>
{
template <class Distance, class Incrementable>
struct policy {
static Distance distance(Incrementable x, Incrementable y)
{ return numeric_distance(x, y); }
};
};
// Try to detect numeric types at compile time in ways compatible with the
// limitations of the compiler and library.
template <class T>
struct is_numeric {
// For a while, this wasn't true, but we rely on it below. This is a regression assert.
BOOST_STATIC_ASSERT(::boost::is_integral<char>::value);
# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
# if defined(BOOST_HAS_LONG_LONG)
BOOST_STATIC_CONSTANT(bool,
value = (
std::numeric_limits<T>::is_specialized
| boost::is_same<T,long long>::value
| boost::is_same<T,unsigned long long>::value));
# else
BOOST_STATIC_CONSTANT(bool, value = std::numeric_limits<T>::is_specialized);
# endif
# else
# if !defined(__BORLANDC__)
BOOST_STATIC_CONSTANT(bool, value = (
boost::is_convertible<int,T>::value && boost::is_convertible<T,int>::value));
# else
BOOST_STATIC_CONSTANT(bool, value = ::boost::is_arithmetic<T>::value);
# endif
# endif
};
// Compute the distance over arbitrary numeric and/or iterator types
template <class Distance, class Incrementable>
Distance any_distance(Incrementable start, Incrementable finish, Distance* = 0)
{
return distance_policy_select<(
is_numeric<Incrementable>::value)>::template
policy<Distance, Incrementable>::distance(start, finish);
}
} // namespace detail
template <class Incrementable>
struct counting_iterator_traits {
private:
typedef ::boost::detail::counting_iterator_traits_select<(
::boost::detail::is_numeric<Incrementable>::value
)> binder;
typedef typename binder::template traits<Incrementable> traits;
public:
typedef typename traits::difference_type difference_type;
typedef typename traits::iterator_category iterator_category;
};
template <class Incrementable>
struct counting_iterator_policies : public default_iterator_policies
{
template <class IteratorAdaptor>
typename IteratorAdaptor::reference dereference(const IteratorAdaptor& i) const
{ return i.base(); }
template <class Iterator1, class Iterator2>
typename Iterator1::difference_type distance(
const Iterator1& x, const Iterator2& y) const
{
typedef typename Iterator1::difference_type difference_type;
return boost::detail::any_distance<difference_type>(
x.base(), y.base());
}
};
// A type generator for counting iterators
template <class Incrementable>
struct counting_iterator_generator
{
typedef typename boost::remove_const<
Incrementable
>::type value_type;
typedef counting_iterator_traits<value_type> traits;
typedef iterator_adaptor<
value_type
, counting_iterator_policies<value_type>
, value_type
, value_type const&
, value_type const*
, typename traits::iterator_category
, typename traits::difference_type
> type;
};
// Manufacture a counting iterator for an arbitrary incrementable type
template <class Incrementable>
inline typename counting_iterator_generator<Incrementable>::type
make_counting_iterator(Incrementable x)
{
typedef typename counting_iterator_generator<Incrementable>::type result_t;
return result_t(x);
}
} // namespace boost
#endif // BOOST_COUNTING_ITERATOR_HPP_DWA20000119

View File

@ -1,55 +0,0 @@
// (C) Copyright Jeremy Siek 2001. Permission to copy, use, modify,
// sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
// Revision History:
// 27 Feb 2001 Jeremy Siek
// Initial checkin.
#ifndef BOOST_FUNCTION_OUTPUT_ITERATOR_HPP
#define BOOST_FUNCTION_OUTPUT_ITERATOR_HPP
#include <iterator>
namespace boost {
template <class UnaryFunction>
class function_output_iterator {
typedef function_output_iterator self;
public:
typedef std::output_iterator_tag iterator_category;
typedef void value_type;
typedef void difference_type;
typedef void pointer;
typedef void reference;
explicit function_output_iterator(const UnaryFunction& f = UnaryFunction())
: m_f(f) {}
struct output_proxy {
output_proxy(UnaryFunction& f) : m_f(f) { }
template <class T> output_proxy& operator=(const T& value) {
m_f(value);
return *this;
}
UnaryFunction& m_f;
};
output_proxy operator*() { return output_proxy(m_f); }
self& operator++() { return *this; }
self& operator++(int) { return *this; }
private:
UnaryFunction m_f;
};
template <class UnaryFunction>
inline function_output_iterator<UnaryFunction>
make_function_output_iterator(const UnaryFunction& f = UnaryFunction()) {
return function_output_iterator<UnaryFunction>(f);
}
} // namespace boost
#endif // BOOST_FUNCTION_OUTPUT_ITERATOR_HPP

View File

@ -1,426 +0,0 @@
// (C) Copyright Jeremy Siek and David Abrahams 2000-2001. Permission to copy,
// use, modify, sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided "as is"
// without express or implied warranty, and with no claim as to its suitability
// for any purpose.
//
// Revision History:
// 11 Feb 2001 Use new iterator_adaptor interface, Fixes for Borland.
// (Dave Abrahams)
// 04 Feb 2001 Support for user-defined iterator categories (Dave Abrahams)
// 30 Jan 2001 Initial Checkin (Dave Abrahams)
#ifndef BOOST_HALF_OPEN_RANGE_HPP_
# define BOOST_HALF_OPEN_RANGE_HPP_
# include <boost/counting_iterator.hpp>
# include <functional>
# include <cassert>
# include <boost/operators.hpp>
# include <string>
# include <stdexcept>
# include <iterator>
namespace boost {
namespace detail {
// Template class choose_finish -- allows us to maintain the invariant that
// start() <= finish() on half_open_range specializations that support random
// access.
#ifdef __MWERKS__
template <class T>
const T& choose_finish(const T&, const T& finish, std::input_iterator_tag)
{
return finish;
}
template <class T>
const T& choose_finish(const T&, const T& finish, std::output_iterator_tag)
{
return finish;
}
template <class T>
const T& choose_finish(const T& start, const T& finish, std::random_access_iterator_tag)
{
return finish < start ? start : finish;
}
#else
template <bool is_random_access> struct finish_chooser;
template <>
struct finish_chooser<false>
{
template <class T>
struct rebind
{
static T choose(const T&, const T& finish)
{ return finish; }
};
};
template <>
struct finish_chooser<true>
{
template <class T>
struct rebind
{
static T choose(const T& start, const T& finish)
{ return finish < start ? start : finish; }
};
};
template <class Category, class Incrementable>
struct choose_finish
{
static const Incrementable choose(const Incrementable& start, const Incrementable& finish)
{
return finish_chooser<(
::boost::is_convertible<Category*,std::random_access_iterator_tag*>::value
)>::template rebind<Incrementable>::choose(start, finish);
}
};
#endif
}
template <class Incrementable>
struct half_open_range
{
typedef typename counting_iterator_generator<Incrementable>::type iterator;
private: // utility type definitions
// Using iter_t prevents compiler confusion with boost::iterator
typedef typename counting_iterator_generator<Incrementable>::type iter_t;
typedef std::less<Incrementable> less_value;
typedef typename iter_t::iterator_category category;
typedef half_open_range<Incrementable> self;
public:
typedef iter_t const_iterator;
typedef typename iterator::value_type value_type;
typedef typename iterator::difference_type difference_type;
typedef typename iterator::reference reference;
typedef typename iterator::reference const_reference;
typedef typename iterator::pointer pointer;
typedef typename iterator::pointer const_pointer;
// It would be nice to select an unsigned type, but this is appropriate
// since the library makes an attempt to select a difference_type which can
// hold the difference between any two iterators.
typedef typename iterator::difference_type size_type;
half_open_range(Incrementable start, Incrementable finish)
: m_start(start),
m_finish(
#ifndef __MWERKS__
detail::choose_finish<category,Incrementable>::choose(start, finish)
#else
detail::choose_finish(start, finish, category())
#endif
)
{}
// Implicit conversion from std::pair<Incrementable,Incrementable> allows us
// to accept the results of std::equal_range(), for example.
half_open_range(const std::pair<Incrementable,Incrementable>& x)
: m_start(x.first),
m_finish(
#ifndef __MWERKS__
detail::choose_finish<category,Incrementable>::choose(x.first, x.second)
#else
detail::choose_finish(x.first, x.second, category())
#endif
)
{}
half_open_range& operator=(const self& x)
{
m_start = x.m_start;
m_finish = x.m_finish;
return *this;
}
half_open_range& operator=(const std::pair<Incrementable,Incrementable>& x)
{
m_start = x.first;
m_finish =
#ifndef __MWERKS__
detail::choose_finish<category,Incrementable>::choose(x.first, x.second);
#else
detail::choose_finish(x.first, x.second, category();
#endif
}
iterator begin() const { return iterator(m_start); }
iterator end() const { return iterator(m_finish); }
Incrementable front() const { assert(!this->empty()); return m_start; }
Incrementable back() const { assert(!this->empty()); return boost::prior(m_finish); }
Incrementable start() const { return m_start; }
Incrementable finish() const { return m_finish; }
size_type size() const { return boost::detail::distance(begin(), end()); }
bool empty() const
{
return m_finish == m_start;
}
void swap(half_open_range& x) {
std::swap(m_start, x.m_start);
std::swap(m_finish, x.m_finish);
}
public: // functions requiring random access elements
// REQUIRES: x is reachable from this->front()
bool contains(const value_type& x) const
{
BOOST_STATIC_ASSERT((boost::is_same<category, std::random_access_iterator_tag>::value));
return !less_value()(x, m_start) && less_value()(x, m_finish);
}
bool contains(const half_open_range& x) const
{
BOOST_STATIC_ASSERT((boost::is_same<category, std::random_access_iterator_tag>::value));
return x.empty() || !less_value()(x.m_start, m_start) && !less_value()(m_finish, x.m_finish);
}
bool intersects(const half_open_range& x) const
{
BOOST_STATIC_ASSERT((boost::is_same<category, std::random_access_iterator_tag>::value));
return less_value()(
less_value()(this->m_start, x.m_start) ? x.m_start : this->m_start,
less_value()(this->m_finish, x.m_finish) ? this->m_finish : x.m_finish);
}
half_open_range& operator&=(const half_open_range& x)
{
BOOST_STATIC_ASSERT((boost::is_same<category, std::random_access_iterator_tag>::value));
if (less_value()(this->m_start, x.m_start))
this->m_start = x.m_start;
if (less_value()(x.m_finish, this->m_finish))
this->m_finish = x.m_finish;
if (less_value()(this->m_finish, this->m_start))
this->m_start = this->m_finish;
return *this;
}
half_open_range& operator|=(const half_open_range& x)
{
BOOST_STATIC_ASSERT((boost::is_same<category, std::random_access_iterator_tag>::value));
if (!x.empty())
{
if (this->empty())
{
*this = x;
}
else
{
if (less_value()(x.m_start, this->m_start))
this->m_start = x.m_start;
if (less_value()(this->m_finish, x.m_finish))
this->m_finish = x.m_finish;
}
}
return *this;
}
// REQUIRES: x is reachable from this->front()
const_iterator find(const value_type& x) const
{
BOOST_STATIC_ASSERT((boost::is_same<category, std::random_access_iterator_tag>::value));
return const_iterator(this->contains(x) ? x : m_finish);
}
// REQUIRES: index >= 0 && index < size()
value_type operator[](size_type index) const
{
assert(index >= 0 && index < size());
return m_start + index;
}
value_type at(size_type index) const
{
if (index < 0 || index >= size())
throw std::out_of_range(std::string("half_open_range"));
return m_start + index;
}
private: // data members
Incrementable m_start, m_finish;
};
template <class Incrementable>
half_open_range<Incrementable> operator|(
half_open_range<Incrementable> x,
const half_open_range<Incrementable>& y)
{
return x |= y;
}
template <class Incrementable>
half_open_range<Incrementable> operator&(
half_open_range<Incrementable> x,
const half_open_range<Incrementable>& y)
{
return x &= y;
}
template <class Incrementable>
inline bool operator==(
const half_open_range<Incrementable>& x,
const half_open_range<Incrementable>& y)
{
const bool y_empty = y.empty();
return x.empty() ? y_empty : !y_empty && x.start() == y.start() && x.finish() == y.finish();
}
template <class Incrementable>
inline bool operator!=(
const half_open_range<Incrementable>& x,
const half_open_range<Incrementable>& y)
{
return !(x == y);
}
template <class Incrementable>
inline half_open_range<Incrementable>
make_half_open_range(Incrementable first, Incrementable last)
{
return half_open_range<Incrementable>(first, last);
}
template <class Incrementable>
bool intersects(
const half_open_range<Incrementable>& x,
const half_open_range<Incrementable>& y)
{
return x.intersects(y);
}
template <class Incrementable>
bool contains(
const half_open_range<Incrementable>& x,
const half_open_range<Incrementable>& y)
{
return x.contains(y);
}
} // namespace boost
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace std {
template <class Incrementable> struct less<boost::half_open_range<Incrementable> >
: binary_function<
boost::half_open_range<Incrementable>,
boost::half_open_range<Incrementable>,bool>
{
bool operator()(
const boost::half_open_range<Incrementable>& x,
const boost::half_open_range<Incrementable>& y) const
{
less<Incrementable> cmp;
return !y.empty() && (
cmp(x.start(), y.start())
|| !cmp(y.start(), x.start())
&& cmp(x.finish(), y.finish()));
}
};
template <class Incrementable> struct less_equal<boost::half_open_range<Incrementable> >
: binary_function<
boost::half_open_range<Incrementable>,
boost::half_open_range<Incrementable>,bool>
{
bool operator()(
const boost::half_open_range<Incrementable>& x,
const boost::half_open_range<Incrementable>& y) const
{
typedef boost::half_open_range<Incrementable> range;
less<range> cmp;
return !cmp(y,x);
}
};
template <class Incrementable> struct greater<boost::half_open_range<Incrementable> >
: binary_function<
boost::half_open_range<Incrementable>,
boost::half_open_range<Incrementable>,bool>
{
bool operator()(
const boost::half_open_range<Incrementable>& x,
const boost::half_open_range<Incrementable>& y) const
{
typedef boost::half_open_range<Incrementable> range;
less<range> cmp;
return cmp(y,x);
}
};
template <class Incrementable> struct greater_equal<boost::half_open_range<Incrementable> >
: binary_function<
boost::half_open_range<Incrementable>,
boost::half_open_range<Incrementable>,bool>
{
bool operator()(
const boost::half_open_range<Incrementable>& x,
const boost::half_open_range<Incrementable>& y) const
{
typedef boost::half_open_range<Incrementable> range;
less<range> cmp;
return !cmp(x,y);
}
};
} // namespace std
#else
namespace boost {
// Can't partially specialize std::less et al, so we must provide the operators
template <class Incrementable>
bool operator<(const half_open_range<Incrementable>& x,
const half_open_range<Incrementable>& y)
{
return !y.empty() && (
x.empty() || std::less<Incrementable>()(x.start(), y.start())
|| !std::less<Incrementable>()(y.start(), x.start())
&& std::less<Incrementable>()(x.finish(), y.finish()));
}
template <class Incrementable>
bool operator>(const half_open_range<Incrementable>& x,
const half_open_range<Incrementable>& y)
{
return y < x;
}
template <class Incrementable>
bool operator<=(const half_open_range<Incrementable>& x,
const half_open_range<Incrementable>& y)
{
return !(y < x);
}
template <class Incrementable>
bool operator>=(const half_open_range<Incrementable>& x,
const half_open_range<Incrementable>& y)
{
return !(x < y);
}
} // namespace boost
#endif
#endif // BOOST_HALF_OPEN_RANGE_HPP_

View File

@ -1,60 +0,0 @@
// interator.hpp workarounds for non-conforming standard libraries ---------//
// (C) Copyright Boost.org 2000. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
// See http://www.boost.org for most recent version including documentation.
// Revision History
// 12 Jan 01 added <cstddef> for std::ptrdiff_t (Jens Maurer)
// 28 Jun 00 Workarounds to deal with known MSVC bugs (David Abrahams)
// 26 Jun 00 Initial version (Jeremy Siek)
#ifndef BOOST_ITERATOR_HPP
#define BOOST_ITERATOR_HPP
#include <iterator>
#include <cstddef> // std::ptrdiff_t
#include <boost/config.hpp>
namespace boost
{
# if defined(BOOST_NO_STD_ITERATOR) && !defined(BOOST_MSVC_STD_ITERATOR)
template <class Category, class T,
class Distance = std::ptrdiff_t,
class Pointer = T*, class Reference = T&>
struct iterator
{
typedef T value_type;
typedef Distance difference_type;
typedef Pointer pointer;
typedef Reference reference;
typedef Category iterator_category;
};
# else
// declare iterator_base in namespace detail to work around MSVC bugs which
// prevent derivation from an identically-named class in a different namespace.
namespace detail {
template <class Category, class T, class Distance, class Pointer, class Reference>
# if !defined(BOOST_MSVC_STD_ITERATOR)
struct iterator_base : std::iterator<Category, T, Distance, Pointer, Reference> {};
# else
struct iterator_base : std::iterator<Category, T, Distance>
{
typedef Reference reference;
typedef Pointer pointer;
typedef Distance difference_type;
};
# endif
}
template <class Category, class T, class Distance = std::ptrdiff_t,
class Pointer = T*, class Reference = T&>
struct iterator : detail::iterator_base<Category, T, Distance, Pointer, Reference> {};
# endif
} // namespace boost
#endif // BOOST_ITERATOR_HPP

File diff suppressed because it is too large Load Diff

View File

@ -1,75 +0,0 @@
// (C) Copyright Jeremy Siek 1999. Permission to copy, use, modify,
// sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
#ifndef BOOST_INT_ITERATOR_H
#define BOOST_INT_ITERATOR_H
#include <boost/iterator.hpp>
#if !defined BOOST_MSVC
#include <boost/operators.hpp>
#endif
#include <iostream>
//using namespace std;
#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE
namespace boost {
#endif
// this should use random_access_iterator_helper but I've had
// VC++ portablility problems with that. -JGS
template <class IntT>
class int_iterator
{
typedef int_iterator self;
public:
typedef std::random_access_iterator_tag iterator_category;
typedef IntT value_type;
typedef IntT& reference;
typedef IntT* pointer;
typedef std::ptrdiff_t difference_type;
inline int_iterator() : _i(0) { }
inline int_iterator(IntT i) : _i(i) { }
inline int_iterator(const self& x) : _i(x._i) { }
inline self& operator=(const self& x) { _i = x._i; return *this; }
inline IntT operator*() { return _i; }
inline IntT operator[](IntT n) { return _i + n; }
inline self& operator++() { ++_i; return *this; }
inline self operator++(int) { self t = *this; ++_i; return t; }
inline self& operator+=(IntT n) { _i += n; return *this; }
inline self operator+(IntT n) { self t = *this; t += n; return t; }
inline self& operator--() { --_i; return *this; }
inline self operator--(int) { self t = *this; --_i; return t; }
inline self& operator-=(IntT n) { _i -= n; return *this; }
inline IntT operator-(const self& x) const { return _i - x._i; }
inline bool operator==(const self& x) const { return _i == x._i; }
// vc++ had a problem finding != in random_access_iterator_helper
// need to look into this... for now implementing everything here -JGS
inline bool operator!=(const self& x) const { return _i != x._i; }
inline bool operator<(const self& x) const { return _i < x._i; }
inline bool operator<=(const self& x) const { return _i <= x._i; }
inline bool operator>(const self& x) const { return _i > x._i; }
inline bool operator>=(const self& x) const { return _i >= x._i; }
protected:
IntT _i;
};
template <class IntT>
inline int_iterator<IntT>
operator+(IntT n, int_iterator<IntT> t) { t += n; return t; }
#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE
} /* namespace boost */
#endif
#ifdef BOOST_NO_OPERATORS_IN_NAMESPACE
namespace boost {
using ::int_iterator;
}
#endif
#endif /* BOOST_INT_ITERATOR_H */

View File

@ -1,59 +0,0 @@
// (C) Copyright David Abrahams and Jeremy Siek 2000-2001. Permission to copy,
// use, modify, sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided "as is"
// without express or implied warranty, and with no claim as to its suitability
// for any purpose.
//
// Revision History:
// 04 Jan 2001 Factored counting_iterator stuff into
// boost/counting_iterator.hpp (David Abrahams)
#ifndef BOOST_INTEGER_RANGE_HPP_
#define BOOST_INTEGER_RANGE_HPP_
#include <boost/config.hpp>
#include <boost/counting_iterator.hpp>
namespace boost {
//=============================================================================
// Counting Iterator and Integer Range Class
template <class IntegerType>
struct integer_range {
typedef typename counting_iterator_generator<IntegerType>::type iterator;
typedef iterator const_iterator;
typedef IntegerType value_type;
typedef std::ptrdiff_t difference_type;
typedef IntegerType reference;
typedef IntegerType const_reference;
typedef const IntegerType* pointer;
typedef const IntegerType* const_pointer;
typedef IntegerType size_type;
integer_range(IntegerType start, IntegerType finish)
: m_start(start), m_finish(finish) { }
iterator begin() const { return iterator(m_start); }
iterator end() const { return iterator(m_finish); }
size_type size() const { return m_finish - m_start; }
bool empty() const { return m_finish == m_start; }
void swap(integer_range& x) {
std::swap(m_start, x.m_start);
std::swap(m_finish, x.m_finish);
}
protected:
IntegerType m_start, m_finish;
};
template <class IntegerType>
inline integer_range<IntegerType>
make_integer_range(IntegerType first, IntegerType last)
{
return integer_range<IntegerType>(first, last);
}
} // namespace boost
#endif // BOOST_INTEGER_RANGE_HPP_

View File

@ -1 +0,0 @@
#include <boost/iterator_adaptors.hpp>

View File

@ -1,253 +0,0 @@
#ifndef BOOST_ITERATOR_TESTS_HPP
# define BOOST_ITERATOR_TESTS_HPP
// This is meant to be the beginnings of a comprehensive, generic
// test suite for STL concepts such as iterators and containers.
//
// Revision History:
// 28 Apr 2002 Fixed input iterator requirements.
// For a == b a++ == b++ is no longer required.
// See 24.1.1/3 for details.
// (Thomas Witt)
// 08 Feb 2001 Fixed bidirectional iterator test so that
// --i is no longer a precondition.
// (Jeremy Siek)
// 04 Feb 2001 Added lvalue test, corrected preconditions
// (David Abrahams)
# include <iterator>
# include <assert.h>
# include <boost/type_traits.hpp>
# include <boost/static_assert.hpp>
# include <boost/concept_archetype.hpp> // for detail::dummy_constructor
namespace boost {
// use this for the value type
struct dummyT {
dummyT() { }
dummyT(detail::dummy_constructor) { }
dummyT(int x) : m_x(x) { }
int foo() const { return m_x; }
bool operator==(const dummyT& d) const { return m_x == d.m_x; }
int m_x;
};
// Tests whether type Iterator satisfies the requirements for a
// TrivialIterator.
// Preconditions: i != j, *i == val
template <class Iterator, class T>
void trivial_iterator_test(const Iterator i, const Iterator j, T val)
{
Iterator k;
assert(i == i);
assert(j == j);
assert(i != j);
#ifdef BOOST_NO_STD_ITERATOR_TRAITS
T v = *i;
#else
typename std::iterator_traits<Iterator>::value_type v = *i;
#endif
assert(v == val);
#if 0
// hmm, this will give a warning for transform_iterator... perhaps
// this should be separated out into a stand-alone test since there
// are several situations where it can't be used, like for
// integer_range::iterator.
assert(v == i->foo());
#endif
k = i;
assert(k == k);
assert(k == i);
assert(k != j);
assert(*k == val);
}
// Preconditions: i != j
template <class Iterator, class T>
void mutable_trivial_iterator_test(const Iterator i, const Iterator j, T val)
{
*i = val;
trivial_iterator_test(i, j, val);
}
// Preconditions: *i == v1, *++i == v2
template <class Iterator, class T>
void input_iterator_test(Iterator i, T v1, T v2)
{
Iterator i1(i);
assert(i == i1);
assert(!(i != i1));
// I can see no generic way to create an input iterator
// that is in the domain of== of i and != i.
// The following works for istream_iterator but is not
// guaranteed to work for arbitrary input iterators.
//
// Iterator i2;
//
// assert(i != i2);
// assert(!(i == i2));
assert(*i1 == v1);
assert(*i == v1);
// we cannot test for equivalence of (void)++i & (void)i++
// as i is only guaranteed to be single pass.
assert(*i++ == v1);
i1 = i;
assert(i == i1);
assert(!(i != i1));
assert(*i1 == v2);
assert(*i == v2);
// i is dereferencable, so it must be incrementable.
++i;
// how to test for operator-> ?
}
// how to test output iterator?
template <bool is_pointer> struct lvalue_test
{
template <class Iterator> static void check(Iterator)
{
# ifndef BOOST_NO_STD_ITERATOR_TRAITS
typedef typename std::iterator_traits<Iterator>::reference reference;
typedef typename std::iterator_traits<Iterator>::value_type value_type;
# else
typedef typename Iterator::reference reference;
typedef typename Iterator::value_type value_type;
# endif
BOOST_STATIC_ASSERT(boost::is_reference<reference>::value);
BOOST_STATIC_ASSERT((boost::is_same<reference,value_type&>::value
|| boost::is_same<reference,const value_type&>::value
));
}
};
# ifdef BOOST_NO_STD_ITERATOR_TRAITS
template <> struct lvalue_test<true> {
template <class T> static void check(T) {}
};
#endif
template <class Iterator, class T>
void forward_iterator_test(Iterator i, T v1, T v2)
{
input_iterator_test(i, v1, v2);
Iterator i1 = i, i2 = i;
assert(i == i1++);
assert(i != ++i2);
trivial_iterator_test(i, i1, v1);
trivial_iterator_test(i, i2, v1);
++i;
assert(i == i1);
assert(i == i2);
++i1;
++i2;
trivial_iterator_test(i, i1, v2);
trivial_iterator_test(i, i2, v2);
// borland doesn't allow non-type template parameters
# if !defined(__BORLANDC__) || (__BORLANDC__ > 0x551)
lvalue_test<(boost::is_pointer<Iterator>::value)>::check(i);
#endif
}
// Preconditions: *i == v1, *++i == v2
template <class Iterator, class T>
void bidirectional_iterator_test(Iterator i, T v1, T v2)
{
forward_iterator_test(i, v1, v2);
++i;
Iterator i1 = i, i2 = i;
assert(i == i1--);
assert(i != --i2);
trivial_iterator_test(i, i1, v2);
trivial_iterator_test(i, i2, v2);
--i;
assert(i == i1);
assert(i == i2);
++i1;
++i2;
trivial_iterator_test(i, i1, v1);
trivial_iterator_test(i, i2, v1);
}
// mutable_bidirectional_iterator_test
// Preconditions: [i,i+N) is a valid range
template <class Iterator, class TrueVals>
void random_access_iterator_test(Iterator i, int N, TrueVals vals)
{
bidirectional_iterator_test(i, vals[0], vals[1]);
const Iterator j = i;
int c;
for (c = 0; c < N-1; ++c) {
assert(i == j + c);
assert(*i == vals[c]);
assert(*i == j[c]);
assert(*i == *(j + c));
assert(*i == *(c + j));
++i;
assert(i > j);
assert(i >= j);
assert(j <= i);
assert(j < i);
}
Iterator k = j + N - 1;
for (c = 0; c < N-1; ++c) {
assert(i == k - c);
assert(*i == vals[N - 1 - c]);
assert(*i == j[N - 1 - c]);
Iterator q = k - c;
assert(*i == *q);
assert(i > j);
assert(i >= j);
assert(j <= i);
assert(j < i);
--i;
}
}
// Precondition: i != j
template <class Iterator, class ConstIterator>
void const_nonconst_iterator_test(Iterator i, ConstIterator j)
{
assert(i != j);
assert(j != i);
ConstIterator k(i);
assert(k == i);
assert(i == k);
k = i;
assert(k == i);
assert(i == k);
}
} // namespace boost
#endif // BOOST_ITERATOR_TESTS_HPP

View File

@ -1,72 +0,0 @@
// (C) Copyright Toon Knapen 2001. Permission to copy, use,
// modify, sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
//
#ifndef boost_permutation_iterator_hpp
#define boost_permutation_iterator_hpp
#include <boost/iterator_adaptors.hpp>
namespace boost {
template < typename IndexIterator >
struct permutation_iterator_policies : public default_iterator_policies
{
permutation_iterator_policies() {}
permutation_iterator_policies(IndexIterator order_it)
: order_it_( order_it )
{}
template <class IteratorAdaptor>
typename IteratorAdaptor::reference dereference(const IteratorAdaptor& x) const
{ return *(x.base() + *order_it_); }
template <class IteratorAdaptor>
void increment(IteratorAdaptor&)
{ ++order_it_; }
template <class IteratorAdaptor>
void decrement(IteratorAdaptor&)
{ --order_it_; }
template <class IteratorAdaptor, class DifferenceType>
void advance(IteratorAdaptor& x, DifferenceType n)
{ std::advance( order_it_, n ); }
template <class IteratorAdaptor1, class IteratorAdaptor2>
typename IteratorAdaptor1::difference_type
distance(const IteratorAdaptor1& x, const IteratorAdaptor2& y) const
{ return std::distance( x.policies().order_it_, y.policies().order_it_ ); }
template <class IteratorAdaptor1, class IteratorAdaptor2>
bool equal(const IteratorAdaptor1& x, const IteratorAdaptor2& y) const
{ return x.policies().order_it_ == y.policies().order_it_; }
IndexIterator order_it_;
};
template < typename ElementIterator, typename IndexIterator >
struct permutation_iterator_generator
{
typedef boost::iterator_adaptor
< ElementIterator,
permutation_iterator_policies< IndexIterator >
> type;
};
template < class IndexIterator, class ElementIterator >
inline typename permutation_iterator_generator< ElementIterator, IndexIterator >::type
make_permutation_iterator(ElementIterator base, IndexIterator order)
{
typedef typename permutation_iterator_generator< ElementIterator, IndexIterator >::type result_t;
return result_t( base, order );
}
} // namespace boost
#endif // boost_permutation_iterator_hpp

68
include/boost/pointee.hpp Executable file
View File

@ -0,0 +1,68 @@
// Copyright David Abrahams 2004. Use, modification and distribution is
// subject to the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef POINTEE_DWA200415_HPP
# define POINTEE_DWA200415_HPP
// dereferenceable_traits provides access to the value_type and
// reference of a Dereferenceable type.
# include <boost/detail/is_incrementable.hpp>
# include <boost/iterator/iterator_traits.hpp>
# include <boost/type_traits/add_const.hpp>
# include <boost/type_traits/remove_cv.hpp>
# include <boost/mpl/if.hpp>
# include <boost/mpl/apply_if.hpp>
namespace boost {
namespace detail
{
template <class P>
struct smart_ptr_pointee
{
typedef typename P::element_type type;
};
template <class Iterator>
struct iterator_pointee
{
typedef typename iterator_traits<Iterator>::value_type value_type;
struct impl
{
template <class T>
static char test(T const&);
static char (& test(value_type&) )[2];
static Iterator& x;
};
BOOST_STATIC_CONSTANT(bool, is_constant = sizeof(impl::test(*impl::x)) == 1);
typedef typename mpl::if_c<
# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
::boost::detail::iterator_pointee<Iterator>::is_constant
# else
is_constant
# endif
, typename add_const<value_type>::type
, value_type
>::type type;
};
}
template <class P>
struct pointee
: mpl::apply_if<
detail::is_incrementable<P>
, detail::iterator_pointee<P>
, detail::smart_ptr_pointee<P>
>
{
};
} // namespace boost
#endif // POINTEE_DWA200415_HPP