blob: e20a11bc59e0ebf04308a11b1a8fa124ca1f0811 [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed
with this work for additional information regarding copyright
ownership. The ASF licenses this file to you under the Apache
License, Version 2.0 (the License); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License.
Copyright 1999-2007 Rogue Wave Software, Inc.
-->
<HTML>
<HEAD>
<TITLE>Product Overview</TITLE>
<LINK REL=StyleSheet HREF="../rw.css" TYPE="text/css" TITLE="Apache stdcxx Stylesheet"></HEAD>
<BODY BGCOLOR=#FFFFFF>
<A HREF="1-1.html"><IMG SRC="images/bprev.gif" WIDTH=20 HEIGHT=21 ALT="Previous file" BORDER=O></A><A HREF="noframes.html"><IMG SRC="images/btop.gif" WIDTH=56 HEIGHT=21 ALT="Top of Document" BORDER=O></A><A HREF="booktoc.html"><IMG SRC="images/btoc.gif" WIDTH=56 HEIGHT=21 ALT="Contents" BORDER=O></A><A HREF="tindex.html"><IMG SRC="images/bindex.gif" WIDTH=56 HEIGHT=21 ALT="Index page" BORDER=O></A><A HREF="1-3.html"><IMG SRC="images/bnext.gif" WIDTH=25 HEIGHT=21 ALT="Next file" BORDER=O></A><DIV CLASS="DOCUMENTNAME"><B>Apache C++ Standard Library User's Guide</B></DIV>
<H2>1.2 Product Overview</H2>
<A NAME="121"><H3>1.2.1 Components</H3></A>
<A NAME="idx2"><!></A>
<P>The C++ Standard Library is a large and comprehensive collection of classes and functions for fine-grained, low-level programming. Within this library, you will find the following components:</P>
<UL>
<A NAME="idx3"><!></A>
<LI><P CLASS="LIST">The large set of data structures and algorithms formerly known as the Standard Template Library (STL)</P></LI>
<LI><P CLASS="LIST">An iostream facility</P></LI>
<LI><P CLASS="LIST">A locale facility</P></LI>
<LI><P CLASS="LIST">A templatized <B><I><A HREF="../stdlibref/basic-string.html">string</A></I></B> class</P></LI>
<LI><P CLASS="LIST">A templatized <B><I><A HREF="../stdlibref/complex.html">complex</A></I></B> class for representing complex numbers</P></LI>
<LI><P CLASS="LIST">A <B><I><A HREF="../stdlibref/valarray.html">valarray</A></I></B> class optimized for handling numeric arrays</P></LI>
<LI><P CLASS="LIST">A uniform framework for describing the execution environment, using a template class named <B><I><A HREF="../stdlibref/numeric-limits.html">numeric_limits</A></I></B> and specializations for each fundamental datatype</P></LI>
<LI><P CLASS="LIST">Memory management features</P></LI>
<LI><P CLASS="LIST">Extensive support for national character sets</P></LI>
<LI><P CLASS="LIST">Exception handling features</P></LI>
</UL>
<A NAME="122"><H3>1.2.2 STL Not Object-Oriented</H3></A>
<P>The STL portion of the C++ Standard Library is not object-oriented. If you are accustomed to the benefits of object-oriented programming, their absence may necessitate some adjustment. Encapsulation of data and functionality in objects is a hallmark of object-oriented programming. In the C++ Standard Library, however, the data structures are separate from the algorithms you use to manipulate them.</P>
<P>This feature can provide a number of advantages, such as smaller source code, and the flexibility of using algorithms with C++ pointers and arrays as well as conventional objects. It can also lead to more efficient coding and faster execution, since it creates a direct, nuts-and-bolts approach to solving problems.</P>
<P>The main disadvantage of using the C++ Standard Library directly is increased risk of error. For example, the library's iterators must not be mismatched or invalidated, and iterators in multithreaded environments should be wrapped before being shared among threads. The templates can cause less precise diagnostics, and code that grows unexpectedly large. Experience with the library and your own compiler will help diminish these problems.</P>
<BR>
<HR>
<A HREF="1-1.html"><IMG SRC="images/bprev.gif" WIDTH=20 HEIGHT=21 ALT="Previous file" BORDER=O></A><A HREF="noframes.html"><IMG SRC="images/btop.gif" WIDTH=56 HEIGHT=21 ALT="Top of Document" BORDER=O></A><A HREF="booktoc.html"><IMG SRC="images/btoc.gif" WIDTH=56 HEIGHT=21 ALT="Contents" BORDER=O></A><A HREF="tindex.html"><IMG SRC="images/bindex.gif" WIDTH=56 HEIGHT=21 ALT="Index page" BORDER=O></A><A HREF="1-3.html"><IMG SRC="images/bnext.gif" WIDTH=20 HEIGHT=21 ALT="Next file" BORDER=O></A>
<!-- Google Analytics tracking code -->
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-1775151-1";
urchinTracker();
</script>
<!-- end of Google Analytics tracking code -->
</BODY>
</HTML>