├── README.md └── docs ├── AdaptableBinaryFunction.html ├── AdaptableBinaryPredicate.html ├── AdaptableGenerator.html ├── AdaptablePredicate.html ├── AdaptableUnaryFunction.html ├── Allocators.html ├── Assignable.html ├── AssociativeContainer.html ├── BackInsertionSequence.html ├── BidirectionalIterator.html ├── BinaryFunction.html ├── BinaryPredicate.html ├── Container.html ├── CorpID.gif ├── DefaultConstructible.html ├── Deque.html ├── EqualityComparable.html ├── FAQ.html ├── ForwardContainer.html ├── ForwardIterator.html ├── FrontInsertionSequence.html ├── Generator.html ├── HashFunction.html ├── HashedAssociativeContainer.html ├── InputIterator.html ├── Iterators.html ├── LessThanComparable.html ├── List.html ├── Map.html ├── MonoidOperation.html ├── Multimap.html ├── MultipleAssociativeContainer.html ├── MultipleHashedAssociativeContainer.html ├── MultipleSortedAssociativeContainer.html ├── OutputIterator.html ├── PairAssociativeContainer.html ├── Predicate.html ├── RandomAccessContainer.html ├── RandomAccessIterator.html ├── RandomNumberGenerator.html ├── ReverseBidirectionalIterator.html ├── ReverseIterator.html ├── ReversibleContainer.html ├── Rope.html ├── Sequence.html ├── SimpleAssociativeContainer.html ├── Slist.html ├── SortedAssociativeContainer.html ├── StrictWeakOrdering.html ├── UnaryFunction.html ├── UniqueAssociativeContainer.html ├── UniqueHashedAssociativeContainer.html ├── UniqueSortedAssociativeContainer.html ├── Vector.html ├── accumulate.html ├── adaptors.gif ├── adjacent_difference.html ├── adjacent_find.html ├── advance.html ├── algo.h ├── algobase.h ├── algorithm ├── algorithms.gif ├── alloc.h ├── alloc.html ├── allocators.gif ├── back_insert_iterator.html ├── basic_string.html ├── bidirectional_iterator.html ├── bidirectional_iterator_tag.html ├── binary_compose.html ├── binary_function.html ├── binary_negate.html ├── binary_search.html ├── binder1st.html ├── binder2nd.html ├── bit_vector.html ├── bitset ├── bitset.html ├── bvector.h ├── category_dot.gif ├── char_producer.html ├── char_traits.h ├── char_traits.html ├── character_traits.html ├── complexity.html ├── concept.gif ├── concept_checks.h ├── concept_dot.gif ├── construct.html ├── container_concepts.h ├── containers.gif ├── copy.html ├── copy_backward.html ├── copy_n.html ├── count.html ├── count_if.html ├── defalloc.h ├── deque ├── deque.h ├── design_documents.html ├── destroy.html ├── distance.html ├── distance_type.html ├── divides.html ├── doc_introduction.html ├── drdobbs-interview.html ├── equal.html ├── equal_range.html ├── equal_to.html ├── fill.html ├── fill_n.html ├── find.html ├── find_end.html ├── find_first_of.html ├── find_if.html ├── for_each.html ├── forward_iterator.html ├── forward_iterator_tag.html ├── front_insert_iterator.html ├── function.gif ├── function.h ├── function_dot.gif ├── functional ├── functors.gif ├── functors.html ├── generate.html ├── generate_n.html ├── get_temporary_buffer.html ├── greater.html ├── greater_equal.html ├── grey2.gif ├── hash.html ├── hash_map ├── hash_map.h ├── hash_map.html ├── hash_multimap.html ├── hash_multiset.html ├── hash_set ├── hash_set.h ├── hash_set.html ├── hashtable.h ├── heap.h ├── identity.html ├── includes.html ├── index.html ├── inner_product.html ├── inplace_merge.html ├── input_iterator.html ├── input_iterator_tag.html ├── insert_iterator.html ├── iota.html ├── is_heap.html ├── is_sorted.html ├── istream_iterator.html ├── iter_swap.html ├── iterator ├── iterator.h ├── iterator_category.html ├── iterator_tags.html ├── iterator_traits.html ├── iterators.gif ├── less.html ├── less_equal.html ├── lexicographical_compare.html ├── lexicographical_compare_3way.html ├── limits ├── list ├── list.h ├── logical_and.html ├── logical_not.html ├── logical_or.html ├── logosmall.gif ├── lower_bound.html ├── make_heap.html ├── map ├── map.h ├── max.html ├── max_element.html ├── mem_fun1_ref_t.html ├── mem_fun1_t.html ├── mem_fun_ref_t.html ├── mem_fun_t.html ├── memory ├── merge.html ├── min.html ├── min_element.html ├── minus.html ├── mismatch.html ├── modulus.html ├── multimap.h ├── multiset.h ├── multiset.html ├── negate.html ├── next_permutation.html ├── not_equal_to.html ├── nth_element.html ├── numeric ├── operators.html ├── ostream_iterator.html ├── other_resources.html ├── output_iterator.html ├── output_iterator_tag.html ├── overview.gif ├── overview_dot.gif ├── pair.h ├── pair.html ├── partial_sort.html ├── partial_sort_copy.html ├── partial_sum.html ├── partition.html ├── plus.html ├── pointer_to_binary_function.html ├── pointer_to_unary_function.html ├── pop_heap.html ├── power.html ├── prev_permutation.html ├── priority_queue.html ├── project1st.html ├── project2nd.html ├── pthread_alloc ├── pthread_alloc.h ├── ptr_fun.html ├── push_heap.html ├── queue ├── queue.html ├── random_access_iterator.html ├── random_access_iterator_tag.html ├── random_sample.html ├── random_sample_n.html ├── random_shuffle.html ├── raw_storage_iterator.html ├── remove.html ├── remove_copy.html ├── remove_copy_if.html ├── remove_if.html ├── replace.html ├── replace_copy.html ├── replace_copy_if.html ├── replace_if.html ├── return_temporary_buffer.html ├── reverse.html ├── reverse_copy.html ├── rope ├── rope.h ├── ropeimpl.h ├── ropeimpl.html ├── rotate.html ├── rotate_copy.html ├── search.html ├── search_n.html ├── select1st.html ├── select2nd.html ├── sequence_buffer.html ├── sequence_concepts.h ├── set ├── set.h ├── set.html ├── set_difference.html ├── set_intersection.html ├── set_symmetric_difference.html ├── set_union.html ├── sgilogo.gif ├── slist ├── slist.h ├── sort.html ├── sort_heap.html ├── stable_partition.html ├── stable_sort.html ├── stack ├── stack.h ├── stack.html ├── standard_library.html ├── stdexcept ├── stl_algo.h ├── stl_algobase.h ├── stl_alloc.h ├── stl_bvector.h ├── stl_config.h ├── stl_construct.h ├── stl_ctraits_fns.h ├── stl_deque.h ├── stl_exception.h ├── stl_function.h ├── stl_hash_fun.h ├── stl_hash_map.h ├── stl_hash_set.h ├── stl_hashtable.h ├── stl_heap.h ├── stl_home.gif ├── stl_index.html ├── stl_index_cat.html ├── stl_introduction.html ├── stl_iterator.h ├── stl_iterator_base.h ├── stl_list.h ├── stl_map.h ├── stl_multimap.h ├── stl_multiset.h ├── stl_numeric.h ├── stl_pair.h ├── stl_queue.h ├── stl_range_errors.h ├── stl_raw_storage_iter.h ├── stl_relops.h ├── stl_rope.h ├── stl_set.h ├── stl_slist.h ├── stl_stack.h ├── stl_string_fwd.h ├── stl_tempbuf.h ├── stl_threads.h ├── stl_tree.h ├── stl_uninitialized.h ├── stl_vector.h ├── string ├── string_discussion.html ├── subtractive_rng.html ├── surf.gif ├── swap.html ├── swap_ranges.html ├── table_of_contents.html ├── tempbuf.h ├── temporary_buffer.html ├── thread_safety.html ├── times.html ├── transform.html ├── tree.h ├── trivial.html ├── type.gif ├── type_dot.gif ├── type_traits.h ├── unary_compose.html ├── unary_function.html ├── unary_negate.html ├── uninitialized_copy.html ├── uninitialized_copy_n.html ├── uninitialized_fill.html ├── uninitialized_fill_n.html ├── unique.html ├── unique_copy.html ├── upper_bound.html ├── utilities.gif ├── utility ├── valarray ├── value_type.html ├── vector ├── vector.h ├── whats_new.html └── whitespace.gif /README.md: -------------------------------------------------------------------------------- 1 | # sgi-stl-docs 2 | 3 | ## [READ HERE](https://justinmeiners.github.io/sgi-stl-docs/) 4 | 5 | Standard template library (STL) documentation from SGI. This is a mirror of the content that used to be on SGIs site. They recently removed it. Thanks to [Martin](http://www.martinbroadhurst.com/sgi-stl-documentation.html) for backing it up for all of us. 6 | 7 | This documentation discusses a lot of the design principles behind the STL, and rationale for why certain decisions were made. It also explains Alex Stepanov's [concepts](https://en.cppreference.com/w/cpp/concepts) which he uses in the STL, but could not be expressed in the code (ForwardIterator, RegularType, etc). As far as I know, this information is not in any of the current documentation. 8 | 9 | ## Related Links 10 | 11 | Other information related to the design of the STL. 12 | 13 | - [Alexander Stepanov: STL and Its Design Principles](https://www.youtube.com/watch?v=COuHLky7E2Q) 14 | - [An Interview with A. Stepanov](http://www.stlport.org/resources/StepanovUSA.html) 15 | - [Effecient Programming With Components](https://www.youtube.com/watch?v=aIHAEYyoTUc&list=PLHxtyCq_WDLXryyw91lahwdtpZsmo4BGD) 16 | - [Stepanov Papers](http://stepanovpapers.com) 17 | 18 | # License 19 | 20 | Copyright © 1996-1999 21 | Silicon Graphics Computer Systems, Inc. 22 | 23 | Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appears in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Silicon Graphics makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. 24 | 25 | Copyright © 1994 26 | Hewlett-Packard Company 27 | 28 | Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appears in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Hewlett-Packard Company makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /docs/AdaptableBinaryPredicate.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | Adaptable Binary Predicate 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

Adaptable Binary Predicate

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: functorsComponent type: concept
48 | 49 |

Description

50 | An Adaptable Binary Predicate is a Binary Predicate that is also an 51 | Adaptable Binary Function. That is, it is a Binary Function 52 | whose return type is bool, and that includes nested typedefs that 53 | define its argument types and return type. 54 |

Refinement of

55 | Predicate, Adaptable Binary Function 56 |

Associated types

57 | None, except for those associated with Predicate and 58 | Adaptable Binary Function. 59 |

Notation

60 |

Definitions

61 |

Valid expressions

62 | None, except for those defined by the Predicate and 63 | Adaptable Binary Function requirements. 64 |

Expression semantics

65 |

Complexity guarantees

66 |

Invariants

67 |

Models

68 | 80 |

Notes

81 |

See also

82 | Binary Predicate, Predicate, Adaptable Predicate 83 | 84 | 85 |
86 | [Silicon Surf] 88 | [STL Home] 90 |
91 | 92 | Copyright © 93 | 1999 Silicon Graphics, Inc. All Rights Reserved. 94 | TrademarkInformation 95 | 96 |

97 | 98 | 99 | -------------------------------------------------------------------------------- /docs/AdaptableGenerator.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | Adaptable Generator 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

Adaptable Generator

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: functorsComponent type: concept
48 | 49 |

Description

50 | An Adaptable Generator is a Generator with a nested 51 | typedef that defines its result type. [1] This nested typedef makes 52 | it possible to use function object adaptors. 53 |

Refinement of

54 | Generator 55 |

Associated types

56 | 57 | 58 | 61 | 64 | 67 | 68 |
59 | Result type 60 | 62 | F::result_type 63 | 65 | The type returned when the Generator is called 66 |
69 |

Notation

70 | 71 | 72 | 75 | 78 | 79 |
73 | F 74 | 76 | A type that is a model of Adaptable Generator 77 |
80 |

Definitions

81 |

Valid expressions

82 | None, except for those defined by Generator 83 |

Expression semantics

84 |

Complexity guarantees

85 |

Invariants

86 |

Models

87 | The STL does not include any types that are models of Adaptable 88 | Generator. An example of a user-defined Adaptable Generator is 89 | as follows. 90 |
 91 | struct counter
 92 | {
 93 |   typedef int result_type;
 94 | 
 95 |   counter() : n(0) {}
 96 |   result_type operator()() { return n++; }
 97 | 
 98 |   result_type n;
 99 | };
100 | 
101 |

Notes

102 |

[1] 103 | Note the implication of this: a function pointer T (*f)() 104 | is a Generator, but not an Adaptable Generator: the 105 | expression f::result_type is nonsensical. 106 |

See also

107 | Generator, Adaptable Unary Function, Adaptable Binary Function 108 | 109 | 110 |
111 | [Silicon Surf] 113 | [STL Home] 115 |
116 | 117 | Copyright © 118 | 1999 Silicon Graphics, Inc. All Rights Reserved. 119 | TrademarkInformation 120 | 121 |

122 | 123 | 124 | -------------------------------------------------------------------------------- /docs/AdaptablePredicate.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | Adaptable Predicate 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

Adaptable Predicate

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: functorsComponent type: concept
48 | 49 |

Description

50 | An Adaptable Predicate is a Predicate that is also an 51 | Adaptable Unary Function. That is, it is a Unary Function 52 | whose return type is bool, and that includes nested typedefs that 53 | define its argument type and return type. 54 |

Refinement of

55 | Predicate, Adaptable Unary Function 56 |

Associated types

57 | None, except for those associated with Predicate and 58 | Adaptable Unary Function. 59 |

Notation

60 |

Definitions

61 |

Valid expressions

62 | None, except for those defined by the Predicate and 63 | Adaptable Unary Function requirements. 64 |

Expression semantics

65 |

Complexity guarantees

66 |

Invariants

67 |

Models

68 | 74 |

Notes

75 |

See also

76 | Predicate, Binary Predicate, Adaptable Binary Predicate 77 | 78 | 79 |
80 | [Silicon Surf] 82 | [STL Home] 84 |
85 | 86 | Copyright © 87 | 1999 Silicon Graphics, Inc. All Rights Reserved. 88 | TrademarkInformation 89 | 90 |

91 | 92 | 93 | -------------------------------------------------------------------------------- /docs/CorpID.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/CorpID.gif -------------------------------------------------------------------------------- /docs/adaptors.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/adaptors.gif -------------------------------------------------------------------------------- /docs/algo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_ALGO_H 28 | #define __SGI_STL_ALGO_H 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | #ifdef __STL_USE_NAMESPACES 36 | 37 | // Names from 38 | using __STD::for_each; 39 | using __STD::find; 40 | using __STD::find_if; 41 | using __STD::adjacent_find; 42 | using __STD::count; 43 | using __STD::count_if; 44 | using __STD::search; 45 | using __STD::search_n; 46 | using __STD::swap_ranges; 47 | using __STD::transform; 48 | using __STD::replace; 49 | using __STD::replace_if; 50 | using __STD::replace_copy; 51 | using __STD::replace_copy_if; 52 | using __STD::generate; 53 | using __STD::generate_n; 54 | using __STD::remove; 55 | using __STD::remove_if; 56 | using __STD::remove_copy; 57 | using __STD::remove_copy_if; 58 | using __STD::unique; 59 | using __STD::unique_copy; 60 | using __STD::reverse; 61 | using __STD::reverse_copy; 62 | using __STD::rotate; 63 | using __STD::rotate_copy; 64 | using __STD::random_shuffle; 65 | using __STD::random_sample; 66 | using __STD::random_sample_n; 67 | using __STD::partition; 68 | using __STD::stable_partition; 69 | using __STD::sort; 70 | using __STD::stable_sort; 71 | using __STD::partial_sort; 72 | using __STD::partial_sort_copy; 73 | using __STD::nth_element; 74 | using __STD::lower_bound; 75 | using __STD::upper_bound; 76 | using __STD::equal_range; 77 | using __STD::binary_search; 78 | using __STD::merge; 79 | using __STD::inplace_merge; 80 | using __STD::includes; 81 | using __STD::set_union; 82 | using __STD::set_intersection; 83 | using __STD::set_difference; 84 | using __STD::set_symmetric_difference; 85 | using __STD::min_element; 86 | using __STD::max_element; 87 | using __STD::next_permutation; 88 | using __STD::prev_permutation; 89 | using __STD::find_first_of; 90 | using __STD::find_end; 91 | using __STD::is_sorted; 92 | using __STD::is_heap; 93 | 94 | // Names from stl_heap.h 95 | using __STD::push_heap; 96 | using __STD::pop_heap; 97 | using __STD::make_heap; 98 | using __STD::sort_heap; 99 | 100 | // Names from 101 | using __STD::accumulate; 102 | using __STD::inner_product; 103 | using __STD::partial_sum; 104 | using __STD::adjacent_difference; 105 | using __STD::power; 106 | using __STD::iota; 107 | 108 | #endif /* __STL_USE_NAMESPACES */ 109 | 110 | #endif /* __SGI_STL_ALGO_H */ 111 | 112 | // Local Variables: 113 | // mode:C++ 114 | // End: 115 | -------------------------------------------------------------------------------- /docs/algobase.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * Copyright (c) 1996,1997 15 | * Silicon Graphics Computer Systems, Inc. 16 | * 17 | * Permission to use, copy, modify, distribute and sell this software 18 | * and its documentation for any purpose is hereby granted without fee, 19 | * provided that the above copyright notice appear in all copies and 20 | * that both that copyright notice and this permission notice appear 21 | * in supporting documentation. Silicon Graphics makes no 22 | * representations about the suitability of this software for any 23 | * purpose. It is provided "as is" without express or implied warranty. 24 | */ 25 | 26 | #ifndef __SGI_STL_ALGOBASE_H 27 | #define __SGI_STL_ALGOBASE_H 28 | 29 | #ifndef __SGI_STL_PAIR_H 30 | #include 31 | #endif 32 | #ifndef __SGI_STL_ITERATOR_H 33 | #include 34 | #endif 35 | #ifndef __SGI_STL_INTERNAL_ALGOBASE_H 36 | #include 37 | #endif 38 | #ifndef __SGI_STL_INTERNAL_UNINITIALIZED_H 39 | #include 40 | #endif 41 | 42 | #ifdef __STL_USE_NAMESPACES 43 | 44 | // Names from stl_algobase.h 45 | using __STD::iter_swap; 46 | using __STD::swap; 47 | using __STD::min; 48 | using __STD::max; 49 | using __STD::copy; 50 | using __STD::copy_backward; 51 | using __STD::copy_n; 52 | using __STD::fill; 53 | using __STD::fill_n; 54 | using __STD::mismatch; 55 | using __STD::equal; 56 | using __STD::lexicographical_compare; 57 | using __STD::lexicographical_compare_3way; 58 | 59 | // Names from stl_uninitialized.h 60 | using __STD::uninitialized_copy; 61 | using __STD::uninitialized_copy_n; 62 | using __STD::uninitialized_fill; 63 | using __STD::uninitialized_fill_n; 64 | 65 | #endif /* __STL_USE_NAMESPACES */ 66 | 67 | #endif /* __SGI_STL_ALGOBASE_H */ 68 | 69 | // Local Variables: 70 | // mode:C++ 71 | // End: 72 | -------------------------------------------------------------------------------- /docs/algorithm: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_ALGORITHM 28 | #define __SGI_STL_ALGORITHM 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #endif /* __SGI_STL_ALGORITHM */ 37 | 38 | // Local Variables: 39 | // mode:C++ 40 | // End: 41 | -------------------------------------------------------------------------------- /docs/algorithms.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/algorithms.gif -------------------------------------------------------------------------------- /docs/alloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1996-1997 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | */ 13 | 14 | #ifndef __SGI_STL_ALLOC_H 15 | #define __SGI_STL_ALLOC_H 16 | 17 | #ifndef __STL_CONFIG_H 18 | #include 19 | #endif 20 | #ifndef __SGI_STL_INTERNAL_ALLOC_H 21 | #include 22 | #endif 23 | 24 | #ifdef __STL_USE_NAMESPACES 25 | 26 | using __STD::__malloc_alloc_template; 27 | using __STD::malloc_alloc; 28 | using __STD::simple_alloc; 29 | using __STD::debug_alloc; 30 | using __STD::__default_alloc_template; 31 | using __STD::alloc; 32 | using __STD::single_client_alloc; 33 | #ifdef __STL_STATIC_TEMPLATE_MEMBER_BUG 34 | using __STD::__malloc_alloc_oom_handler; 35 | #endif /* __STL_STATIC_TEMPLATE_MEMBER_BUG */ 36 | #ifdef __STL_USE_STD_ALLOCATORS 37 | using __STD::allocator; 38 | #endif /* __STL_USE_STD_ALLOCATORS */ 39 | 40 | #endif /* __STL_USE_NAMESPACES */ 41 | 42 | #endif /* __SGI_STL_ALLOC_H */ 43 | 44 | // Local Variables: 45 | // mode:C++ 46 | // End: 47 | -------------------------------------------------------------------------------- /docs/allocators.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/allocators.gif -------------------------------------------------------------------------------- /docs/bidirectional_iterator_tag.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | bidirectional_iterator_tag 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

bidirectional_iterator_tag

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: iteratorsComponent type: type
48 | 49 |

Description

50 | Bidirectional_iterator_tag is an empty class: it has no member functions, 51 | member variables, or nested types. It is used solely as a "tag": a 52 | representation of the Bidirectional Iterator concept within the C++ type 53 | system. Specifically, it is used as a return value for the function 54 | iterator_category. Iterator_category takes a single 55 | argument, an iterator, and returns an object whose type depends on the 56 | iterator's category. Iterator_category's return value is of 57 | type bidirectional_iterator_tag if its argument is a Bidirectional Iterator. 58 |

Example

59 | See iterator_category 60 |

Definition

61 | Defined in the standard header iterator, and in the 62 | nonstandard backward-compatibility header iterator.h. 63 |

Template parameters

64 | None. 65 |

Model of

66 | Assignable 67 |

Type requirements

68 | None. 69 |

Public base classes

70 | None. 71 |

Members

72 | None. 73 |

New Members

74 | None. 75 |

Notes

76 |

See also

77 | iterator_category, Iterator Tags, 78 | iterator_traits, 79 | output_iterator_tag, input_iterator_tag, 80 | forward_iterator_tag 81 | random_access_iterator_tag 82 | 83 | 84 |
85 | [Silicon Surf] 87 | [STL Home] 89 |
90 | 91 | Copyright © 92 | 1999 Silicon Graphics, Inc. All Rights Reserved. 93 | TrademarkInformation 94 | 95 |

96 | 97 | 98 | -------------------------------------------------------------------------------- /docs/bvector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_BVECTOR_H 28 | #define __SGI_STL_BVECTOR_H 29 | 30 | #include 31 | #ifdef __STL_CLASS_PARTIAL_SPECIALIZATION 32 | #include 33 | #else 34 | #include 35 | #include 36 | #endif 37 | 38 | #include 39 | 40 | #ifdef __STL_USE_NAMESPACES 41 | 42 | using __STD::bit_vector; 43 | 44 | #endif /* __STL_USE_NAMESPACES */ 45 | 46 | #endif /* __SGI_STL_BVECTOR_H */ 47 | 48 | // Local Variables: 49 | // mode:C++ 50 | // End: 51 | 52 | 53 | -------------------------------------------------------------------------------- /docs/category_dot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/category_dot.gif -------------------------------------------------------------------------------- /docs/char_traits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | */ 13 | 14 | #ifndef __SGI_STL_CHAR_TRAITS_H 15 | #define __SGI_STL_CHAR_TRAITS_H 16 | 17 | #include 18 | #include 19 | 20 | #if defined(__STL_USE_NEW_IOSTREAMS) && !defined(__SGI_STL_IOSFWD) 21 | #include 22 | #endif /* use new iostreams */ 23 | 24 | __STL_BEGIN_NAMESPACE 25 | 26 | // Class __char_traits_base. 27 | 28 | template class __char_traits_base { 29 | public: 30 | typedef _CharT char_type; 31 | typedef _IntT int_type; 32 | #ifdef __STL_USE_NEW_IOSTREAMS 33 | typedef streamoff off_type; 34 | typedef streampos pos_type; 35 | typedef mbstate_t state_type; 36 | #endif /* __STL_USE_NEW_IOSTREAMS */ 37 | 38 | static void assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } 39 | static bool eq(const _CharT& __c1, const _CharT& __c2) 40 | { return __c1 == __c2; } 41 | static bool lt(const _CharT& __c1, const _CharT& __c2) 42 | { return __c1 < __c2; } 43 | 44 | static int compare(const _CharT* __s1, const _CharT* __s2, size_t __n) { 45 | for (size_t __i = 0; __i < __n; ++__i) 46 | if (!eq(__s1[__i], __s2[__i])) 47 | return __s1[__i] < __s2[__i] ? -1 : 1; 48 | return 0; 49 | } 50 | 51 | static size_t length(const _CharT* __s) { 52 | const _CharT __nullchar = _CharT(); 53 | size_t __i; 54 | for (__i = 0; !eq(__s[__i], __nullchar); ++__i) 55 | {} 56 | return __i; 57 | } 58 | 59 | static const _CharT* find(const _CharT* __s, size_t __n, const _CharT& __c) 60 | { 61 | for ( ; __n > 0 ; ++__s, --__n) 62 | if (eq(*__s, __c)) 63 | return __s; 64 | return 0; 65 | } 66 | 67 | static _CharT* move(_CharT* __s1, const _CharT* __s2, size_t __n) { 68 | memmove(__s1, __s2, __n * sizeof(_CharT)); 69 | return __s1; 70 | } 71 | 72 | static _CharT* copy(_CharT* __s1, const _CharT* __s2, size_t __n) { 73 | memcpy(__s1, __s2, __n * sizeof(_CharT)); 74 | return __s1; 75 | } 76 | 77 | static _CharT* assign(_CharT* __s, size_t __n, _CharT __c) { 78 | for (size_t __i = 0; __i < __n; ++__i) 79 | __s[__i] = __c; 80 | return __s; 81 | } 82 | 83 | static int_type not_eof(const int_type& __c) { 84 | return !eq_int_type(__c, eof()) ? __c : 0; 85 | } 86 | 87 | static char_type to_char_type(const int_type& __c) { 88 | return static_cast(__c); 89 | } 90 | 91 | static int_type to_int_type(const char_type& __c) { 92 | return static_cast(__c); 93 | } 94 | 95 | static bool eq_int_type(const int_type& __c1, const int_type& __c2) { 96 | return __c1 == __c2; 97 | } 98 | 99 | static int_type eof() { 100 | return static_cast(-1); 101 | } 102 | }; 103 | 104 | // Generic char_traits class. Note that this class is provided only 105 | // as a base for explicit specialization; it is unlikely to be useful 106 | // as is for any particular user-defined type. In particular, it 107 | // *will not work* for a non-POD type. 108 | 109 | template class char_traits 110 | : public __char_traits_base<_CharT, _CharT> 111 | {}; 112 | 113 | // Specialization for char. 114 | 115 | __STL_TEMPLATE_NULL class char_traits 116 | : public __char_traits_base 117 | { 118 | public: 119 | static char_type to_char_type(const int_type& __c) { 120 | return static_cast(static_cast(__c)); 121 | } 122 | 123 | static int_type to_int_type(const char_type& __c) { 124 | return static_cast(__c); 125 | } 126 | 127 | static int compare(const char* __s1, const char* __s2, size_t __n) 128 | { return memcmp(__s1, __s2, __n); } 129 | 130 | static size_t length(const char* __s) { return strlen(__s); } 131 | 132 | static void assign(char& __c1, const char& __c2) { __c1 = __c2; } 133 | 134 | static char* assign(char* __s, size_t __n, char __c) 135 | { memset(__s, __c, __n); return __s; } 136 | }; 137 | 138 | // Specialization for wchar_t. 139 | 140 | __STL_TEMPLATE_NULL class char_traits 141 | : public __char_traits_base 142 | {}; 143 | 144 | 145 | __STL_END_NAMESPACE 146 | 147 | #endif /* __SGI_STL_CHAR_TRAITS_H */ 148 | 149 | // Local Variables: 150 | // mode:C++ 151 | // End: 152 | 153 | -------------------------------------------------------------------------------- /docs/concept.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/concept.gif -------------------------------------------------------------------------------- /docs/concept_dot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/concept_dot.gif -------------------------------------------------------------------------------- /docs/construct.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | construct 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

construct

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: allocatorsComponent type: function
48 | 49 |

Prototype

50 |
 51 | template <class T1, class T2> void construct(T1* p, const T2& value);
 52 | 
53 |

Description

54 | In C++, the operator new allocates memory for an object and then 55 | creates an object at that location by calling a constructor. Occasionally, 56 | however, it is useful to separate those two operations. [1] If p is 57 | a pointer to memory that has been allocated but not initialized, 58 | then construct(p, value) creates an object of type T1 at the location 59 | pointed to by p. The argument value is passed as an argument to 60 | T1's constructor. 61 |

Definition

62 | Defined in the standard header memory, and in the nonstandard 63 | backward-compatibility header algo.h. The construct algorithm 64 | is no longer part of the C++ standard; it was present in early drafts, 65 | and it is retained in this implementation for backward compatibility. 66 |

Requirements on types

67 | 72 |

Preconditions

73 | 81 |

Complexity

82 |

Example

83 |
 84 | double* dp = (double*) malloc(sizeof(double));
 85 | construct(dp, 3);
 86 | assert(*dp == 3);
 87 | 
88 |

Notes

89 |

[1] 90 | In particular, construct, along with other low-level memory 91 | allocation primitives, is used to implement container classes. 92 |

See also

93 | Allocators, destroy, uninitialized_copy, 94 | uninitialized_fill, uninitialized_fill_n, 95 | raw_storage_iterator 96 | 97 | 98 |
99 | [Silicon Surf] 101 | [STL Home] 103 |
104 | 105 | Copyright © 106 | 1999 Silicon Graphics, Inc. All Rights Reserved. 107 | TrademarkInformation 108 | 109 |

110 | 111 | 112 | -------------------------------------------------------------------------------- /docs/containers.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/containers.gif -------------------------------------------------------------------------------- /docs/defalloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | */ 15 | 16 | // Inclusion of this file is DEPRECATED. This is the original HP 17 | // default allocator. It is provided only for backward compatibility. 18 | // This file WILL BE REMOVED in a future release. 19 | // 20 | // DO NOT USE THIS FILE unless you have an old container implementation 21 | // that requires an allocator with the HP-style interface. 22 | // 23 | // Standard-conforming allocators have a very different interface. The 24 | // standard default allocator is declared in the header . 25 | 26 | #ifndef DEFALLOC_H 27 | #define DEFALLOC_H 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | 37 | template 38 | inline T* allocate(ptrdiff_t size, T*) { 39 | set_new_handler(0); 40 | T* tmp = (T*)(::operator new((size_t)(size * sizeof(T)))); 41 | if (tmp == 0) { 42 | cerr << "out of memory" << endl; 43 | exit(1); 44 | } 45 | return tmp; 46 | } 47 | 48 | 49 | template 50 | inline void deallocate(T* buffer) { 51 | ::operator delete(buffer); 52 | } 53 | 54 | template 55 | class allocator { 56 | public: 57 | typedef T value_type; 58 | typedef T* pointer; 59 | typedef const T* const_pointer; 60 | typedef T& reference; 61 | typedef const T& const_reference; 62 | typedef size_t size_type; 63 | typedef ptrdiff_t difference_type; 64 | pointer allocate(size_type n) { 65 | return ::allocate((difference_type)n, (pointer)0); 66 | } 67 | void deallocate(pointer p) { ::deallocate(p); } 68 | pointer address(reference x) { return (pointer)&x; } 69 | const_pointer const_address(const_reference x) { 70 | return (const_pointer)&x; 71 | } 72 | size_type init_page_size() { 73 | return max(size_type(1), size_type(4096/sizeof(T))); 74 | } 75 | size_type max_size() const { 76 | return max(size_type(1), size_type(UINT_MAX/sizeof(T))); 77 | } 78 | }; 79 | 80 | class allocator { 81 | public: 82 | typedef void* pointer; 83 | }; 84 | 85 | 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /docs/deque: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_DEQUE 28 | #define __SGI_STL_DEQUE 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #endif /* __SGI_STL_DEQUE */ 38 | 39 | // Local Variables: 40 | // mode:C++ 41 | // End: 42 | -------------------------------------------------------------------------------- /docs/deque.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_DEQUE_H 28 | #define __SGI_STL_DEQUE_H 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | #ifdef __STL_USE_NAMESPACES 36 | using __STD::deque; 37 | #endif /* __STL_USE_NAMESPACES */ 38 | 39 | #endif /* __SGI_STL_DEQUE_H */ 40 | 41 | // Local Variables: 42 | // mode:C++ 43 | // End: 44 | -------------------------------------------------------------------------------- /docs/design_documents.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | 28 | 29 | STL Design Documents 30 | 31 | 32 | 34 | SGI 36 | 37 | 38 |

STL Design Documents

39 | 40 | 41 | 48 | 49 | 50 | 51 |
52 | [Silicon Surf] 54 | [STL Home] 56 |
57 | 58 | Copyright © 59 | 1999 Silicon Graphics, Inc. All Rights Reserved. 60 | TrademarkInformation 61 | 62 |

63 | 64 | 65 | -------------------------------------------------------------------------------- /docs/fill_n.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | fill_n 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

fill_n

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: algorithmsComponent type: function
48 | 49 |

Prototype

50 |
 51 | template <class OutputIterator, class Size, class T>
 52 | OutputIterator fill_n(OutputIterator first, Size n, const T& value);
 53 | 
54 |

Description

55 | Fill_n assigns the value value to every element in the range 56 | [first, first+n). That is, for every iterator i in [first, first+n), 57 | it performs the assignment *i = value. The return value is first + 58 | n. 59 |

Definition

60 | Defined in the standard header algorithm, and in the nonstandard 61 | backward-compatibility header algo.h. 62 |

Requirements on types

63 | 73 |

Preconditions

74 | 81 |

Complexity

82 | Linear. Fill_n performs exactly n assignments. 83 |

Example

84 |
 85 | vector<double> V;
 86 | fill_n(back_inserter(V), 4, 137);
 87 | assert(V.size() == 4 && V[0] == 42 && V[1] == 42 && V[2] == 42 && V[3] == 42);
 88 | 
89 |

Notes

90 |

See also

91 | copy, fill, generate, generate_n, iota 92 | 93 | 94 |
95 | [Silicon Surf] 97 | [STL Home] 99 |
100 | 101 | Copyright © 102 | 1999 Silicon Graphics, Inc. All Rights Reserved. 103 | TrademarkInformation 104 | 105 |

106 | 107 | 108 | -------------------------------------------------------------------------------- /docs/find.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | find 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

find

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: algorithmsComponent type: function
48 | 49 |

Prototype

50 |
 51 | template<class InputIterator, class EqualityComparable>
 52 | InputIterator find(InputIterator first, InputIterator last,
 53 |                    const EqualityComparable& value);
 54 | 
55 |

Description

56 | Returns the first iterator i in the range [first, last) such that 57 | *i == value. Returns last if no such iterator exists. 58 |

Definition

59 | Defined in the standard header algorithm, and in the nonstandard 60 | backward-compatibility header algo.h. 61 |

Requirements on types

62 | 71 |

Preconditions

72 | 76 |

Complexity

77 | Linear: at most last - first comparisons for equality. 78 |

Example

79 |
 80 | list<int> L;
 81 | L.push_back(3);
 82 | L.push_back(1);
 83 | L.push_back(7);
 84 | 
 85 | list<int>::iterator result = find(L.begin(), L.end(), 7);
 86 | assert(result == L.end() || *result == 7);
 87 | 
88 |

Notes

89 |

See also

90 | find_if. 91 | 92 | 93 |
94 | [Silicon Surf] 96 | [STL Home] 98 |
99 | 100 | Copyright © 101 | 1999 Silicon Graphics, Inc. All Rights Reserved. 102 | TrademarkInformation 103 | 104 |

105 | 106 | 107 | -------------------------------------------------------------------------------- /docs/find_if.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | find_if 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

find_if

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: algorithmsComponent type: function
48 | 49 |

Prototype

50 |
 51 | template<class InputIterator, class Predicate>
 52 | InputIterator find_if(InputIterator first, InputIterator last,
 53 |                       Predicate pred);
 54 | 
55 |

Description

56 | Returns the first iterator i in the range [first, last) such that 57 | pred(*i) is true. Returns last if no such iterator exists. 58 |

Definition

59 | Defined in the standard header algorithm, and in the nonstandard 60 | backward-compatibility header algo.h. 61 |

Requirements on types

62 | 71 |

Preconditions

72 | 79 |

Complexity

80 | Linear: at most last - first applications of Pred. 81 |

Example

82 |
 83 | list<int> L;
 84 | L.push_back(-3);
 85 | L.push_back(0);
 86 | L.push_back(3);
 87 | L.push_back(-2);
 88 | 
 89 | list<int>::iterator result = find_if(L.begin(), L.end(),
 90 |                                      bind2nd(greater<int>(), 0));
 91 | assert(result == L.end() || *result > 0);
 92 | 
93 |

Notes

94 |

See also

95 | find. 96 | 97 | 98 |
99 | [Silicon Surf] 101 | [STL Home] 103 |
104 | 105 | Copyright © 106 | 1999 Silicon Graphics, Inc. All Rights Reserved. 107 | TrademarkInformation 108 | 109 |

110 | 111 | 112 | -------------------------------------------------------------------------------- /docs/forward_iterator_tag.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | forward_iterator_tag 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

forward_iterator_tag

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: iteratorsComponent type: type
48 | 49 |

Description

50 | Forward_iterator_tag is an empty class: it has no member functions, 51 | member variables, or nested types. It is used solely as a "tag": a 52 | representation of the Forward Iterator concept within the C++ type 53 | system. Specifically, it is used as a return value for the function 54 | iterator_category. Iterator_category takes a single 55 | argument, an iterator, and returns an object whose type depends on the 56 | iterator's category. Iterator_category's return value is of 57 | type forward_iterator_tag if its argument is a Forward Iterator. 58 |

Example

59 | See iterator_category 60 |

Definition

61 | Defined in the standard header iterator, and in the 62 | nonstandard backward-compatibility header iterator.h. 63 |

Template parameters

64 | None. 65 |

Model of

66 | Assignable 67 |

Type requirements

68 | None. 69 |

Public base classes

70 | None. 71 |

Members

72 | None. 73 |

New Members

74 | None. 75 |

Notes

76 |

See also

77 | iterator_category, Iterator Tags, 78 | iterator_traits, 79 | output_iterator_tag, input_iterator_tag, 80 | bidirectional_iterator_tag, 81 | random_access_iterator_tag 82 | 83 | 84 |
85 | [Silicon Surf] 87 | [STL Home] 89 |
90 | 91 | Copyright © 92 | 1999 Silicon Graphics, Inc. All Rights Reserved. 93 | TrademarkInformation 94 | 95 |

96 | 97 | 98 | -------------------------------------------------------------------------------- /docs/function.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/function.gif -------------------------------------------------------------------------------- /docs/function.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_FUNCTION_H 28 | #define __SGI_STL_FUNCTION_H 29 | 30 | #ifndef __STL_CONFIG_H 31 | #include 32 | #endif 33 | #ifndef __SGI_STL_INTERNAL_RELOPS 34 | #include 35 | #endif 36 | #include 37 | #ifndef __SGI_STL_INTERNAL_FUNCTION_H 38 | #include 39 | #endif 40 | 41 | #ifdef __STL_USE_NAMESPACE_FOR_RELOPS 42 | 43 | // Names from stl_relops.h 44 | using __STD_RELOPS::operator!=; 45 | using __STD_RELOPS::operator>; 46 | using __STD_RELOPS::operator<=; 47 | using __STD_RELOPS::operator>=; 48 | 49 | #endif /* __STL_USE_NAMESPACE_FOR_RELOPS */ 50 | 51 | #ifdef __STL_USE_NAMESPACES 52 | 53 | // Names from stl_function.h 54 | using __STD::unary_function; 55 | using __STD::binary_function; 56 | using __STD::plus; 57 | using __STD::minus; 58 | using __STD::multiplies; 59 | using __STD::divides; 60 | using __STD::identity_element; 61 | using __STD::modulus; 62 | using __STD::negate; 63 | using __STD::equal_to; 64 | using __STD::not_equal_to; 65 | using __STD::greater; 66 | using __STD::less; 67 | using __STD::greater_equal; 68 | using __STD::less_equal; 69 | using __STD::logical_and; 70 | using __STD::logical_or; 71 | using __STD::logical_not; 72 | using __STD::unary_negate; 73 | using __STD::binary_negate; 74 | using __STD::not1; 75 | using __STD::not2; 76 | using __STD::binder1st; 77 | using __STD::binder2nd; 78 | using __STD::bind1st; 79 | using __STD::bind2nd; 80 | using __STD::unary_compose; 81 | using __STD::binary_compose; 82 | using __STD::compose1; 83 | using __STD::compose2; 84 | using __STD::pointer_to_unary_function; 85 | using __STD::pointer_to_binary_function; 86 | using __STD::ptr_fun; 87 | using __STD::identity; 88 | using __STD::select1st; 89 | using __STD::select2nd; 90 | using __STD::project1st; 91 | using __STD::project2nd; 92 | using __STD::constant_void_fun; 93 | using __STD::constant_unary_fun; 94 | using __STD::constant_binary_fun; 95 | using __STD::constant0; 96 | using __STD::constant1; 97 | using __STD::constant2; 98 | using __STD::subtractive_rng; 99 | using __STD::mem_fun_t; 100 | using __STD::const_mem_fun_t; 101 | using __STD::mem_fun_ref_t; 102 | using __STD::const_mem_fun_ref_t; 103 | using __STD::mem_fun1_t; 104 | using __STD::const_mem_fun1_t; 105 | using __STD::mem_fun1_ref_t; 106 | using __STD::const_mem_fun1_ref_t; 107 | using __STD::mem_fun; 108 | using __STD::mem_fun_ref; 109 | using __STD::mem_fun1; 110 | using __STD::mem_fun1_ref; 111 | 112 | #endif /* __STL_USE_NAMESPACES */ 113 | 114 | #endif /* __SGI_STL_FUNCTION_H */ 115 | 116 | // Local Variables: 117 | // mode:C++ 118 | // End: 119 | -------------------------------------------------------------------------------- /docs/function_dot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/function_dot.gif -------------------------------------------------------------------------------- /docs/functional: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | * 13 | */ 14 | 15 | #ifndef __SGI_STL_FUNCTIONAL 16 | #define __SGI_STL_FUNCTIONAL 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | #endif /* __SGI_STL_FUNCTIONAL */ 23 | 24 | // Local Variables: 25 | // mode:C++ 26 | // End: 27 | -------------------------------------------------------------------------------- /docs/functors.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/functors.gif -------------------------------------------------------------------------------- /docs/grey2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/grey2.gif -------------------------------------------------------------------------------- /docs/hash_map: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1996 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | * 13 | * 14 | * Copyright (c) 1994 15 | * Hewlett-Packard Company 16 | * 17 | * Permission to use, copy, modify, distribute and sell this software 18 | * and its documentation for any purpose is hereby granted without fee, 19 | * provided that the above copyright notice appear in all copies and 20 | * that both that copyright notice and this permission notice appear 21 | * in supporting documentation. Hewlett-Packard Company makes no 22 | * representations about the suitability of this software for any 23 | * purpose. It is provided "as is" without express or implied warranty. 24 | * 25 | */ 26 | 27 | #ifndef __SGI_STL_HASH_MAP 28 | #define __SGI_STL_HASH_MAP 29 | 30 | #ifndef __SGI_STL_INTERNAL_HASHTABLE_H 31 | #include 32 | #endif 33 | 34 | #include 35 | 36 | #endif /* __SGI_STL_HASH_MAP */ 37 | 38 | // Local Variables: 39 | // mode:C++ 40 | // End: 41 | -------------------------------------------------------------------------------- /docs/hash_map.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1996 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | * 13 | * 14 | * Copyright (c) 1994 15 | * Hewlett-Packard Company 16 | * 17 | * Permission to use, copy, modify, distribute and sell this software 18 | * and its documentation for any purpose is hereby granted without fee, 19 | * provided that the above copyright notice appear in all copies and 20 | * that both that copyright notice and this permission notice appear 21 | * in supporting documentation. Hewlett-Packard Company makes no 22 | * representations about the suitability of this software for any 23 | * purpose. It is provided "as is" without express or implied warranty. 24 | * 25 | */ 26 | 27 | #ifndef __SGI_STL_HASH_MAP_H 28 | #define __SGI_STL_HASH_MAP_H 29 | 30 | #ifndef __SGI_STL_INTERNAL_HASHTABLE_H 31 | #include 32 | #endif 33 | 34 | #include 35 | #include 36 | 37 | #ifdef __STL_USE_NAMESPACES 38 | using __STD::hash; 39 | using __STD::hashtable; 40 | using __STD::hash_map; 41 | using __STD::hash_multimap; 42 | #endif /* __STL_USE_NAMESPACES */ 43 | 44 | 45 | #endif /* __SGI_STL_HASH_MAP_H */ 46 | 47 | // Local Variables: 48 | // mode:C++ 49 | // End: 50 | -------------------------------------------------------------------------------- /docs/hash_set: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1996 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | * 13 | * 14 | * Copyright (c) 1994 15 | * Hewlett-Packard Company 16 | * 17 | * Permission to use, copy, modify, distribute and sell this software 18 | * and its documentation for any purpose is hereby granted without fee, 19 | * provided that the above copyright notice appear in all copies and 20 | * that both that copyright notice and this permission notice appear 21 | * in supporting documentation. Hewlett-Packard Company makes no 22 | * representations about the suitability of this software for any 23 | * purpose. It is provided "as is" without express or implied warranty. 24 | * 25 | */ 26 | 27 | #ifndef __SGI_STL_HASH_SET 28 | #define __SGI_STL_HASH_SET 29 | 30 | #ifndef __SGI_STL_INTERNAL_HASHTABLE_H 31 | #include 32 | #endif 33 | 34 | #include 35 | 36 | #endif /* __SGI_STL_HASH_SET */ 37 | 38 | // Local Variables: 39 | // mode:C++ 40 | // End: 41 | -------------------------------------------------------------------------------- /docs/hash_set.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1996 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | * 13 | * 14 | * Copyright (c) 1994 15 | * Hewlett-Packard Company 16 | * 17 | * Permission to use, copy, modify, distribute and sell this software 18 | * and its documentation for any purpose is hereby granted without fee, 19 | * provided that the above copyright notice appear in all copies and 20 | * that both that copyright notice and this permission notice appear 21 | * in supporting documentation. Hewlett-Packard Company makes no 22 | * representations about the suitability of this software for any 23 | * purpose. It is provided "as is" without express or implied warranty. 24 | * 25 | */ 26 | 27 | #ifndef __SGI_STL_HASH_SET_H 28 | #define __SGI_STL_HASH_SET_H 29 | 30 | #ifndef __SGI_STL_INTERNAL_HASHTABLE_H 31 | #include 32 | #endif 33 | 34 | #include 35 | #include 36 | 37 | #ifdef __STL_USE_NAMESPACES 38 | using __STD::hash; 39 | using __STD::hashtable; 40 | using __STD::hash_set; 41 | using __STD::hash_multiset; 42 | #endif /* __STL_USE_NAMESPACES */ 43 | 44 | #endif /* __SGI_STL_HASH_SET_H */ 45 | -------------------------------------------------------------------------------- /docs/hashtable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1996,1997 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | * 13 | * 14 | * Copyright (c) 1994 15 | * Hewlett-Packard Company 16 | * 17 | * Permission to use, copy, modify, distribute and sell this software 18 | * and its documentation for any purpose is hereby granted without fee, 19 | * provided that the above copyright notice appear in all copies and 20 | * that both that copyright notice and this permission notice appear 21 | * in supporting documentation. Hewlett-Packard Company makes no 22 | * representations about the suitability of this software for any 23 | * purpose. It is provided "as is" without express or implied warranty. 24 | * 25 | */ 26 | 27 | /* NOTE: This is an internal header file, included by other STL headers. 28 | * You should not attempt to use it directly. 29 | */ 30 | 31 | #ifndef __SGI_STL_HASHTABLE_H 32 | #define __SGI_STL_HASHTABLE_H 33 | 34 | #include 35 | #include 36 | #include 37 | #include 38 | 39 | #ifdef __STL_USE_NAMESPACES 40 | using __STD::hash; 41 | using __STD::hashtable; 42 | #endif /* __STL_USE_NAMESPACES */ 43 | 44 | #endif /* __SGI_STL_HASHTABLE_H */ 45 | 46 | // Local Variables: 47 | // mode:C++ 48 | // End: 49 | -------------------------------------------------------------------------------- /docs/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * Copyright (c) 1997 15 | * Silicon Graphics Computer Systems, Inc. 16 | * 17 | * Permission to use, copy, modify, distribute and sell this software 18 | * and its documentation for any purpose is hereby granted without fee, 19 | * provided that the above copyright notice appear in all copies and 20 | * that both that copyright notice and this permission notice appear 21 | * in supporting documentation. Silicon Graphics makes no 22 | * representations about the suitability of this software for any 23 | * purpose. It is provided "as is" without express or implied warranty. 24 | */ 25 | 26 | #ifndef __SGI_STL_HEAP_H 27 | #define __SGI_STL_HEAP_H 28 | 29 | #include 30 | #include 31 | 32 | #ifdef __STL_USE_NAMESPACES 33 | 34 | using __STD::push_heap; 35 | using __STD::pop_heap; 36 | using __STD::make_heap; 37 | using __STD::sort_heap; 38 | 39 | #endif /* __STL_USE_NAMESPACES */ 40 | 41 | 42 | #endif /* __SGI_STL_HEAP_H */ 43 | 44 | // Local Variables: 45 | // mode:C++ 46 | // End: 47 | -------------------------------------------------------------------------------- /docs/input_iterator_tag.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | input_iterator_tag 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

input_iterator_tag

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: iteratorsComponent type: type
48 | 49 |

Description

50 | Input_iterator_tag is an empty class: it has no member functions, 51 | member variables, or nested types. It is used solely as a "tag": a 52 | representation of the Input Iterator concept within the C++ type 53 | system. Specifically, it is used as a return value for the function 54 | iterator_category. Iterator_category takes a single 55 | argument, an iterator, and returns an object whose type depends on the 56 | iterator's category. Iterator_category's return value is of 57 | type input_iterator_tag if its argument is an Input Iterator. 58 |

Example

59 | See iterator_category 60 |

Definition

61 | Defined in the standard header iterator, and in the 62 | nonstandard backward-compatibility header iterator.h. 63 |

Template parameters

64 | None. 65 |

Model of

66 | Assignable 67 |

Type requirements

68 | None. 69 |

Public base classes

70 | None. 71 |

Members

72 | None. 73 |

New Members

74 | None. 75 |

Notes

76 |

See also

77 | iterator_category, Iterator Tags, 78 | iterator_traits, 79 | output_iterator_tag, 80 | forward_iterator_tag, bidirectional_iterator_tag, 81 | random_access_iterator_tag 82 | 83 | 84 |
85 | [Silicon Surf] 87 | [STL Home] 89 |
90 | 91 | Copyright © 92 | 1999 Silicon Graphics, Inc. All Rights Reserved. 93 | TrademarkInformation 94 | 95 |

96 | 97 | 98 | -------------------------------------------------------------------------------- /docs/iota.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | iota 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

iota

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: algorithmsComponent type: function
48 | 49 |

Prototype

50 |
 51 | template <class ForwardIterator, class T>
 52 | void iota(ForwardIterator first, ForwardIterator last, T value);
 53 | 
54 |

Description

55 | Iota assigns sequentially increasing values to a range. That is, 56 | it assigns value to *first, value + 1 to *(first + 1) 57 | and so on. In general, each iterator i in the range [first, last) 58 | is assigned value + (i - first). [1] 59 |

Definition

60 | Defined in the standard header numeric, and in the nonstandard 61 | backward-compatibility header algo.h. This function is an SGI 62 | extension; it is not part of the C++ standard. 63 |

Requirements on types

64 | 76 |

Preconditions

77 | 81 |

Complexity

82 | Linear. Exactly last - first assignments. 83 |

Example

84 |
 85 | int main()
 86 | {
 87 |   vector<int> V(10);
 88 | 
 89 |   iota(V.begin(), V.end(), 7);
 90 |   copy(V.begin(), V.end(), ostream_iterator<int>(cout, " "));
 91 |   cout << endl; 
 92 | }
 93 | 
94 |

Notes

95 |

[1] 96 | The name iota is taken from the programming language APL. 97 |

See also

98 | fill, generate, partial_sum 99 | 100 | 101 |
102 | [Silicon Surf] 104 | [STL Home] 106 |
107 | 108 | Copyright © 109 | 1999 Silicon Graphics, Inc. All Rights Reserved. 110 | TrademarkInformation 111 | 112 |

113 | 114 | 115 | -------------------------------------------------------------------------------- /docs/iter_swap.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | iter_swap 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

iter_swap

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: algorithmsComponent type: function
48 | 49 |

Prototype

50 |
 51 | template <class ForwardIterator1, class ForwardIterator2>
 52 | inline void iter_swap(ForwardIterator1 a, ForwardIterator2 b);
 53 | 
54 |

Description

55 | Equivalent to swap(*a, *b). [1] 56 |

Definition

57 | Declared in algo.h. The implementation is in algobase.h. 58 |

Requirements on types

59 | 68 |

Preconditions

69 | 73 |

Complexity

74 | See swap for a discussion. 75 |

Example

76 |
 77 | int x = 1;
 78 | int y = 2;
 79 | assert(x == 1 && y == 2);
 80 | iter_swap(&x, &y);
 81 | assert(x == 2 && y == 1);
 82 | 
83 |

Notes

84 |

[1] 85 | Strictly speaking, iter_swap is redundant. It exists only for 86 | technical reasons: in some circumstances, some compilers have 87 | difficulty performing the type deduction required to interpret 88 | swap(*a, *b). 89 |

See also

90 | swap, swap_ranges 91 | 92 | 93 |
94 | [Silicon Surf] 96 | [STL Home] 98 |
99 | 100 | Copyright © 101 | 1999 Silicon Graphics, Inc. All Rights Reserved. 102 | TrademarkInformation 103 | 104 |

105 | 106 | 107 | -------------------------------------------------------------------------------- /docs/iterator: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_ITERATOR 28 | #define __SGI_STL_ITERATOR 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | #ifdef __STL_USE_NEW_IOSTREAMS 35 | #include 36 | #else /* __STL_USE_NEW_IOSTREAMS */ 37 | #include 38 | #endif /* __STL_USE_NEW_IOSTREAMS */ 39 | 40 | #include 41 | #include 42 | 43 | #endif /* __SGI_STL_ITERATOR */ 44 | 45 | // Local Variables: 46 | // mode:C++ 47 | // End: 48 | -------------------------------------------------------------------------------- /docs/iterator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_ITERATOR_H 28 | #define __SGI_STL_ITERATOR_H 29 | 30 | #ifndef __SGI_STL_FUNCTION_H 31 | #include 32 | #endif 33 | #include 34 | 35 | #ifdef __STL_USE_NEW_IOSTREAMS 36 | #include 37 | #else /* __STL_USE_NEW_IOSTREAMS */ 38 | #include 39 | #endif /* __STL_USE_NEW_IOSTREAMS */ 40 | 41 | #ifndef __SGI_STL_INTERNAL_ITERATOR_BASE_H 42 | #include 43 | #endif 44 | #ifndef __SGI_STL_INTERNAL_ITERATOR_H 45 | #include 46 | #endif 47 | #ifndef __TYPE_TRAITS_H 48 | #include 49 | #endif 50 | #ifndef __SGI_STL_INTERNAL_CONSTRUCT_H 51 | #include 52 | #endif 53 | #ifndef __SGI_STL_INTERNAL_RAW_STORAGE_ITERATOR_H 54 | #include 55 | #endif 56 | 57 | #ifdef __STL_USE_NAMESPACES 58 | 59 | // Names from stl_iterator.h 60 | 61 | using __STD::input_iterator_tag; 62 | using __STD::output_iterator_tag; 63 | using __STD::forward_iterator_tag; 64 | using __STD::bidirectional_iterator_tag; 65 | using __STD::random_access_iterator_tag; 66 | 67 | #if 0 68 | using __STD::iterator; 69 | #endif 70 | using __STD::input_iterator; 71 | using __STD::output_iterator; 72 | using __STD::forward_iterator; 73 | using __STD::bidirectional_iterator; 74 | using __STD::random_access_iterator; 75 | 76 | #ifdef __STL_CLASS_PARTIAL_SPECIALIZATION 77 | using __STD::iterator_traits; 78 | #endif 79 | 80 | using __STD::iterator_category; 81 | using __STD::distance_type; 82 | using __STD::value_type; 83 | 84 | using __STD::distance; 85 | using __STD::advance; 86 | 87 | using __STD::insert_iterator; 88 | using __STD::front_insert_iterator; 89 | using __STD::back_insert_iterator; 90 | using __STD::inserter; 91 | using __STD::front_inserter; 92 | using __STD::back_inserter; 93 | 94 | using __STD::reverse_iterator; 95 | using __STD::reverse_bidirectional_iterator; 96 | 97 | using __STD::istream_iterator; 98 | using __STD::ostream_iterator; 99 | 100 | // Names from stl_construct.h 101 | using __STD::construct; 102 | using __STD::destroy; 103 | 104 | // Names from stl_raw_storage_iter.h 105 | using __STD::raw_storage_iterator; 106 | 107 | #endif /* __STL_USE_NAMESPACES */ 108 | 109 | #endif /* __SGI_STL_ITERATOR_H */ 110 | 111 | // Local Variables: 112 | // mode:C++ 113 | // End: 114 | -------------------------------------------------------------------------------- /docs/iterators.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/iterators.gif -------------------------------------------------------------------------------- /docs/list: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_LIST 28 | #define __SGI_STL_LIST 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #endif /* __SGI_STL_LIST */ 37 | 38 | // Local Variables: 39 | // mode:C++ 40 | // End: 41 | -------------------------------------------------------------------------------- /docs/list.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_LIST_H 28 | #define __SGI_STL_LIST_H 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | #ifdef __STL_USE_NAMESPACES 35 | using __STD::list; 36 | #endif /* __STL_USE_NAMESPACES */ 37 | 38 | #endif /* __SGI_STL_LIST_H */ 39 | 40 | // Local Variables: 41 | // mode:C++ 42 | // End: 43 | -------------------------------------------------------------------------------- /docs/logosmall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/logosmall.gif -------------------------------------------------------------------------------- /docs/map: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_MAP 28 | #define __SGI_STL_MAP 29 | 30 | #ifndef __SGI_STL_INTERNAL_TREE_H 31 | #include 32 | #endif 33 | #include 34 | #include 35 | 36 | #endif /* __SGI_STL_MAP */ 37 | 38 | // Local Variables: 39 | // mode:C++ 40 | // End: 41 | -------------------------------------------------------------------------------- /docs/map.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_MAP_H 28 | #define __SGI_STL_MAP_H 29 | 30 | #ifndef __SGI_STL_INTERNAL_TREE_H 31 | #include 32 | #endif 33 | #include 34 | #include 35 | #include 36 | 37 | #ifdef __STL_USE_NAMESPACES 38 | using __STD::rb_tree; 39 | using __STD::map; 40 | #endif /* __STL_USE_NAMESPACES */ 41 | 42 | #endif /* __SGI_STL_MAP_H */ 43 | 44 | // Local Variables: 45 | // mode:C++ 46 | // End: 47 | -------------------------------------------------------------------------------- /docs/max.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | max 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

max

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
Categories: algorithms, utilitiesComponent type: function
52 | 53 |

Prototype

54 | Max is an overloaded name; there are actually two 55 | max functions. 56 |
 57 | template <class T> const T& max(const T& a, const T& b);
 58 | 
 59 | template <class T, class BinaryPredicate>
 60 | const T& max(const T& a, const T& b, BinaryPredicate comp);
 61 | 
62 |

Description

63 | Max returns the greater of its two arguments; it returns the first 64 | argument if neither is greater than the other. 65 |

66 | The two versions of max differ in how they define whether one 67 | element is less than another. The first version compares 68 | objects using operator<, and the second compares objects using 69 | the function object comp. 70 |

Definition

71 | Defined in the standard header algorithm, and in the nonstandard 72 | backward-compatibility header algo.h. 73 |

Requirements on types

74 | For the first version: 75 | 79 | For the second version: 80 | 87 |

Preconditions

88 |

Complexity

89 |

Example

90 |
 91 | const int x = max(3, 9);
 92 | assert(x == 9);
 93 | 
94 |

Notes

95 |

See also

96 | min, min_element, max_element, LessThan Comparable 97 | 98 | 99 |
100 | [Silicon Surf] 102 | [STL Home] 104 |
105 | 106 | Copyright © 107 | 1999 Silicon Graphics, Inc. All Rights Reserved. 108 | TrademarkInformation 109 | 110 |

111 | 112 | 113 | -------------------------------------------------------------------------------- /docs/memory: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997-1999 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | * 13 | */ 14 | 15 | #ifndef __SGI_STL_MEMORY 16 | #define __SGI_STL_MEMORY 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | 26 | __STL_BEGIN_NAMESPACE 27 | 28 | #if defined(__SGI_STL_USE_AUTO_PTR_CONVERSIONS) && \ 29 | defined(__STL_MEMBER_TEMPLATES) 30 | 31 | template struct auto_ptr_ref { 32 | _Tp1* _M_ptr; 33 | auto_ptr_ref(_Tp1* __p) : _M_ptr(__p) {} 34 | }; 35 | 36 | #endif 37 | 38 | template class auto_ptr { 39 | private: 40 | _Tp* _M_ptr; 41 | 42 | public: 43 | typedef _Tp element_type; 44 | 45 | explicit auto_ptr(_Tp* __p = 0) __STL_NOTHROW : _M_ptr(__p) {} 46 | auto_ptr(auto_ptr& __a) __STL_NOTHROW : _M_ptr(__a.release()) {} 47 | 48 | #ifdef __STL_MEMBER_TEMPLATES 49 | template auto_ptr(auto_ptr<_Tp1>& __a) __STL_NOTHROW 50 | : _M_ptr(__a.release()) {} 51 | #endif /* __STL_MEMBER_TEMPLATES */ 52 | 53 | auto_ptr& operator=(auto_ptr& __a) __STL_NOTHROW { 54 | if (&__a != this) { 55 | delete _M_ptr; 56 | _M_ptr = __a.release(); 57 | } 58 | return *this; 59 | } 60 | 61 | #ifdef __STL_MEMBER_TEMPLATES 62 | template 63 | auto_ptr& operator=(auto_ptr<_Tp1>& __a) __STL_NOTHROW { 64 | if (__a.get() != this->get()) { 65 | delete _M_ptr; 66 | _M_ptr = __a.release(); 67 | } 68 | return *this; 69 | } 70 | #endif /* __STL_MEMBER_TEMPLATES */ 71 | 72 | // Note: The C++ standard says there is supposed to be an empty throw 73 | // specification here, but omitting it is standard conforming. Its 74 | // presence can be detected only if _Tp::~_Tp() throws, but (17.4.3.6/2) 75 | // this is prohibited. 76 | ~auto_ptr() { delete _M_ptr; } 77 | 78 | _Tp& operator*() const __STL_NOTHROW { 79 | return *_M_ptr; 80 | } 81 | _Tp* operator->() const __STL_NOTHROW { 82 | return _M_ptr; 83 | } 84 | _Tp* get() const __STL_NOTHROW { 85 | return _M_ptr; 86 | } 87 | _Tp* release() __STL_NOTHROW { 88 | _Tp* __tmp = _M_ptr; 89 | _M_ptr = 0; 90 | return __tmp; 91 | } 92 | void reset(_Tp* __p = 0) __STL_NOTHROW { 93 | if (__p != _M_ptr) { 94 | delete _M_ptr; 95 | _M_ptr = __p; 96 | } 97 | } 98 | 99 | // According to the C++ standard, these conversions are required. Most 100 | // present-day compilers, however, do not enforce that requirement---and, 101 | // in fact, most present-day compilers do not support the language 102 | // features that these conversions rely on. 103 | 104 | #if defined(__SGI_STL_USE_AUTO_PTR_CONVERSIONS) && \ 105 | defined(__STL_MEMBER_TEMPLATES) 106 | 107 | public: 108 | auto_ptr(auto_ptr_ref<_Tp> __ref) __STL_NOTHROW 109 | : _M_ptr(__ref._M_ptr) {} 110 | 111 | auto_ptr& operator=(auto_ptr_ref<_Tp> __ref) __STL_NOTHROW { 112 | if (__ref._M_ptr != this->get()) { 113 | delete _M_ptr; 114 | _M_ptr = __ref._M_ptr; 115 | } 116 | return *this; 117 | } 118 | 119 | template operator auto_ptr_ref<_Tp1>() __STL_NOTHROW 120 | { return auto_ptr_ref<_Tp1>(this->release()); } 121 | template operator auto_ptr<_Tp1>() __STL_NOTHROW 122 | { return auto_ptr<_Tp1>(this->release()); } 123 | 124 | #endif /* auto ptr conversions && member templates */ 125 | }; 126 | 127 | __STL_END_NAMESPACE 128 | 129 | #endif /* __SGI_STL_MEMORY */ 130 | 131 | 132 | // Local Variables: 133 | // mode:C++ 134 | // End: 135 | -------------------------------------------------------------------------------- /docs/min.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | min 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

min

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
Categories: algorithms, utilitiesComponent type: function
52 | 53 |

Prototype

54 | Min is an overloaded name; there are actually two 55 | min functions. 56 |
 57 | template <class T> const T& min(const T& a, const T& b);
 58 | 
 59 | template <class T, class BinaryPredicate>
 60 | const T& min(const T& a, const T& b, BinaryPredicate comp);
 61 | 
62 |

Description

63 | Min returns the lesser of its two arguments; it returns the first 64 | argument if neither is less than the other. 65 |

66 | The two versions of min differ in how they define whether one 67 | element is less than another. The first version compares 68 | objects using operator<, and the second compares objects using 69 | the function object comp. 70 |

Definition

71 | Defined in the standard header algorithm, and in the nonstandard 72 | backward-compatibility header algo.h. 73 |

Requirements on types

74 | For the first version: 75 | 79 | For the second version: 80 | 87 |

Preconditions

88 |

Complexity

89 |

Example

90 |
 91 | const int x = min(3, 9);
 92 | assert(x == 3);
 93 | 
94 |

Notes

95 |

See also

96 | max, min_element, max_element, LessThan Comparable 97 | 98 | 99 |
100 | [Silicon Surf] 102 | [STL Home] 104 |
105 | 106 | Copyright © 107 | 1999 Silicon Graphics, Inc. All Rights Reserved. 108 | TrademarkInformation 109 | 110 |

111 | 112 | 113 | -------------------------------------------------------------------------------- /docs/multimap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_MULTIMAP_H 28 | #define __SGI_STL_MULTIMAP_H 29 | 30 | #ifndef __SGI_STL_INTERNAL_TREE_H 31 | #include 32 | #endif 33 | #include 34 | #include 35 | #include 36 | 37 | #ifdef __STL_USE_NAMESPACES 38 | using __STD::rb_tree; 39 | using __STD::multimap; 40 | #endif /* __STL_USE_NAMESPACES */ 41 | 42 | #endif /* __SGI_STL_MULTIMAP_H */ 43 | 44 | // Local Variables: 45 | // mode:C++ 46 | // End: 47 | -------------------------------------------------------------------------------- /docs/multiset.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_MULTISET_H 28 | #define __SGI_STL_MULTISET_H 29 | 30 | #ifndef __SGI_STL_INTERNAL_TREE_H 31 | #include 32 | #endif 33 | #include 34 | #include 35 | #include 36 | 37 | #ifdef __STL_USE_NAMESPACES 38 | using __STD::rb_tree; 39 | using __STD::multiset; 40 | #endif /* __STL_USE_NAMESPACES */ 41 | 42 | #endif /* __SGI_STL_MULTISET_H */ 43 | 44 | // Local Variables: 45 | // mode:C++ 46 | // End: 47 | -------------------------------------------------------------------------------- /docs/numeric: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_NUMERIC 28 | #define __SGI_STL_NUMERIC 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | #ifdef __STL_USE_NEW_IOSTREAMS 35 | #include 36 | #else /* __STL_USE_NEW_IOSTREAMS */ 37 | #include 38 | #endif /* __STL_USE_NEW_IOSTREAMS */ 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #endif /* __SGI_STL_NUMERIC */ 46 | 47 | // Local Variables: 48 | // mode:C++ 49 | // End: 50 | -------------------------------------------------------------------------------- /docs/output_iterator_tag.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | output_iterator_tag 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

output_iterator_tag

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: iteratorsComponent type: type
48 | 49 |

Description

50 | Output_iterator_tag is an empty class: it has no member functions, 51 | member variables, or nested types. It is used solely as a "tag": a 52 | representation of the Output Iterator concept within the C++ type 53 | system. Specifically, it is used as a return value for the function 54 | iterator_category. Iterator_category takes a single 55 | argument, an iterator, and returns an object whose type depends on the 56 | iterator's category. Iterator_category's return value is of 57 | type output_iterator_tag if its argument is an Output Iterator. 58 |

Example

59 | See iterator_category 60 |

Definition

61 | Defined in the standard header iterator, and in the 62 | nonstandard backward-compatibility header iterator.h. 63 |

Template parameters

64 | None. 65 |

Model of

66 | Assignable 67 |

Type requirements

68 | None. 69 |

Public base classes

70 | None. 71 |

Members

72 | None. 73 |

New Members

74 | None. 75 |

Notes

76 |

See also

77 | iterator_category, Iterator Tags, 78 | iterator_traits, 79 | input_iterator_tag, 80 | forward_iterator_tag, bidirectional_iterator_tag, 81 | random_access_iterator_tag 82 | 83 | 84 |
85 | [Silicon Surf] 87 | [STL Home] 89 |
90 | 91 | Copyright © 92 | 1999 Silicon Graphics, Inc. All Rights Reserved. 93 | TrademarkInformation 94 | 95 |

96 | 97 | 98 | -------------------------------------------------------------------------------- /docs/overview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/overview.gif -------------------------------------------------------------------------------- /docs/overview_dot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/overview_dot.gif -------------------------------------------------------------------------------- /docs/pair.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_PAIR_H 28 | #define __SGI_STL_PAIR_H 29 | 30 | #ifndef __STL_CONFIG_H 31 | #include 32 | #endif 33 | #ifndef __SGI_STL_INTERNAL_RELOPS 34 | #include 35 | #endif 36 | #ifndef __SGI_STL_INTERNAL_PAIR_H 37 | #include 38 | #endif 39 | 40 | #ifdef __STL_USE_NAMESPACES 41 | 42 | using __STD::pair; 43 | using __STD::make_pair; 44 | 45 | #endif /* __STL_USE_NAMESPACES */ 46 | 47 | #endif /* __SGI_STL_PAIR_H */ 48 | 49 | // Local Variables: 50 | // mode:C++ 51 | // End: 52 | -------------------------------------------------------------------------------- /docs/pthread_alloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1996-1997 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | */ 13 | 14 | #ifndef __SGI_STL_PTHREAD_ALLOC_H 15 | #define __SGI_STL_PTHREAD_ALLOC_H 16 | 17 | #include 18 | 19 | #ifdef __STL_USE_NAMESPACES 20 | 21 | using __STD::_Pthread_alloc_template; 22 | using __STD::pthread_alloc; 23 | 24 | #endif /* __STL_USE_NAMESPACES */ 25 | 26 | 27 | #endif /* __SGI_STL_PTHREAD_ALLOC_H */ 28 | 29 | // Local Variables: 30 | // mode:C++ 31 | // End: 32 | -------------------------------------------------------------------------------- /docs/ptr_fun.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | ptr_fun 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

ptr_fun

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
Categories: functors, adaptorsComponent type: function
52 | 53 |

Prototype

54 |
 55 | template <class Arg, class Result>
 56 | pointer_to_unary_function<Arg, Result> 
 57 | ptr_fun(Result (*x)(Arg));
 58 | 
 59 | template <class Arg1, class Arg2, class Result>
 60 | pointer_to_binary_function<Arg1, Arg2, Result> 
 61 | ptr_fun(Result (*x)(Arg1, Arg2));
 62 | 
63 |

Description

64 | Ptr_fun takes a function pointer as its argument and 65 | returns a function pointer adaptor, a type of function object. 66 | It is actually two different functions, not one (that is, the name 67 | ptr_fun is overloaded). If its argument is of type 68 | Result (*)(Arg) then ptr_fun creates a 69 | pointer_to_unary_function, and if its argument is of type 70 | Result (*)(Arg1, Arg2) then ptr_fun creates a 71 | pointer_to_binary_function. 72 |

Definition

73 | Defined in the standard header functional, and in the nonstandard 74 | backward-compatibility header function.h. 75 |

Requirements on types

76 | The argument must be a pointer to a function that takes either 77 | one or two arguments. The argument type(s) and the return type 78 | of the function are arbitrary, with the restriction that the function 79 | must return a value; it may not be a void function. 80 |

Preconditions

81 |

Complexity

82 |

Example

83 | See the examples in the discussions of pointer_to_unary_function 84 | and pointer_to_binary_function. 85 |

Notes

86 |

See also

87 | Function Objects, pointer_to_unary_function, 88 | pointer_to_binary_function, Adaptable Unary Function, 89 | Adaptable Binary Function 90 | 91 | 92 |
93 | [Silicon Surf] 95 | [STL Home] 97 |
98 | 99 | Copyright © 100 | 1999 Silicon Graphics, Inc. All Rights Reserved. 101 | TrademarkInformation 102 | 103 |

104 | 105 | 106 | -------------------------------------------------------------------------------- /docs/queue: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_QUEUE 28 | #define __SGI_STL_QUEUE 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | 41 | #endif /* __SGI_STL_QUEUE */ 42 | 43 | // Local Variables: 44 | // mode:C++ 45 | // End: 46 | -------------------------------------------------------------------------------- /docs/random_access_iterator_tag.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | random_access_iterator_tag 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

random_access_iterator_tag

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: iteratorsComponent type: type
48 | 49 |

Description

50 | Random_access_iterator_tag is an empty class: it has no member functions, 51 | member variables, or nested types. It is used solely as a "tag": a 52 | representation of the Random Access Iterator concept within the C++ type 53 | system. Specifically, it is used as a return value for the function 54 | iterator_category. Iterator_category takes a single 55 | argument, an iterator, and returns an object whose type depends on the 56 | iterator's category. Iterator_category's return value is of 57 | type random_access_iterator_tag if its argument is a Random Access Iterator. 58 |

Example

59 | See iterator_category 60 |

Definition

61 | Defined in the standard header iterator, and in the 62 | nonstandard backward-compatibility header iterator.h. 63 |

Template parameters

64 | None. 65 |

Model of

66 | Assignable 67 |

Type requirements

68 | None. 69 |

Public base classes

70 | None. 71 |

Members

72 | None. 73 |

New Members

74 | None. 75 |

Notes

76 |

See also

77 | iterator_category, Iterator Tags, 78 | iterator_traits, 79 | output_iterator_tag, input_iterator_tag, 80 | forward_iterator_tag, bidirectional_iterator_tag 81 | 82 | 83 |
84 | [Silicon Surf] 86 | [STL Home] 88 |
89 | 90 | Copyright © 91 | 1999 Silicon Graphics, Inc. All Rights Reserved. 92 | TrademarkInformation 93 | 94 |

95 | 96 | 97 | -------------------------------------------------------------------------------- /docs/replace.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | replace 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

replace

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: algorithmsComponent type: function
48 | 49 |

Prototype

50 |
 51 | template <class ForwardIterator, class T>
 52 | void replace(ForwardIterator first, ForwardIterator last, const T& old_value,
 53 |              const T& new_value)
 54 | 
55 |

Description

56 | Replace replaces every element in the range [first, last) 57 | equal to old_value with new_value. That is: for every iterator i, 58 | if *i == old_value then it performs the assignment *i = new_value. 59 |

Definition

60 | Defined in the standard header algorithm, and in the nonstandard 61 | backward-compatibility header algo.h. 62 |

Requirements on types

63 | 76 |

Preconditions

77 | 81 |

Complexity

82 | Linear. Replace performs exactly last - first comparisons for 83 | equality, and at most last - first assignments. 84 |

Example

85 |
 86 | vector<int> V;
 87 | V.push_back(1);
 88 | V.push_back(2);
 89 | V.push_back(3);
 90 | V.push_back(1);
 91 | 
 92 | replace(V.begin(), V.end(), 1, 99);
 93 | assert(V[0] == 99 && V[3] == 99);
 94 | 
95 |

Notes

96 |

See also

97 | replace_if, replace_copy, replace_copy_if 98 | 99 | 100 |
101 | [Silicon Surf] 103 | [STL Home] 105 |
106 | 107 | Copyright © 108 | 1999 Silicon Graphics, Inc. All Rights Reserved. 109 | TrademarkInformation 110 | 111 |

112 | 113 | 114 | -------------------------------------------------------------------------------- /docs/replace_if.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | replace_if 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

replace_if

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: algorithmsComponent type: function
48 | 49 |

Prototype

50 |
 51 | template <class ForwardIterator, class Predicate, class T>
 52 | void replace_if(ForwardIterator first, ForwardIterator last, Predicate pred
 53 |                 const T& new_value)
 54 | 
55 |

Description

56 | Replace_if replaces every element in the range [first, last) for 57 | which pred returns true with new_value. That is: for every 58 | iterator i, if pred(*i) is true then it performs the assignment *i 59 | = new_value. 60 |

Definition

61 | Defined in the standard header algorithm, and in the nonstandard 62 | backward-compatibility header algo.h. 63 |

Requirements on types

64 | 79 |

Preconditions

80 | 84 |

Complexity

85 | Linear. Replace_if performs exactly last - first applications of 86 | pred, and at most last - first assignments. 87 |

Example

88 | Replace every negative number with 0. 89 |
 90 | vector<int> V;
 91 | V.push_back(1);
 92 | V.push_back(-3);
 93 | V.push_back(2);
 94 | V.push_back(-1);
 95 | 
 96 | replace_if(V.begin(), V.end(), bind2nd(less<int>(), 0), -1);
 97 | assert(V[1] == 0 && V[3] == 0);
 98 | 
99 |

Notes

100 |

See also

101 | replace, replace_copy, replace_copy_if 102 | 103 | 104 |
105 | [Silicon Surf] 107 | [STL Home] 109 |
110 | 111 | Copyright © 112 | 1999 Silicon Graphics, Inc. All Rights Reserved. 113 | TrademarkInformation 114 | 115 |

116 | 117 | 118 | -------------------------------------------------------------------------------- /docs/return_temporary_buffer.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | return_temporary_buffer 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

return_temporary_buffer

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: allocatorsComponent type: function
48 | 49 |

Prototype

50 |
 51 | template <class T> void return_temporary_buffer(T* p);
 52 | 
53 |

Description

54 | Return_temporary_buffer is used to deallocate memory that was allocated 55 | using get_temporary_buffer. [1] 56 |

57 | Note: get_temporary_buffer and return_temporary_buffer are 58 | only provided for backward compatibility. If you are writing new 59 | code, you should instead use the temporary_buffer class. 60 |

Definition

61 | Defined in the standard header memory, and in the nonstandard 62 | backward-compatibility header algo.h. 63 |

Requirements on types

64 |

Preconditions

65 | The argument p is a pointer to a block of memory that was allocated 66 | using get_temporary_buffer(ptrdiff_t, T*). 67 |

Complexity

68 |

Example

69 |
 70 | int main()
 71 | {
 72 |   pair<int*, ptrdiff_t> P = get_temporary_buffer(10000, (int*) 0);
 73 |   int* buf = P.first;
 74 |   ptrdiff_t N = P.second;
 75 |   uninitialized_fill_n(buf, N, 42);
 76 |   int* result = find_if(buf, buf + N, bind2nd(not_equal_to<int>(), 42));
 77 |   assert(result == buf + N);
 78 |   return_temporary_buffer(buf);
 79 | }        
 80 | 
81 |

Notes

82 |

[1] 83 | As is always true, memory that was allocated using a particular 84 | allocation function must be deallocated using the corresponding 85 | deallocation function. Memory obtained using get_temporary_buffer 86 | must be deallocated using return_temporary_buffer, rather than 87 | using free or ::operator delete. 88 |

See also

89 | temporary_buffer, get_temporary_buffer, Allocators 90 | 91 | 92 |
93 | [Silicon Surf] 95 | [STL Home] 97 |
98 | 99 | Copyright © 100 | 1999 Silicon Graphics, Inc. All Rights Reserved. 101 | TrademarkInformation 102 | 103 |

104 | 105 | 106 | -------------------------------------------------------------------------------- /docs/reverse.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | reverse 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

reverse

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: algorithmsComponent type: function
48 | 49 |

Prototype

50 |
 51 | template <class BidirectionalIterator>
 52 | void reverse(BidirectionalIterator first, BidirectionalIterator last);
 53 | 
54 |

Description

55 | Reverse reverses a range. That is: for every i such that 56 | 0 <= i <= (last - first) / 2), it exchanges 57 | *(first + i) and *(last - (i + 1)). 58 |

Definition

59 | Defined in the standard header algorithm, and in the nonstandard 60 | backward-compatibility header algo.h. 61 |

Requirements on types

62 | 68 |

Preconditions

69 | 73 |

Complexity

74 | Linear: reverse(first, last) makes (last - first) / 2 calls 75 | to swap. 76 |

Example

77 |
 78 | vector<int> V;
 79 | V.push_back(0);
 80 | V.push_back(1);
 81 | V.push_back(2);
 82 | copy(V.begin(), V.end(), ostream_iterator<int>(cout, " "));
 83 |                 // Output: 0 1 2
 84 | reverse(V.begin(), V.end());
 85 | copy(V.begin(), V.end(), ostream_iterator<int>(cout, " "));
 86 |                 // Output: 2 1 0
 87 | 
88 |

Notes

89 |

See also

90 | reverse_copy 91 | 92 | 93 |
94 | [Silicon Surf] 96 | [STL Home] 98 |
99 | 100 | Copyright © 101 | 1999 Silicon Graphics, Inc. All Rights Reserved. 102 | TrademarkInformation 103 | 104 |

105 | 106 | 107 | -------------------------------------------------------------------------------- /docs/rope: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | */ 13 | 14 | #ifndef __SGI_STL_ROPE 15 | #define __SGI_STL_ROPE 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #endif /* __SGI_STL_ROPE */ 29 | 30 | // Local Variables: 31 | // mode:C++ 32 | // End: 33 | -------------------------------------------------------------------------------- /docs/rope.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | */ 13 | 14 | #ifndef __SGI_STL_ROPE_H 15 | #define __SGI_STL_ROPE_H 16 | 17 | #include 18 | #include 19 | 20 | #ifdef __STL_USE_NAMESPACES 21 | 22 | using __STD::char_producer; 23 | using __STD::sequence_buffer; 24 | using __STD::rope; 25 | using __STD::crope; 26 | using __STD::wrope; 27 | 28 | #endif /* __STL_USE_NAMESPACES */ 29 | 30 | #endif /* __SGI_STL_ROPE_H */ 31 | 32 | // Local Variables: 33 | // mode:C++ 34 | // End: 35 | -------------------------------------------------------------------------------- /docs/set: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_SET 28 | #define __SGI_STL_SET 29 | 30 | #ifndef __SGI_STL_INTERNAL_TREE_H 31 | #include 32 | #endif 33 | #include 34 | #include 35 | 36 | #endif /* __SGI_STL_SET */ 37 | 38 | // Local Variables: 39 | // mode:C++ 40 | // End: 41 | -------------------------------------------------------------------------------- /docs/set.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_SET_H 28 | #define __SGI_STL_SET_H 29 | 30 | #ifndef __SGI_STL_INTERNAL_TREE_H 31 | #include 32 | #endif 33 | #include 34 | #include 35 | #include 36 | 37 | #ifdef __STL_USE_NAMESPACES 38 | using __STD::rb_tree; 39 | using __STD::set; 40 | #endif /* __STL_USE_NAMESPACES */ 41 | 42 | #endif /* __SGI_STL_SET_H */ 43 | 44 | // Local Variables: 45 | // mode:C++ 46 | // End: 47 | -------------------------------------------------------------------------------- /docs/sgilogo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/sgilogo.gif -------------------------------------------------------------------------------- /docs/slist: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | * 13 | */ 14 | 15 | #ifndef __SGI_STL_SLIST 16 | #define __SGI_STL_SLIST 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #endif /* __SGI_STL_SLIST */ 25 | 26 | // Local Variables: 27 | // mode:C++ 28 | // End: 29 | -------------------------------------------------------------------------------- /docs/slist.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | * 13 | */ 14 | 15 | #ifndef __SGI_STL_SLIST_H 16 | #define __SGI_STL_SLIST_H 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | #ifdef __STL_USE_NAMESPACES 23 | using __STD::slist; 24 | #endif /* __STL_USE_NAMESPACES */ 25 | 26 | #endif /* __SGI_STL_SLIST_H */ 27 | 28 | // Local Variables: 29 | // mode:C++ 30 | // End: 31 | -------------------------------------------------------------------------------- /docs/stack: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_STACK 28 | #define __SGI_STL_STACK 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #endif /* __SGI_STL_STACK */ 38 | 39 | // Local Variables: 40 | // mode:C++ 41 | // End: 42 | -------------------------------------------------------------------------------- /docs/stack.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_STACK_H 28 | #define __SGI_STL_STACK_H 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #ifdef __STL_USE_NAMESPACES 37 | using __STD::stack; 38 | using __STD::queue; 39 | using __STD::priority_queue; 40 | #endif /* __STL_USE_NAMESPACES */ 41 | 42 | #endif /* __SGI_STL_STACK_H */ 43 | 44 | // Local Variables: 45 | // mode:C++ 46 | // End: 47 | -------------------------------------------------------------------------------- /docs/stdexcept: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | */ 13 | 14 | #ifndef __SGI_STDEXCEPT 15 | #define __SGI_STDEXCEPT 16 | 17 | #include 18 | 19 | #if defined(__STL_USE_EXCEPTIONS) || \ 20 | !(defined(_MIPS_SIM) && defined(_ABIO32) && _MIPS_SIM == _ABIO32) 21 | 22 | #include 23 | 24 | __STL_BEGIN_NAMESPACE 25 | 26 | class __Named_exception : public __STL_EXCEPTION_BASE { 27 | public: 28 | __Named_exception(const string& __str) { 29 | strncpy(_M_name, __get_c_string(__str), _S_bufsize); 30 | _M_name[_S_bufsize - 1] = '\0'; 31 | } 32 | virtual const char* what() const __STL_NOTHROW { return _M_name; } 33 | 34 | private: 35 | enum { _S_bufsize = 256 }; 36 | char _M_name[_S_bufsize]; 37 | }; 38 | 39 | class logic_error : public __Named_exception { 40 | public: 41 | logic_error(const string& __s) : __Named_exception(__s) {} 42 | }; 43 | 44 | class runtime_error : public __Named_exception { 45 | public: 46 | runtime_error(const string& __s) : __Named_exception(__s) {} 47 | }; 48 | 49 | class domain_error : public logic_error { 50 | public: 51 | domain_error(const string& __arg) : logic_error(__arg) {} 52 | }; 53 | 54 | class invalid_argument : public logic_error { 55 | public: 56 | invalid_argument(const string& __arg) : logic_error(__arg) {} 57 | }; 58 | 59 | class length_error : public logic_error { 60 | public: 61 | length_error(const string& __arg) : logic_error(__arg) {} 62 | }; 63 | 64 | class out_of_range : public logic_error { 65 | public: 66 | out_of_range(const string& __arg) : logic_error(__arg) {} 67 | }; 68 | 69 | class range_error : public runtime_error { 70 | public: 71 | range_error(const string& __arg) : runtime_error(__arg) {} 72 | }; 73 | 74 | class overflow_error : public runtime_error { 75 | public: 76 | overflow_error(const string& __arg) : runtime_error(__arg) {} 77 | }; 78 | 79 | class underflow_error : public runtime_error { 80 | public: 81 | underflow_error(const string& __arg) : runtime_error(__arg) {} 82 | }; 83 | 84 | __STL_END_NAMESPACE 85 | 86 | #ifndef __SGI_STL_STRING 87 | #include 88 | #endif 89 | 90 | #endif /* Not o32, and no exceptions */ 91 | 92 | #endif /* __SGI_STDEXCEPT */ 93 | 94 | // Local Variables: 95 | // mode:C++ 96 | // End: 97 | -------------------------------------------------------------------------------- /docs/stl_construct.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | /* NOTE: This is an internal header file, included by other STL headers. 28 | * You should not attempt to use it directly. 29 | */ 30 | 31 | #ifndef __SGI_STL_INTERNAL_CONSTRUCT_H 32 | #define __SGI_STL_INTERNAL_CONSTRUCT_H 33 | 34 | #include 35 | 36 | __STL_BEGIN_NAMESPACE 37 | 38 | // construct and destroy. These functions are not part of the C++ standard, 39 | // and are provided for backward compatibility with the HP STL. We also 40 | // provide internal names _Construct and _Destroy that can be used within 41 | // the library, so that standard-conforming pieces don't have to rely on 42 | // non-standard extensions. 43 | 44 | // Internal names 45 | 46 | template 47 | inline void _Construct(_T1* __p, const _T2& __value) { 48 | new ((void*) __p) _T1(__value); 49 | } 50 | 51 | template 52 | inline void _Construct(_T1* __p) { 53 | new ((void*) __p) _T1(); 54 | } 55 | 56 | template 57 | inline void _Destroy(_Tp* __pointer) { 58 | __pointer->~_Tp(); 59 | } 60 | 61 | template 62 | void 63 | __destroy_aux(_ForwardIterator __first, _ForwardIterator __last, __false_type) 64 | { 65 | for ( ; __first != __last; ++__first) 66 | destroy(&*__first); 67 | } 68 | 69 | template 70 | inline void __destroy_aux(_ForwardIterator, _ForwardIterator, __true_type) {} 71 | 72 | template 73 | inline void 74 | __destroy(_ForwardIterator __first, _ForwardIterator __last, _Tp*) 75 | { 76 | typedef typename __type_traits<_Tp>::has_trivial_destructor 77 | _Trivial_destructor; 78 | __destroy_aux(__first, __last, _Trivial_destructor()); 79 | } 80 | 81 | template 82 | inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last) { 83 | __destroy(__first, __last, __VALUE_TYPE(__first)); 84 | } 85 | 86 | inline void _Destroy(char*, char*) {} 87 | inline void _Destroy(int*, int*) {} 88 | inline void _Destroy(long*, long*) {} 89 | inline void _Destroy(float*, float*) {} 90 | inline void _Destroy(double*, double*) {} 91 | #ifdef __STL_HAS_WCHAR_T 92 | inline void _Destroy(wchar_t*, wchar_t*) {} 93 | #endif /* __STL_HAS_WCHAR_T */ 94 | 95 | // -------------------------------------------------- 96 | // Old names from the HP STL. 97 | 98 | template 99 | inline void construct(_T1* __p, const _T2& __value) { 100 | _Construct(__p, __value); 101 | } 102 | 103 | template 104 | inline void construct(_T1* __p) { 105 | _Construct(__p); 106 | } 107 | 108 | template 109 | inline void destroy(_Tp* __pointer) { 110 | _Destroy(__pointer); 111 | } 112 | 113 | template 114 | inline void destroy(_ForwardIterator __first, _ForwardIterator __last) { 115 | _Destroy(__first, __last); 116 | } 117 | 118 | __STL_END_NAMESPACE 119 | 120 | #endif /* __SGI_STL_INTERNAL_CONSTRUCT_H */ 121 | 122 | // Local Variables: 123 | // mode:C++ 124 | // End: 125 | -------------------------------------------------------------------------------- /docs/stl_ctraits_fns.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | */ 13 | 14 | // WARNING: This is an internal header file, included by other C++ 15 | // standard library headers. You should not attempt to use this header 16 | // file directly. 17 | 18 | #ifndef __SGI_STL_INTERNAL_CTRAITS_FUNCTIONS_H 19 | #define __SGI_STL_INTERNAL_CTRAITS_FUNCTIONS_H 20 | 21 | // This file contains a few small adapters that allow a character 22 | // traits class to be used as a function object. 23 | 24 | __STL_BEGIN_NAMESPACE 25 | 26 | template 27 | struct _Eq_traits 28 | : public binary_function 31 | { 32 | bool operator()(const typename _Traits::char_type& __x, 33 | const typename _Traits::char_type& __y) const 34 | { return _Traits::eq(__x, __y); } 35 | }; 36 | 37 | template 38 | struct _Eq_int_traits 39 | : public binary_function 42 | { 43 | bool operator()(const typename _Traits::char_type& __x, 44 | const typename _Traits::int_type& __y) const 45 | { return _Traits::eq_int_type(_Traits::to_int_type(__x), __y); } 46 | }; 47 | 48 | template 49 | struct _Lt_traits 50 | : public binary_function 53 | { 54 | bool operator()(const typename _Traits::char_type& __x, 55 | const typename _Traits::char_type& __y) const 56 | { return _Traits::lt(__x, __y); } 57 | }; 58 | 59 | __STL_END_NAMESPACE 60 | 61 | #endif /* __SGI_STL_INTERNAL_CTRAITS_FUNCTIONS_H */ 62 | 63 | // Local Variables: 64 | // mode:C++ 65 | // End: 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /docs/stl_exception.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | */ 13 | 14 | #ifndef __SGI_STL_EXCEPTION_H 15 | #define __SGI_STL_EXCEPTION_H 16 | 17 | // This header exists solely for portability. Normally it just includes 18 | // the header . 19 | 20 | // The header contains low-level functions that interact 21 | // with a compiler's exception-handling mechanism. It is assumed to 22 | // be supplied with the compiler, rather than with the library, because 23 | // it is inherently tied very closely to the compiler itself. 24 | 25 | // On platforms where does not exist, this header defines 26 | // an exception base class. This is *not* a substitute for everything 27 | // in , but it suffices to support a bare minimum of STL 28 | // functionality. 29 | 30 | #include 31 | 32 | #ifndef __STL_NO_EXCEPTION_HEADER 33 | 34 | #include 35 | #define __STL_EXCEPTION_BASE exception 36 | 37 | #else /* __STL_NO_EXCEPTION_HEADER */ 38 | 39 | __STL_BEGIN_NAMESPACE 40 | 41 | class _Exception { 42 | public: 43 | virtual ~_Exception() __STL_NOTHROW {} 44 | virtual const char* what() const __STL_NOTHROW { return ""; } 45 | }; 46 | 47 | #define __STL_EXCEPTION_BASE _Exception 48 | 49 | __STL_END_NAMESPACE 50 | 51 | #endif /* __STL_NO_EXCEPTION_HEADER */ 52 | 53 | #endif /* __SGI_STL_EXCEPTION_H */ 54 | 55 | // Local Variables: 56 | // mode:C++ 57 | // End: 58 | -------------------------------------------------------------------------------- /docs/stl_hash_fun.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1996-1998 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | * 13 | * 14 | * Copyright (c) 1994 15 | * Hewlett-Packard Company 16 | * 17 | * Permission to use, copy, modify, distribute and sell this software 18 | * and its documentation for any purpose is hereby granted without fee, 19 | * provided that the above copyright notice appear in all copies and 20 | * that both that copyright notice and this permission notice appear 21 | * in supporting documentation. Hewlett-Packard Company makes no 22 | * representations about the suitability of this software for any 23 | * purpose. It is provided "as is" without express or implied warranty. 24 | * 25 | */ 26 | 27 | /* NOTE: This is an internal header file, included by other STL headers. 28 | * You should not attempt to use it directly. 29 | */ 30 | 31 | #ifndef __SGI_STL_HASH_FUN_H 32 | #define __SGI_STL_HASH_FUN_H 33 | 34 | #include 35 | 36 | __STL_BEGIN_NAMESPACE 37 | 38 | template struct hash { }; 39 | 40 | inline size_t __stl_hash_string(const char* __s) 41 | { 42 | unsigned long __h = 0; 43 | for ( ; *__s; ++__s) 44 | __h = 5*__h + *__s; 45 | 46 | return size_t(__h); 47 | } 48 | 49 | __STL_TEMPLATE_NULL struct hash 50 | { 51 | size_t operator()(const char* __s) const { return __stl_hash_string(__s); } 52 | }; 53 | 54 | __STL_TEMPLATE_NULL struct hash 55 | { 56 | size_t operator()(const char* __s) const { return __stl_hash_string(__s); } 57 | }; 58 | 59 | __STL_TEMPLATE_NULL struct hash { 60 | size_t operator()(char __x) const { return __x; } 61 | }; 62 | __STL_TEMPLATE_NULL struct hash { 63 | size_t operator()(unsigned char __x) const { return __x; } 64 | }; 65 | __STL_TEMPLATE_NULL struct hash { 66 | size_t operator()(unsigned char __x) const { return __x; } 67 | }; 68 | __STL_TEMPLATE_NULL struct hash { 69 | size_t operator()(short __x) const { return __x; } 70 | }; 71 | __STL_TEMPLATE_NULL struct hash { 72 | size_t operator()(unsigned short __x) const { return __x; } 73 | }; 74 | __STL_TEMPLATE_NULL struct hash { 75 | size_t operator()(int __x) const { return __x; } 76 | }; 77 | __STL_TEMPLATE_NULL struct hash { 78 | size_t operator()(unsigned int __x) const { return __x; } 79 | }; 80 | __STL_TEMPLATE_NULL struct hash { 81 | size_t operator()(long __x) const { return __x; } 82 | }; 83 | __STL_TEMPLATE_NULL struct hash { 84 | size_t operator()(unsigned long __x) const { return __x; } 85 | }; 86 | 87 | __STL_END_NAMESPACE 88 | 89 | #endif /* __SGI_STL_HASH_FUN_H */ 90 | 91 | // Local Variables: 92 | // mode:C++ 93 | // End: 94 | -------------------------------------------------------------------------------- /docs/stl_home.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/stl_home.gif -------------------------------------------------------------------------------- /docs/stl_pair.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | /* NOTE: This is an internal header file, included by other STL headers. 28 | * You should not attempt to use it directly. 29 | */ 30 | 31 | #ifndef __SGI_STL_INTERNAL_PAIR_H 32 | #define __SGI_STL_INTERNAL_PAIR_H 33 | 34 | __STL_BEGIN_NAMESPACE 35 | 36 | template 37 | struct pair { 38 | typedef _T1 first_type; 39 | typedef _T2 second_type; 40 | 41 | _T1 first; 42 | _T2 second; 43 | pair() : first(_T1()), second(_T2()) {} 44 | pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {} 45 | 46 | #ifdef __STL_MEMBER_TEMPLATES 47 | template 48 | pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {} 49 | #endif 50 | }; 51 | 52 | template 53 | inline bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 54 | { 55 | return __x.first == __y.first && __x.second == __y.second; 56 | } 57 | 58 | template 59 | inline bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 60 | { 61 | return __x.first < __y.first || 62 | (!(__y.first < __x.first) && __x.second < __y.second); 63 | } 64 | 65 | #ifdef __STL_FUNCTION_TMPL_PARTIAL_ORDER 66 | 67 | template 68 | inline bool operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { 69 | return !(__x == __y); 70 | } 71 | 72 | template 73 | inline bool operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { 74 | return __y < __x; 75 | } 76 | 77 | template 78 | inline bool operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { 79 | return !(__y < __x); 80 | } 81 | 82 | template 83 | inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { 84 | return !(__x < __y); 85 | } 86 | 87 | #endif /* __STL_FUNCTION_TMPL_PARTIAL_ORDER */ 88 | 89 | template 90 | inline pair<_T1, _T2> make_pair(const _T1& __x, const _T2& __y) 91 | { 92 | return pair<_T1, _T2>(__x, __y); 93 | } 94 | 95 | __STL_END_NAMESPACE 96 | 97 | #endif /* __SGI_STL_INTERNAL_PAIR_H */ 98 | 99 | // Local Variables: 100 | // mode:C++ 101 | // End: 102 | -------------------------------------------------------------------------------- /docs/stl_range_errors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 3 | * Silicon Graphics 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | * 13 | */ 14 | 15 | #ifndef __STL_RANGE_ERRORS_H 16 | #define __STL_RANGE_ERRORS_H 17 | 18 | // A few places in the STL throw range errors, using standard exception 19 | // classes defined in . This header file provides functions 20 | // to throw those exception objects. 21 | 22 | // __STL_DONT_THROW_RANGE_ERRORS is a hook so that users can disable 23 | // this exception throwing. 24 | 25 | #include 26 | 27 | #if defined(__STL_CAN_THROW_RANGE_ERRORS) && \ 28 | defined(__STL_USE_EXCEPTIONS) && \ 29 | !defined(__STL_DONT_THROW_RANGE_ERRORS) 30 | # define __STL_THROW_RANGE_ERRORS 31 | #endif 32 | 33 | // For the SGI 7.3 compiler, declare these functions here and define them 34 | // elsewhere. 35 | #if defined(__STL_THROW_RANGE_ERRORS) && \ 36 | defined(__sgi) && !defined(__GNUC__) && \ 37 | _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS) 38 | 39 | __STL_BEGIN_NAMESPACE 40 | void __stl_throw_range_error(const char* __msg); 41 | void __stl_throw_length_error(const char* __msg); 42 | __STL_END_NAMESPACE 43 | 44 | // For other compilers where we're throwing range errors, include the 45 | // stdexcept header and throw the appropriate exceptions directly. 46 | #elif defined(__STL_THROW_RANGE_ERRORS) 47 | 48 | #include 49 | 50 | __STL_BEGIN_NAMESPACE 51 | inline void __stl_throw_range_error(const char* __msg) 52 | { throw range_error(__msg); } 53 | inline void __stl_throw_length_error(const char* __msg) 54 | { throw length_error(__msg); } 55 | __STL_END_NAMESPACE 56 | 57 | // Otherwise, define inline functions that do nothing. 58 | #else 59 | 60 | __STL_BEGIN_NAMESPACE 61 | inline void __stl_throw_range_error(const char*) {} 62 | inline void __stl_throw_length_error(const char*) {} 63 | __STL_END_NAMESPACE 64 | 65 | #endif 66 | 67 | #endif /* __STL_RANGE_ERRORS_H */ 68 | 69 | // Local Variables: 70 | // mode:C++ 71 | // End: 72 | -------------------------------------------------------------------------------- /docs/stl_raw_storage_iter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | /* NOTE: This is an internal header file, included by other STL headers. 28 | * You should not attempt to use it directly. 29 | */ 30 | 31 | #ifndef __SGI_STL_INTERNAL_RAW_STORAGE_ITERATOR_H 32 | #define __SGI_STL_INTERNAL_RAW_STORAGE_ITERATOR_H 33 | 34 | __STL_BEGIN_NAMESPACE 35 | 36 | template 37 | class raw_storage_iterator { 38 | protected: 39 | _ForwardIterator _M_iter; 40 | public: 41 | typedef output_iterator_tag iterator_category; 42 | typedef void value_type; 43 | typedef void difference_type; 44 | typedef void pointer; 45 | typedef void reference; 46 | 47 | explicit raw_storage_iterator(_ForwardIterator __x) : _M_iter(__x) {} 48 | raw_storage_iterator& operator*() { return *this; } 49 | raw_storage_iterator& operator=(const _Tp& __element) { 50 | construct(&*_M_iter, __element); 51 | return *this; 52 | } 53 | raw_storage_iterator<_ForwardIterator, _Tp>& operator++() { 54 | ++_M_iter; 55 | return *this; 56 | } 57 | raw_storage_iterator<_ForwardIterator, _Tp> operator++(int) { 58 | raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this; 59 | ++_M_iter; 60 | return __tmp; 61 | } 62 | }; 63 | 64 | #ifndef __STL_CLASS_PARTIAL_SPECIALIZATION 65 | 66 | template 67 | inline output_iterator_tag 68 | iterator_category(const raw_storage_iterator<_ForwardIterator, _Tp>&) 69 | { 70 | return output_iterator_tag(); 71 | } 72 | 73 | #endif /* __STL_CLASS_PARTIAL_SPECIALIZATION */ 74 | 75 | __STL_END_NAMESPACE 76 | 77 | #endif /* __SGI_STL_INTERNAL_RAW_STORAGE_ITERATOR_H */ 78 | 79 | // Local Variables: 80 | // mode:C++ 81 | // End: 82 | -------------------------------------------------------------------------------- /docs/stl_relops.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * Copyright (c) 1996,1997 15 | * Silicon Graphics 16 | * 17 | * Permission to use, copy, modify, distribute and sell this software 18 | * and its documentation for any purpose is hereby granted without fee, 19 | * provided that the above copyright notice appear in all copies and 20 | * that both that copyright notice and this permission notice appear 21 | * in supporting documentation. Silicon Graphics makes no 22 | * representations about the suitability of this software for any 23 | * purpose. It is provided "as is" without express or implied warranty. 24 | * 25 | */ 26 | 27 | /* NOTE: This is an internal header file, included by other STL headers. 28 | * You should not attempt to use it directly. 29 | */ 30 | 31 | #ifndef __SGI_STL_INTERNAL_RELOPS 32 | #define __SGI_STL_INTERNAL_RELOPS 33 | 34 | __STL_BEGIN_RELOPS_NAMESPACE 35 | 36 | template 37 | inline bool operator!=(const _Tp& __x, const _Tp& __y) { 38 | return !(__x == __y); 39 | } 40 | 41 | template 42 | inline bool operator>(const _Tp& __x, const _Tp& __y) { 43 | return __y < __x; 44 | } 45 | 46 | template 47 | inline bool operator<=(const _Tp& __x, const _Tp& __y) { 48 | return !(__y < __x); 49 | } 50 | 51 | template 52 | inline bool operator>=(const _Tp& __x, const _Tp& __y) { 53 | return !(__x < __y); 54 | } 55 | 56 | __STL_END_RELOPS_NAMESPACE 57 | 58 | #endif /* __SGI_STL_INTERNAL_RELOPS */ 59 | 60 | // Local Variables: 61 | // mode:C++ 62 | // End: 63 | -------------------------------------------------------------------------------- /docs/stl_stack.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | /* NOTE: This is an internal header file, included by other STL headers. 28 | * You should not attempt to use it directly. 29 | */ 30 | 31 | #ifndef __SGI_STL_INTERNAL_STACK_H 32 | #define __SGI_STL_INTERNAL_STACK_H 33 | 34 | #include 35 | 36 | __STL_BEGIN_NAMESPACE 37 | 38 | // Forward declarations of operators == and <, needed for friend declaration. 39 | 40 | template ) > 42 | class stack; 43 | 44 | template 45 | bool operator==(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y); 46 | 47 | template 48 | bool operator<(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y); 49 | 50 | 51 | template 52 | class stack { 53 | 54 | // requirements: 55 | 56 | __STL_CLASS_REQUIRES(_Tp, _Assignable); 57 | __STL_CLASS_REQUIRES(_Sequence, _BackInsertionSequence); 58 | typedef typename _Sequence::value_type _Sequence_value_type; 59 | __STL_CLASS_REQUIRES_SAME_TYPE(_Tp, _Sequence_value_type); 60 | 61 | 62 | #ifdef __STL_MEMBER_TEMPLATES 63 | template 64 | friend bool operator== (const stack<_Tp1, _Seq1>&, 65 | const stack<_Tp1, _Seq1>&); 66 | template 67 | friend bool operator< (const stack<_Tp1, _Seq1>&, 68 | const stack<_Tp1, _Seq1>&); 69 | #else /* __STL_MEMBER_TEMPLATES */ 70 | friend bool __STD_QUALIFIER 71 | operator== __STL_NULL_TMPL_ARGS (const stack&, const stack&); 72 | friend bool __STD_QUALIFIER 73 | operator< __STL_NULL_TMPL_ARGS (const stack&, const stack&); 74 | #endif /* __STL_MEMBER_TEMPLATES */ 75 | 76 | public: 77 | typedef typename _Sequence::value_type value_type; 78 | typedef typename _Sequence::size_type size_type; 79 | typedef _Sequence container_type; 80 | 81 | typedef typename _Sequence::reference reference; 82 | typedef typename _Sequence::const_reference const_reference; 83 | protected: 84 | _Sequence c; 85 | public: 86 | stack() : c() {} 87 | explicit stack(const _Sequence& __s) : c(__s) {} 88 | 89 | bool empty() const { return c.empty(); } 90 | size_type size() const { return c.size(); } 91 | reference top() { return c.back(); } 92 | const_reference top() const { return c.back(); } 93 | void push(const value_type& __x) { c.push_back(__x); } 94 | void pop() { c.pop_back(); } 95 | }; 96 | 97 | template 98 | bool operator==(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) 99 | { 100 | return __x.c == __y.c; 101 | } 102 | 103 | template 104 | bool operator<(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) 105 | { 106 | return __x.c < __y.c; 107 | } 108 | 109 | #ifdef __STL_FUNCTION_TMPL_PARTIAL_ORDER 110 | 111 | template 112 | bool operator!=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) 113 | { 114 | return !(__x == __y); 115 | } 116 | 117 | template 118 | bool operator>(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) 119 | { 120 | return __y < __x; 121 | } 122 | 123 | template 124 | bool operator<=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) 125 | { 126 | return !(__y < __x); 127 | } 128 | 129 | template 130 | bool operator>=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y) 131 | { 132 | return !(__x < __y); 133 | } 134 | 135 | #endif /* __STL_FUNCTION_TMPL_PARTIAL_ORDER */ 136 | 137 | __STL_END_NAMESPACE 138 | 139 | #endif /* __SGI_STL_INTERNAL_STACK_H */ 140 | 141 | // Local Variables: 142 | // mode:C++ 143 | // End: 144 | -------------------------------------------------------------------------------- /docs/stl_string_fwd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997 3 | * Silicon Graphics Computer Systems, Inc. 4 | * 5 | * Permission to use, copy, modify, distribute and sell this software 6 | * and its documentation for any purpose is hereby granted without fee, 7 | * provided that the above copyright notice appear in all copies and 8 | * that both that copyright notice and this permission notice appear 9 | * in supporting documentation. Silicon Graphics makes no 10 | * representations about the suitability of this software for any 11 | * purpose. It is provided "as is" without express or implied warranty. 12 | */ 13 | 14 | #ifndef __SGI_STL_STRING_FWD_H 15 | #define __SGI_STL_STRING_FWD_H 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | __STL_BEGIN_NAMESPACE 23 | 24 | template , 26 | class _Alloc = __STL_DEFAULT_ALLOCATOR(_CharT) > 27 | class basic_string; 28 | 29 | typedef basic_string string; 30 | typedef basic_string wstring; 31 | 32 | static const char* __get_c_string(const string&); 33 | 34 | __STL_END_NAMESPACE 35 | 36 | #endif /* __SGI_STL_STRING_FWD_H */ 37 | 38 | // Local Variables: 39 | // mode:C++ 40 | // End: 41 | -------------------------------------------------------------------------------- /docs/surf.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/surf.gif -------------------------------------------------------------------------------- /docs/swap_ranges.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | swap_ranges 28 | 29 | 30 | 32 | SGI 34 | 35 |
36 |

swap_ranges

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
Category: algorithmsComponent type: function
48 | 49 |

Prototype

50 |
 51 | template <class ForwardIterator1, class ForwardIterator2>
 52 | ForwardIterator2 swap_ranges(ForwardIterator1 first1, ForwardIterator1 last1,
 53 |                              ForwardIterator2 first2);
 54 | 
55 |

Description

56 | Swap_ranges swaps each of the elements in the range 57 | [first1, last1) with the corresponding element in the range 58 | [first2, first2 + (last1 - first1)). That is, for each integer n 59 | such that 0 <= n < (last1 - first1), it swaps *(first1 + n) 60 | and *(first2 + n). The return value is first2 + (last1 - first1). 61 |

Definition

62 | Defined in the standard header algorithm, and in the nonstandard 63 | backward-compatibility header algo.h. 64 |

Requirements on types

65 | ForwardIterator1 and ForwardIterator2 must both be models of 66 | Forward Iterator. The value types of ForwardIterator1 and 67 | ForwardIterator2 must be convertible to each other. 68 |

Preconditions

69 | 78 |

Complexity

79 | Linear. Exactly last1 - first1 swaps are performed. 80 |

Example

81 |
 82 | vector<int> V1, V2;
 83 | V1.push_back(1);
 84 | V1.push_back(2);
 85 | V2.push_back(3);
 86 | V2.push_back(4);
 87 | 
 88 | assert(V1[0] == 1 && V1[1] == 2 && V2[0] == 3 && V2[1] == 4);
 89 | swap_ranges(V1.begin(), V1.end(), V2.begin());
 90 | assert(V1[0] == 3 && V1[1] == 4 && V2[0] == 1 && V2[1] == 2);
 91 | 
92 |

Notes

93 |

See also

94 | swap, iter_swap. 95 | 96 | 97 |
98 | [Silicon Surf] 100 | [STL Home] 102 |
103 | 104 | Copyright © 105 | 1999 Silicon Graphics, Inc. All Rights Reserved. 106 | TrademarkInformation 107 | 108 |

109 | 110 | 111 | -------------------------------------------------------------------------------- /docs/tempbuf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_TEMPBUF_H 28 | #define __SGI_STL_TEMPBUF_H 29 | 30 | #ifndef __SGI_STL_PAIR_H 31 | #include 32 | #endif 33 | #include /* XXX should use */ 34 | #include /* XXX should use */ 35 | #include /* XXX should use */ 36 | #ifndef __TYPE_TRAITS_H 37 | #include 38 | #endif 39 | #ifndef __SGI_STL_INTERNAL_CONSTRUCT_H 40 | #include 41 | #endif 42 | #ifndef __SGI_STL_INTERNAL_UNINITIALIZED_H 43 | #include 44 | #endif 45 | #ifndef __SGI_STL_INTERNAL_TEMPBUF_H 46 | #include 47 | #endif 48 | 49 | #ifdef __STL_USE_NAMESPACES 50 | 51 | using __STD::get_temporary_buffer; 52 | using __STD::return_temporary_buffer; 53 | using __STD::temporary_buffer; 54 | 55 | #endif /* __STL_USE_NAMESPACES */ 56 | 57 | #endif /* __SGI_STL_TEMPBUF_H */ 58 | 59 | // Local Variables: 60 | // mode:C++ 61 | // End: 62 | -------------------------------------------------------------------------------- /docs/tree.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1996,1997 4 | * Silicon Graphics Computer Systems, Inc. 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Silicon Graphics makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1994 16 | * Hewlett-Packard Company 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Hewlett-Packard Company makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | * 26 | * 27 | */ 28 | 29 | #ifndef __SGI_STL_TREE_H 30 | #define __SGI_STL_TREE_H 31 | 32 | #ifndef __SGI_STL_INTERNAL_TREE_H 33 | #include 34 | #endif 35 | #include 36 | #include 37 | 38 | #ifdef __STL_USE_NAMESPACES 39 | using __STD::rb_tree; 40 | #endif /* __STL_USE_NAMESPACES */ 41 | 42 | #endif /* __SGI_STL_TREE_H */ 43 | 44 | // Local Variables: 45 | // mode:C++ 46 | // End: 47 | -------------------------------------------------------------------------------- /docs/type.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/type.gif -------------------------------------------------------------------------------- /docs/type_dot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/type_dot.gif -------------------------------------------------------------------------------- /docs/utilities.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/utilities.gif -------------------------------------------------------------------------------- /docs/utility: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996,1997 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_UTILITY 28 | #define __SGI_STL_UTILITY 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | #endif /* __SGI_STL_UTILITY */ 35 | 36 | // Local Variables: 37 | // mode:C++ 38 | // End: 39 | -------------------------------------------------------------------------------- /docs/vector: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_VECTOR 28 | #define __SGI_STL_VECTOR 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #endif /* __SGI_STL_VECTOR */ 39 | 40 | // Local Variables: 41 | // mode:C++ 42 | // End: 43 | -------------------------------------------------------------------------------- /docs/vector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1994 4 | * Hewlett-Packard Company 5 | * 6 | * Permission to use, copy, modify, distribute and sell this software 7 | * and its documentation for any purpose is hereby granted without fee, 8 | * provided that the above copyright notice appear in all copies and 9 | * that both that copyright notice and this permission notice appear 10 | * in supporting documentation. Hewlett-Packard Company makes no 11 | * representations about the suitability of this software for any 12 | * purpose. It is provided "as is" without express or implied warranty. 13 | * 14 | * 15 | * Copyright (c) 1996 16 | * Silicon Graphics Computer Systems, Inc. 17 | * 18 | * Permission to use, copy, modify, distribute and sell this software 19 | * and its documentation for any purpose is hereby granted without fee, 20 | * provided that the above copyright notice appear in all copies and 21 | * that both that copyright notice and this permission notice appear 22 | * in supporting documentation. Silicon Graphics makes no 23 | * representations about the suitability of this software for any 24 | * purpose. It is provided "as is" without express or implied warranty. 25 | */ 26 | 27 | #ifndef __SGI_STL_VECTOR_H 28 | #define __SGI_STL_VECTOR_H 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | #ifdef __STL_USE_NAMESPACES 36 | using __STD::vector; 37 | #endif /* __STL_USE_NAMESPACES */ 38 | 39 | #endif /* __SGI_STL_VECTOR_H */ 40 | 41 | // Local Variables: 42 | // mode:C++ 43 | // End: 44 | -------------------------------------------------------------------------------- /docs/whitespace.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/sgi-stl-docs/8669359ab42e1dcc8d3dc4ea90e988914adebb70/docs/whitespace.gif --------------------------------------------------------------------------------