Commit 30a20a1e by Phil Edwards

New concept checking implementation.

2001-04-02  Phil Edwards  <pme@sources.redhat.com>

	New concept checking implementation.
	* docs/html/19_diagnostics/howto.html:  Document.
	* docs/html/17_intro/concept_check.diff:  New file, for reference.
	* include/bits/boost_concept_check.h:  New file from Boost.
	* include/bits/c++config:  Update comments.

	* include/bits/concept_check.h:  New file.
	* include/bits/concept_checks.h:  Removed.
	* include/bits/container_concepts.h:  Removed.
	* include/bits/sequence_concepts.h:  Removed.
	* include/bits/stl_iterator_base.h:  Removed; split into...
	* include/bits/stl_iterator_base_funcs.h:  ...this new file...
	* include/bits/stl_iterator_base_types.h:  ...and this new file.

	* include/bits/sbuf_iter.h:  Update to use new implementation.
	* include/bits/std_iterator.h:  Likewise.
	* include/bits/std_memory.h:  Likewise.
	* include/bits/stl_algo.h:  Likewise.
	* include/bits/stl_algobase.h:  Likewise.
	* include/bits/stl_construct.h:  Likewise.
	* include/bits/stl_deque.h:  Likewise.
	* include/bits/stl_heap.h:  Likewise.
	* include/bits/stl_list.h:  Likewise.
	* include/bits/stl_map.h:  Likewise.
	* include/bits/stl_multimap.h:  Likewise.
	* include/bits/stl_multiset.h:  Likewise.
	* include/bits/stl_numeric.h:  Likewise.
	* include/bits/stl_queue.h:  Likewise.
	* include/bits/stl_set.h:  Likewise.
	* include/bits/stl_stack.h:  Likewise.
	* include/bits/stl_uninitialized.h:  Likewise.
	* include/bits/stl_vector.h:  Likewise.
	* include/ext/hash_map:  Likewise.
	* include/ext/hash_set:  Likewise.
	* include/ext/slist:  Likewise.
	* include/ext/stl_hashtable.h:  Likewise.

	* src/Makefile.am (base_headers):  Update list of headers.
	* Makefile.in:  Regenerated.
	* src/Makefile.in:  Regenerated.
	* libio/Makefile.in:  Regenerated.
	* libmath/Makefile.in:  Regenerated.
	* libsupc++/Makefile.in:  Regenerated.
	* testsuite/Makefile.in:  Regenerated.

	* docs/html/install.html:  Update contact information.
	* docs/html/17_intro/howto.html:  Ditto.
	* docs/html/18_support/howto.html:  Ditto.
	* docs/html/20_util/howto.html:  Ditto.
	* docs/html/21_strings/howto.html:  Ditto.
	* docs/html/22_locale/howto.html:  Ditto.
	* docs/html/23_containers/howto.html:  Ditto.
	* docs/html/24_iterators/howto.html:  Ditto.
	* docs/html/25_algorithms/howto.html:  Ditto.
	* docs/html/26_numerics/howto.html:  Ditto.
	* docs/html/27_io/howto.html:  Ditto.
	* docs/html/faq/index.html:  Ditto, plus info on new checking code.
	* docs/html/ext/howto.html:  Ditto, plus info on new checking code.
	* docs/html/faq/index.txt:  Regenerated.

From-SVN: r41031
parent 9f4a318c
2001-04-02 Phil Edwards <pme@sources.redhat.com>
New concept checking implementation.
* docs/html/19_diagnostics/howto.html: Document.
* docs/html/17_intro/concept_check.diff: New file, for reference.
* include/bits/boost_concept_check.h: New file from Boost.
* include/bits/c++config: Update comments.
* include/bits/concept_check.h: New file.
* include/bits/concept_checks.h: Removed.
* include/bits/container_concepts.h: Removed.
* include/bits/sequence_concepts.h: Removed.
* include/bits/stl_iterator_base.h: Removed; split into...
* include/bits/stl_iterator_base_funcs.h: ...this new file...
* include/bits/stl_iterator_base_types.h: ...and this new file.
* include/bits/sbuf_iter.h: Update to use new implementation.
* include/bits/std_iterator.h: Likewise.
* include/bits/std_memory.h: Likewise.
* include/bits/stl_algo.h: Likewise.
* include/bits/stl_algobase.h: Likewise.
* include/bits/stl_construct.h: Likewise.
* include/bits/stl_deque.h: Likewise.
* include/bits/stl_heap.h: Likewise.
* include/bits/stl_list.h: Likewise.
* include/bits/stl_map.h: Likewise.
* include/bits/stl_multimap.h: Likewise.
* include/bits/stl_multiset.h: Likewise.
* include/bits/stl_numeric.h: Likewise.
* include/bits/stl_queue.h: Likewise.
* include/bits/stl_set.h: Likewise.
* include/bits/stl_stack.h: Likewise.
* include/bits/stl_uninitialized.h: Likewise.
* include/bits/stl_vector.h: Likewise.
* include/ext/hash_map: Likewise.
* include/ext/hash_set: Likewise.
* include/ext/slist: Likewise.
* include/ext/stl_hashtable.h: Likewise.
* src/Makefile.am (base_headers): Update list of headers.
* Makefile.in: Regenerated.
* src/Makefile.in: Regenerated.
* libio/Makefile.in: Regenerated.
* libmath/Makefile.in: Regenerated.
* libsupc++/Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
* docs/html/install.html: Update contact information.
* docs/html/17_intro/howto.html: Ditto.
* docs/html/18_support/howto.html: Ditto.
* docs/html/20_util/howto.html: Ditto.
* docs/html/21_strings/howto.html: Ditto.
* docs/html/22_locale/howto.html: Ditto.
* docs/html/23_containers/howto.html: Ditto.
* docs/html/24_iterators/howto.html: Ditto.
* docs/html/25_algorithms/howto.html: Ditto.
* docs/html/26_numerics/howto.html: Ditto.
* docs/html/27_io/howto.html: Ditto.
* docs/html/faq/index.html: Ditto, plus info on new checking code.
* docs/html/ext/howto.html: Ditto, plus info on new checking code.
* docs/html/faq/index.txt: Regenerated.
2001-04-02 Zack Weinberg <zackw@stanford.edu> 2001-04-02 Zack Weinberg <zackw@stanford.edu>
* testsuite/lib/libstdc++.exp (dg-test): Annotate result * testsuite/lib/libstdc++.exp (dg-test): Annotate result
......
...@@ -135,7 +135,48 @@ MULTICLEAN = true ...@@ -135,7 +135,48 @@ MULTICLEAN = true
# Work around what appears to be a GNU make bug handling MAKEFLAGS # Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and # values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile. # friends when we are called from the top level Makefile.
AM_MAKEFLAGS = "AR_FLAGS=$(AR_FLAGS)" "CC_FOR_BUILD=$(CC_FOR_BUILD)" "CC_FOR_TARGET=$(CC_FOR_TARGET)" "CFLAGS=$(CFLAGS)" "CXXFLAGS=$(CXXFLAGS)" "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" "INSTALL=$(INSTALL)" "INSTALL_DATA=$(INSTALL_DATA)" "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" "LDFLAGS=$(LDFLAGS)" "LIBCFLAGS=$(LIBCFLAGS)" "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" "MAKE=$(MAKE)" "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" "PICFLAG=$(PICFLAG)" "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" "SHELL=$(SHELL)" "EXPECT=$(EXPECT)" "RUNTEST=$(RUNTEST)" "RUNTESTFLAGS=$(RUNTESTFLAGS)" "exec_prefix=$(exec_prefix)" "infodir=$(infodir)" "libdir=$(libdir)" "includedir=$(includedir)" "prefix=$(prefix)" "tooldir=$(tooldir)" "AR=$(AR)" "AS=$(AS)" "CC=$(CC)" "CXX=$(CXX)" "LD=$(LD)" "LIBCFLAGS=$(LIBCFLAGS)" "PICFLAG=$(PICFLAG)" "RANLIB=$(RANLIB)" "NM=$(NM)" "NM_FOR_BUILD=$(NM_FOR_BUILD)" "NM_FOR_TARGET=$(NM_FOR_TARGET)" "DESTDIR=$(DESTDIR)" "WERROR=$(WERROR)" AM_MAKEFLAGS = \
"AR_FLAGS=$(AR_FLAGS)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
"CFLAGS=$(CFLAGS)" \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
"LDFLAGS=$(LDFLAGS)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"MAKE=$(MAKE)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
"PICFLAG=$(PICFLAG)" \
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"EXPECT=$(EXPECT)" \
"RUNTEST=$(RUNTEST)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"exec_prefix=$(exec_prefix)" \
"infodir=$(infodir)" \
"libdir=$(libdir)" \
"includedir=$(includedir)" \
"prefix=$(prefix)" \
"tooldir=$(tooldir)" \
"AR=$(AR)" \
"AS=$(AS)" \
"CC=$(CC)" \
"CXX=$(CXX)" \
"LD=$(LD)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"PICFLAG=$(PICFLAG)" \
"RANLIB=$(RANLIB)" \
"NM=$(NM)" \
"NM_FOR_BUILD=$(NM_FOR_BUILD)" \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"DESTDIR=$(DESTDIR)" \
"WERROR=$(WERROR)"
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
CONFIG_HEADER = config.h CONFIG_HEADER = config.h
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<META NAME="GENERATOR" CONTENT="vi and eight fingers"> <META NAME="GENERATOR" CONTENT="vi and eight fingers">
<TITLE>libstdc++-v3 HOWTO: Chapter 17</TITLE> <TITLE>libstdc++-v3 HOWTO: Chapter 17</TITLE>
<LINK REL=StyleSheet HREF="../lib3styles.css"> <LINK REL=StyleSheet HREF="../lib3styles.css">
<!-- $Id: howto.html,v 1.6 2000/12/03 23:47:47 jsm28 Exp $ --> <!-- $Id: howto.html,v 1.1 2000/12/10 04:03:09 pme Exp $ -->
</HEAD> </HEAD>
<BODY> <BODY>
...@@ -144,9 +144,8 @@ ...@@ -144,9 +144,8 @@
<HR> <HR>
<P CLASS="fineprint"><EM> <P CLASS="fineprint"><EM>
Comments and suggestions are welcome, and may be sent to Comments and suggestions are welcome, and may be sent to
<A HREF="mailto:pme@sources.redhat.com">Phil Edwards</A> or <A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>.
<A HREF="mailto:gdr@gcc.gnu.org">Gabriel Dos Reis</A>. <BR> $Id: howto.html,v 1.1 2000/12/10 04:03:09 pme Exp $
<BR> $Id: howto.html,v 1.6 2000/12/03 23:47:47 jsm28 Exp $
</EM></P> </EM></P>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<META NAME="GENERATOR" CONTENT="vi and eight fingers"> <META NAME="GENERATOR" CONTENT="vi and eight fingers">
<TITLE>libstdc++-v3 HOWTO: Chapter 18</TITLE> <TITLE>libstdc++-v3 HOWTO: Chapter 18</TITLE>
<LINK REL=StyleSheet HREF="../lib3styles.css"> <LINK REL=StyleSheet HREF="../lib3styles.css">
<!-- $Id: howto.html,v 1.7 2000/12/03 23:47:47 jsm28 Exp $ --> <!-- $Id: howto.html,v 1.1 2000/12/10 04:04:54 pme Exp $ -->
</HEAD> </HEAD>
<BODY> <BODY>
...@@ -259,9 +259,8 @@ ...@@ -259,9 +259,8 @@
<HR> <HR>
<P CLASS="fineprint"><EM> <P CLASS="fineprint"><EM>
Comments and suggestions are welcome, and may be sent to Comments and suggestions are welcome, and may be sent to
<A HREF="mailto:pme@sources.redhat.com">Phil Edwards</A> or <A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>.
<A HREF="mailto:gdr@gcc.gnu.org">Gabriel Dos Reis</A>. <BR> $Id: howto.html,v 1.1 2000/12/10 04:04:54 pme Exp $
<BR> $Id: howto.html,v 1.7 2000/12/03 23:47:47 jsm28 Exp $
</EM></P> </EM></P>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<META NAME="GENERATOR" CONTENT="vi and eight fingers"> <META NAME="GENERATOR" CONTENT="vi and eight fingers">
<TITLE>libstdc++-v3 HOWTO: Chapter 19</TITLE> <TITLE>libstdc++-v3 HOWTO: Chapter 19</TITLE>
<LINK REL=StyleSheet HREF="../lib3styles.css"> <LINK REL=StyleSheet HREF="../lib3styles.css">
<!-- $Id: howto.html,v 1.1 2000/12/10 04:04:54 pme Exp $ --> <!-- $Id: howto.html,v 1.2 2001/03/25 00:01:56 pme Exp $ -->
</HEAD> </HEAD>
<BODY> <BODY>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<UL> <UL>
<LI><A HREF="#1">Adding data to exceptions</A> <LI><A HREF="#1">Adding data to exceptions</A>
<LI><A HREF="#2">Exception class hierarchy diagram</A> <LI><A HREF="#2">Exception class hierarchy diagram</A>
<LI><A HREF="#3">Concept checkers</A> <LI><A HREF="#3">Concept checkers -- <STRONG>new and improved!</STRONG></A>
</UL> </UL>
<HR> <HR>
...@@ -67,58 +67,44 @@ ...@@ -67,58 +67,44 @@
</P> </P>
<HR> <HR>
<H2><A NAME="3">Concept checkers</A></H2> <H2><A NAME="3">Concept checkers -- <STRONG>new and improved!</STRONG></A></H2>
<P>First the good news, then the bad news.</P> <P>Better taste! Less fat! Literally!</P>
<P><STRONG>Good news:</STRONG> As part of their 3.3 release, SGI <P>In 1999, SGI added <EM>concept checkers</EM> to their implementation
added some nifty macros which of the STL: code which checked the template parameters of
perform assertions on type properties. For example, the Standard instantiated pieces of the STL, in order to insure that the parameters
requires that types passed as template parameters to <TT>vector</TT> being used met the requirements of the standard. For example,
be &quot;Assignable&quot; (which means what you think it means). the Standard requires that types passed as template parameters to
<TT>vector</TT> be &quot;Assignable&quot; (which means what you think
it means). The checking was done during compilation, and none of
the code was executed at runtime.
</P> </P>
<P>The concept checkers allow the source code for <TT>vector</TT> to <P>Unfortunately, the size of the compiler files grew significantly
declare as a result. The checking code itself was cumbersome. And bugs
<PRE> were found in it on more than one occasion.
__STL_CLASS_REQUIRES(_Tp, _Assignable);
</PRE>inside the template. <TT>_Tp</TT> is the element type of the
vector, and <TT>_Assignable</TT> is the concept to be checked (it is
defined in some back-end header files). When you instantiate
<TT>vector&lt;MyType&gt;</TT>, compile-time checking can be done on
whether MyType meets the requirements for vectors.
</P> </P>
<P>Most (all?) of the containers and sequences are capable of performing <P>The primary author of the checking code, Jeremy Siek, had already
concept checking during compilation, not just vector. started work on a replcement implementation. The new code has been
formally reviewed and accepted into
<A HREF="http://www.boost.org/libs/concept_check/concept_check.htm">the
Boost libraries</A>, and we are pleased to incorporate it into the
GNU C++ library.
</P> </P>
<P>If a concept is violated (thus causing a compilation failure), the <P>The new version imposes a much smaller space overhead on the generated
error messages printed by the compiler will be of the form object file. The checks are also cleaner and easier to read and
<PRE> understand.
_STL_ERROR::__<EM>foo</EM>_violation
</PRE> where <EM>foo</EM> is a description of the precise violation.
For example, if a type is required to support the preincrement
operator but doesn't, then you will see
_STL_ERROR::__postincrement_operator_requirement_violation, which
should give you a hint as to the nature of the problem.
</P> </P>
<P>Other names might be seen for more specific errors, for example, <P>Concept checking can be disabled when you build your code, for example,
_ERROR_IN_STL_CONTAINER::__begin_iterator_accessor_requirement_violation. to save space during a production build. Just define (via -D or
#define) any of the macros
<TT>_GLIBCPP_NO_CONCEPT_CHECKS (yes, with the leading underscore),
<TT>_STL_NO_CONCEPT_CHECKS</TT> (also with the leading underscore),
or <TT>NDEBUG</TT>. The first macro is specifically for this
feature, the second is the disabling macro for the replaced SGI
version (some code may assume SGI's version is in use), and the third
is the usual macro to disable <TT>assert()</TT>, which is often turned
off for production builds.
</P> </P>
<P>You will probably also see other errors as the malformed code is
actually used. The concept checking error messages should be printed
before the others, so start at the top and work your way down.
</P>
<P><STRONG>Bad news:</STRONG> The current checking code is somewhat
messy. It results in no runtime overhead, but there is a space
penalty (sometimes a very large one) in the generated code. And the
code itself has bugs.
</P>
<P>Concept checking can be disabled when you build your code. Just
define (via -D or #define) the macro
<TT>_STL_NO_CONCEPT_CHECKS</TT> (yes, with the leading underscore).
In fact, this may already be defined in the library by default,
depending on what decision we come to.
</P>
<P><STRONG>More good news:</STRONG> Replacement code has already been
written by the same author of the original code. It's available at
Boost and we hope to integrate it into the library.
<P>Return <A HREF="#top">to top of page</A> or <P>Return <A HREF="#top">to top of page</A> or
<A HREF="../faq/index.html">to the FAQ</A>. <A HREF="../faq/index.html">to the FAQ</A>.
</P> </P>
...@@ -129,9 +115,8 @@ ...@@ -129,9 +115,8 @@
<HR> <HR>
<P CLASS="fineprint"><EM> <P CLASS="fineprint"><EM>
Comments and suggestions are welcome, and may be sent to Comments and suggestions are welcome, and may be sent to
<A HREF="mailto:pme@sources.redhat.com">Phil Edwards</A> or <A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>.
<A HREF="mailto:gdr@gcc.gnu.org">Gabriel Dos Reis</A>. <BR> $Id: howto.html,v 1.2 2001/03/25 00:01:56 pme Exp $
<BR> $Id: howto.html,v 1.1 2000/12/10 04:04:54 pme Exp $
</EM></P> </EM></P>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<META NAME="GENERATOR" CONTENT="vi and eight fingers"> <META NAME="GENERATOR" CONTENT="vi and eight fingers">
<TITLE>libstdc++-v3 HOWTO: Chapter 20</TITLE> <TITLE>libstdc++-v3 HOWTO: Chapter 20</TITLE>
<LINK REL=StyleSheet HREF="../lib3styles.css"> <LINK REL=StyleSheet HREF="../lib3styles.css">
<!-- $Id: howto.html,v 1.1 2000/12/10 04:04:54 pme Exp $ --> <!-- $Id: howto.html,v 1.2 2001/01/23 17:02:27 pme Exp $ -->
</HEAD> </HEAD>
<BODY> <BODY>
...@@ -212,9 +212,8 @@ ...@@ -212,9 +212,8 @@
<HR> <HR>
<P CLASS="fineprint"><EM> <P CLASS="fineprint"><EM>
Comments and suggestions are welcome, and may be sent to Comments and suggestions are welcome, and may be sent to
<A HREF="mailto:pme@sources.redhat.com">Phil Edwards</A> or <A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>.
<A HREF="mailto:gdr@gcc.gnu.org">Gabriel Dos Reis</A>. <BR> $Id: howto.html,v 1.2 2001/01/23 17:02:27 pme Exp $
<BR> $Id: howto.html,v 1.1 2000/12/10 04:04:54 pme Exp $
</EM></P> </EM></P>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<META NAME="GENERATOR" CONTENT="vi and eight fingers"> <META NAME="GENERATOR" CONTENT="vi and eight fingers">
<TITLE>libstdc++-v3 HOWTO: Chapter 21</TITLE> <TITLE>libstdc++-v3 HOWTO: Chapter 21</TITLE>
<LINK REL=StyleSheet HREF="../lib3styles.css"> <LINK REL=StyleSheet HREF="../lib3styles.css">
<!-- $Id: howto.html,v 1.1 2000/12/10 04:04:55 pme Exp $ --> <!-- $Id: howto.html,v 1.2 2001/02/07 00:03:20 pme Exp $ -->
</HEAD> </HEAD>
<BODY> <BODY>
...@@ -329,9 +329,8 @@ ...@@ -329,9 +329,8 @@
<HR> <HR>
<P CLASS="fineprint"><EM> <P CLASS="fineprint"><EM>
Comments and suggestions are welcome, and may be sent to Comments and suggestions are welcome, and may be sent to
<A HREF="mailto:pme@sources.redhat.com">Phil Edwards</A> or <A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>.
<A HREF="mailto:gdr@gcc.gnu.org">Gabriel Dos Reis</A>. <BR> $Id: howto.html,v 1.2 2001/02/07 00:03:20 pme Exp $
<BR> $Id: howto.html,v 1.1 2000/12/10 04:04:55 pme Exp $
</EM></P> </EM></P>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<META NAME="GENERATOR" CONTENT="vi and eight fingers"> <META NAME="GENERATOR" CONTENT="vi and eight fingers">
<TITLE>libstdc++-v3 HOWTO: Chapter 22</TITLE> <TITLE>libstdc++-v3 HOWTO: Chapter 22</TITLE>
<LINK REL=StyleSheet HREF="../lib3styles.css"> <LINK REL=StyleSheet HREF="../lib3styles.css">
<!-- $Id: howto.html,v 1.1 2000/12/10 04:04:55 pme Exp $ --> <!-- $Id: howto.html,v 1.2 2001/02/07 00:03:20 pme Exp $ -->
</HEAD> </HEAD>
<BODY> <BODY>
...@@ -225,9 +225,8 @@ functionality are given. ...@@ -225,9 +225,8 @@ functionality are given.
<HR> <HR>
<P CLASS="fineprint"><EM> <P CLASS="fineprint"><EM>
Comments and suggestions are welcome, and may be sent to Comments and suggestions are welcome, and may be sent to
<A HREF="mailto:pme@sources.redhat.com">Phil Edwards</A> or <A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>.
<A HREF="mailto:gdr@gcc.gnu.org">Gabriel Dos Reis</A>. <BR> $Id: howto.html,v 1.2 2001/02/07 00:03:20 pme Exp $
<BR> $Id: howto.html,v 1.1 2000/12/10 04:04:55 pme Exp $
</EM></P> </EM></P>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<META NAME="GENERATOR" CONTENT="vi and eight fingers"> <META NAME="GENERATOR" CONTENT="vi and eight fingers">
<TITLE>libstdc++-v3 HOWTO: Chapter 23</TITLE> <TITLE>libstdc++-v3 HOWTO: Chapter 23</TITLE>
<LINK REL=StyleSheet HREF="../lib3styles.css"> <LINK REL=StyleSheet HREF="../lib3styles.css">
<!-- $Id: howto.html,v 1.4 2000/12/03 23:47:48 jsm28 Exp $ --> <!-- $Id: howto.html,v 1.1 2000/12/10 04:04:55 pme Exp $ -->
</HEAD> </HEAD>
<BODY> <BODY>
...@@ -235,9 +235,8 @@ ...@@ -235,9 +235,8 @@
<HR> <HR>
<P CLASS="fineprint"><EM> <P CLASS="fineprint"><EM>
Comments and suggestions are welcome, and may be sent to Comments and suggestions are welcome, and may be sent to
<A HREF="mailto:pme@sources.redhat.com">Phil Edwards</A> or <A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>.
<A HREF="mailto:gdr@gcc.gnu.org">Gabriel Dos Reis</A>. <BR> $Id: howto.html,v 1.1 2000/12/10 04:04:55 pme Exp $
<BR> $Id: howto.html,v 1.4 2000/12/03 23:47:48 jsm28 Exp $
</EM></P> </EM></P>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<META NAME="GENERATOR" CONTENT="vi and eight fingers"> <META NAME="GENERATOR" CONTENT="vi and eight fingers">
<TITLE>libstdc++-v3 HOWTO: Chapter 24</TITLE> <TITLE>libstdc++-v3 HOWTO: Chapter 24</TITLE>
<LINK REL=StyleSheet HREF="../lib3styles.css"> <LINK REL=StyleSheet HREF="../lib3styles.css">
<!-- $Id: howto.html,v 1.5 2000/12/03 23:47:48 jsm28 Exp $ --> <!-- $Id: howto.html,v 1.1 2000/12/10 04:04:55 pme Exp $ -->
</HEAD> </HEAD>
<BODY> <BODY>
...@@ -84,9 +84,8 @@ ...@@ -84,9 +84,8 @@
<HR> <HR>
<P CLASS="fineprint"><EM> <P CLASS="fineprint"><EM>
Comments and suggestions are welcome, and may be sent to Comments and suggestions are welcome, and may be sent to
<A HREF="mailto:pme@sources.redhat.com">Phil Edwards</A> or <A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>.
<A HREF="mailto:gdr@gcc.gnu.org">Gabriel Dos Reis</A>. <BR> $Id: howto.html,v 1.1 2000/12/10 04:04:55 pme Exp $
<BR> $Id: howto.html,v 1.5 2000/12/03 23:47:48 jsm28 Exp $
</EM></P> </EM></P>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<META NAME="GENERATOR" CONTENT="vi and eight fingers"> <META NAME="GENERATOR" CONTENT="vi and eight fingers">
<TITLE>libstdc++-v3 HOWTO: Chapter 25</TITLE> <TITLE>libstdc++-v3 HOWTO: Chapter 25</TITLE>
<LINK REL=StyleSheet HREF="../lib3styles.css"> <LINK REL=StyleSheet HREF="../lib3styles.css">
<!-- $Id: howto.html,v 1.5 2000/12/03 23:47:48 jsm28 Exp $ --> <!-- $Id: howto.html,v 1.1 2000/12/10 04:04:55 pme Exp $ -->
</HEAD> </HEAD>
<BODY> <BODY>
...@@ -86,9 +86,8 @@ ...@@ -86,9 +86,8 @@
<HR> <HR>
<P CLASS="fineprint"><EM> <P CLASS="fineprint"><EM>
Comments and suggestions are welcome, and may be sent to Comments and suggestions are welcome, and may be sent to
<A HREF="mailto:pme@sources.redhat.com">Phil Edwards</A> or <A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>.
<A HREF="mailto:gdr@gcc.gnu.org">Gabriel Dos Reis</A>. <BR> $Id: howto.html,v 1.1 2000/12/10 04:04:55 pme Exp $
<BR> $Id: howto.html,v 1.5 2000/12/03 23:47:48 jsm28 Exp $
</EM></P> </EM></P>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<META NAME="GENERATOR" CONTENT="vi and eight fingers"> <META NAME="GENERATOR" CONTENT="vi and eight fingers">
<TITLE>libstdc++-v3 HOWTO: Chapter 26</TITLE> <TITLE>libstdc++-v3 HOWTO: Chapter 26</TITLE>
<LINK REL=StyleSheet HREF="../lib3styles.css"> <LINK REL=StyleSheet HREF="../lib3styles.css">
<!-- $Id: howto.html,v 1.7 2000/12/03 23:47:48 jsm28 Exp $ --> <!-- $Id: howto.html,v 1.1 2000/12/10 04:04:56 pme Exp $ -->
</HEAD> </HEAD>
<BODY> <BODY>
...@@ -132,9 +132,8 @@ ...@@ -132,9 +132,8 @@
<HR> <HR>
<P CLASS="fineprint"><EM> <P CLASS="fineprint"><EM>
Comments and suggestions are welcome, and may be sent to Comments and suggestions are welcome, and may be sent to
<A HREF="mailto:pme@sources.redhat.com">Phil Edwards</A> or <A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>.
<A HREF="mailto:gdr@gcc.gnu.org">Gabriel Dos Reis</A>. <BR> $Id: howto.html,v 1.1 2000/12/10 04:04:56 pme Exp $
<BR> $Id: howto.html,v 1.7 2000/12/03 23:47:48 jsm28 Exp $
</EM></P> </EM></P>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<META NAME="GENERATOR" CONTENT="vi and eight fingers"> <META NAME="GENERATOR" CONTENT="vi and eight fingers">
<TITLE>libstdc++-v3 HOWTO: Chapter 27</TITLE> <TITLE>libstdc++-v3 HOWTO: Chapter 27</TITLE>
<LINK REL=StyleSheet HREF="../lib3styles.css"> <LINK REL=StyleSheet HREF="../lib3styles.css">
<!-- $Id: howto.html,v 1.2 2001/01/23 17:02:27 pme Exp $ --> <!-- $Id: howto.html,v 1.3 2001/02/07 00:03:21 pme Exp $ -->
</HEAD> </HEAD>
<BODY> <BODY>
...@@ -415,9 +415,8 @@ ...@@ -415,9 +415,8 @@
<HR> <HR>
<P CLASS="fineprint"><EM> <P CLASS="fineprint"><EM>
Comments and suggestions are welcome, and may be sent to Comments and suggestions are welcome, and may be sent to
<A HREF="mailto:pme@sources.redhat.com">Phil Edwards</A> or <A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>.
<A HREF="mailto:gdr@gcc.gnu.org">Gabriel Dos Reis</A>. <BR> $Id: howto.html,v 1.3 2001/02/07 00:03:21 pme Exp $
<BR> $Id: howto.html,v 1.2 2001/01/23 17:02:27 pme Exp $
</EM></P> </EM></P>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<META NAME="GENERATOR" CONTENT="vi and eight fingers"> <META NAME="GENERATOR" CONTENT="vi and eight fingers">
<TITLE>libstdc++-v3 HOWTO: Extensions</TITLE> <TITLE>libstdc++-v3 HOWTO: Extensions</TITLE>
<LINK REL=StyleSheet HREF="../lib3styles.css"> <LINK REL=StyleSheet HREF="../lib3styles.css">
<!-- $Id: howto.html,v 1.1 2000/12/10 04:04:56 pme Exp $ --> <!-- $Id: howto.html,v 1.2 2001/03/25 00:01:56 pme Exp $ -->
</HEAD> </HEAD>
<BODY> <BODY>
...@@ -141,8 +141,8 @@ ...@@ -141,8 +141,8 @@
<HR> <HR>
<H2><A NAME="4">Compile-time checks</A></H2> <H2><A NAME="4">Compile-time checks</A></H2>
<P>Currently libstdc++-v3 uses the concept checkers from SGI's STL <P>Currently libstdc++-v3 uses the concept checkers from the Boost
3.3 to perform <A HREF="../19_diagnostics/howto.html#3">optional library to perform <A HREF="../19_diagnostics/howto.html#3">optional
compile-time checking</A> of template instantiations of the standard compile-time checking</A> of template instantiations of the standard
containers. They are described in the linked-to page. containers. They are described in the linked-to page.
</P> </P>
...@@ -158,9 +158,8 @@ ...@@ -158,9 +158,8 @@
<HR> <HR>
<P CLASS="fineprint"><EM> <P CLASS="fineprint"><EM>
Comments and suggestions are welcome, and may be sent to Comments and suggestions are welcome, and may be sent to
<A HREF="mailto:pme@sources.redhat.com">Phil Edwards</A> or <A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>.
<A HREF="mailto:gdr@gcc.gnu.org">Gabriel Dos Reis</A>. <BR> $Id: howto.html,v 1.2 2001/03/25 00:01:56 pme Exp $
<BR> $Id: howto.html,v 1.1 2000/12/10 04:04:56 pme Exp $
</EM></P> </EM></P>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
** Locations of "the most recent snapshot is the Nth" text are ** Locations of "the most recent snapshot is the Nth" text are
** answers 1_1, 1_4, 4_1, 5_6. ** answers 1_1, 1_4, 4_1, 5_6.
--> -->
<!-- $Id: index.html,v 1.4 2001/03/01 22:32:23 pme Exp $ --> <!-- $Id: index.html,v 1.5 2001/03/25 00:01:57 pme Exp $ -->
</HEAD> </HEAD>
<BODY> <BODY>
...@@ -62,15 +62,16 @@ http://gcc.gnu.org/onlinedocs/libstdc++/faq/</A>.</P> ...@@ -62,15 +62,16 @@ http://gcc.gnu.org/onlinedocs/libstdc++/faq/</A>.</P>
<LI><A HREF="#4_2">Bugs in gcc/g++ (not libstdc++-v3)</A> <LI><A HREF="#4_2">Bugs in gcc/g++ (not libstdc++-v3)</A>
<LI><A HREF="#4_3">Bugs in the C++ language/lib specification</A> <LI><A HREF="#4_3">Bugs in the C++ language/lib specification</A>
<LI><A HREF="#4_4">Things in libstdc++ that look like bugs</A> <LI><A HREF="#4_4">Things in libstdc++ that look like bugs</A>
<UL> <UL>
<LI><A HREF="#4_4_Weff">-Weffc++ complains too much</A> <LI><A HREF="#4_4_Weff">-Weffc++ complains too much</A>
<LI><A HREF="#4_4_rel_ops">&quot;ambiguous overloads&quot; <LI><A HREF="#4_4_rel_ops">&quot;ambiguous overloads&quot;
after including an old-style header</A> after including an old-style header</A>
<LI><A HREF="#4_4_interface">The g++-3 headers are <LI><A HREF="#4_4_interface">The g++-3 headers are
<STRONG>not ours</STRONG></A> <STRONG>not ours</STRONG></A>
<LI><A HREF="#4_4_glibc">compilation errors from streambuf.h</A> <LI><A HREF="#4_4_glibc">compilation errors from streambuf.h</A>
<LI><A HREF="#4_4_checks">_STL_ERROR::__something_huge_...</A> <LI><A HREF="#4_4_checks">errors about <EM>*Cconcept</EM> and
</UL> <EM>constraints</EM> in the STL...</A>
</UL>
<LI><A HREF="#4_5">Aw, that's easy to fix!</A> <LI><A HREF="#4_5">Aw, that's easy to fix!</A>
</OL> </OL>
...@@ -258,7 +259,7 @@ which is no longer available, thanks deja...--> ...@@ -258,7 +259,7 @@ which is no longer available, thanks deja...-->
that building GCC is much easier and more automated that building GCC is much easier and more automated
than building the GCC 2.[78] series was. than building the GCC 2.[78] series was.
<LI> If you plan on hacking around with the makefiles, you <LI> If you plan on hacking around with the makefiles, you
will need the tools <A will need the tools <A
HREF="http://sources.redhat.com/autoconf/">autoconf</A>and <A HREF="http://sources.redhat.com/autoconf/">autoconf</A>and <A
HREF="http://sources.redhat.com/automake/">automake</A>. HREF="http://sources.redhat.com/automake/">automake</A>.
<LI> GNU Make is the only make that supports these makefiles. <LI> GNU Make is the only make that supports these makefiles.
...@@ -289,11 +290,11 @@ HREF="http://sources.redhat.com/automake/">automake</A>. ...@@ -289,11 +290,11 @@ HREF="http://sources.redhat.com/automake/">automake</A>.
keep mentioning?</A></H2> keep mentioning?</A></H2>
<P>The <EM>Concurrent Versions System</EM> is one of several revision <P>The <EM>Concurrent Versions System</EM> is one of several revision
control packages. It was selected for GNU projects because it's control packages. It was selected for GNU projects because it's
free (speech), free (beer), and very high quality. The <A free (speech), free (beer), and very high quality. The <A
HREF="http://www.gnu.org/software/cvs/cvs.html">CVS entry in HREF="http://www.gnu.org/software/cvs/cvs.html">CVS entry in
the GNU software catalogue</A> has a better description as the GNU software catalogue</A> has a better description as
well as a well as a
<A HREF="http://www.cyclic.com/">link to the makers of CVS</A>. <A HREF="http://www.cyclic.com/">link to the makers of CVS</A>.
</P> </P>
<P>The &quot;anonymous client checkout&quot; feature of CVS is <P>The &quot;anonymous client checkout&quot; feature of CVS is
similar to anonymous FTP in that it allows anyone to retrieve similar to anonymous FTP in that it allows anyone to retrieve
...@@ -371,7 +372,7 @@ HREF="http://sources.redhat.com/automake/">automake</A>. ...@@ -371,7 +372,7 @@ HREF="http://sources.redhat.com/automake/">automake</A>.
</P> </P>
<P>You have two options. You can get a newer cygwin1.dll (see the <P>You have two options. You can get a newer cygwin1.dll (see the
Cygwin paragraph in the Cygwin paragraph in the
<A HREF="../install.html">installation instructions</A>). <A HREF="../install.html">installation instructions</A>).
Or you can get a prebuilt set of bits/std_limits.h and Or you can get a prebuilt set of bits/std_limits.h and
src/limitsMEMBERS.cc files from Mumit Khan's src/limitsMEMBERS.cc files from Mumit Khan's
<A HREF="http://www.xraylith.wisc.edu/~khan/software/gnu-win32/libstdc++-v3.html">Cygwin-related website</A>. <A HREF="http://www.xraylith.wisc.edu/~khan/software/gnu-win32/libstdc++-v3.html">Cygwin-related website</A>.
...@@ -381,15 +382,15 @@ HREF="http://sources.redhat.com/automake/">automake</A>. ...@@ -381,15 +382,15 @@ HREF="http://sources.redhat.com/automake/">automake</A>.
<H2><A NAME="3_3">3.3 Building DEC OSF kills the assembler</A></H2> <H2><A NAME="3_3">3.3 Building DEC OSF kills the assembler</A></H2>
<P>The <TT>atomicity.h</TT> header for the Alpha processor <P>The <TT>atomicity.h</TT> header for the Alpha processor
currently uses pseudo-operators which the DEC assembler currently uses pseudo-operators which the DEC assembler
doesn't understand (in particular, .subsection and .previous). doesn't understand (in particular, .subsection and .previous).
The simple solution is to install GNU <TT>as</TT> and arrange The simple solution is to install GNU <TT>as</TT> and arrange
for the GCC build to use it (or merge the sources and build for the GCC build to use it (or merge the sources and build
it during the bootstrap). it during the bootstrap).
</P> </P>
<P>Anyone who <P>Anyone who
<A HREF="http://gcc.gnu.org/ml/libstdc++/2000-12/msg00279.html">knows <A HREF="http://gcc.gnu.org/ml/libstdc++/2000-12/msg00279.html">knows
the DEC assembler well enough</A> to provide the equivalent of the DEC assembler well enough</A> to provide the equivalent of
these two pseudos would win praise and accolades from many. these two pseudos would win praise and accolades from many.
</P> </P>
...@@ -511,12 +512,12 @@ to the list</A>, Nathan Myers announced that he has started a list of ...@@ -511,12 +512,12 @@ to the list</A>, Nathan Myers announced that he has started a list of
<A NAME="4_4_rel_ops"> <A NAME="4_4_rel_ops">
<P>Another is the <TT>rel_ops</TT> namespace and the template <P>Another is the <TT>rel_ops</TT> namespace and the template
comparison operator functions contained therein. If they become comparison operator functions contained therein. If they become
visible in the same namespace as other comparison functions visible in the same namespace as other comparison functions
(e.g., '<TT>using</TT>' them and the &lt;iterator&gt; header), (e.g., '<TT>using</TT>' them and the &lt;iterator&gt; header),
then you will suddenly be faced with huge numbers of ambiguity then you will suddenly be faced with huge numbers of ambiguity
errors. This was discussed on the -v3 list; Nathan Myers errors. This was discussed on the -v3 list; Nathan Myers
<A HREF="http://gcc.gnu.org/ml/libstdc++/2001-01/msg00247.html">sums <A HREF="http://gcc.gnu.org/ml/libstdc++/2001-01/msg00247.html">sums
things up here</A>. things up here</A>.
</P> </P>
</A> </A>
<A NAME="4_4_interface"><H3>The g++-3 headers are <A NAME="4_4_interface"><H3>The g++-3 headers are
...@@ -541,8 +542,8 @@ to the list</A>, Nathan Myers announced that he has started a list of ...@@ -541,8 +542,8 @@ to the list</A>, Nathan Myers announced that he has started a list of
</A> </A>
<A NAME="4_4_glibc"> <A NAME="4_4_glibc">
<P>If you're on a GNU/Linux system and have just upgraded to <P>If you're on a GNU/Linux system and have just upgraded to
glibc 2.2, but are still using gcc 2.95.2, then you should have glibc 2.2, but are still using gcc 2.95.2, then you should have
read the glibc FAQ, specifically 2.34: read the glibc FAQ, specifically 2.34:
<PRE> <PRE>
2.34. When compiling C++ programs, I get a compilation error in streambuf.h. 2.34. When compiling C++ programs, I get a compilation error in streambuf.h.
...@@ -551,24 +552,24 @@ apply a patch to the include files in /usr/include/g++, because the fpos_t ...@@ -551,24 +552,24 @@ apply a patch to the include files in /usr/include/g++, because the fpos_t
type has changed in glibc 2.2. The patch is at type has changed in glibc 2.2. The patch is at
http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff
</PRE> </PRE>
Note that 2.95.x shipped with the Note that 2.95.x shipped with the
<A HREF="#4_4_interface">old v2 library</A> which is no longer <A HREF="#4_4_interface">old v2 library</A> which is no longer
maintained. maintained.
</P> </P>
</A> </A>
<A NAME="4_4_checks"> <A NAME="4_4_checks">
<P>If you see compilation errors containing messages which begin <P>If you see compilation errors containing messages about
with _STL_ERROR:: followed by a very verbose name, then most <TT> <EM>foo</EM>Concept </TT>and a<TT> constraints </TT>
likely you have violated one of the requirements for types used member function, then most
during instantiation of template containers. For example, likely you have violated one of the requirements for types used
_STL_ERROR::__equality_comparable_requirement_violation appears during instantiation of template containers. For example,
EqualityComparableConcept appears
if your types must be comparable with == and you have not if your types must be comparable with == and you have not
provided this capability (a typo, or wrong visibility, or you provided this capability (a typo, or wrong visibility, or you
just plain forgot, etc). just plain forgot, etc).
</P> </P>
<P>More information, including how to optionally disable the checks, <P>More information, including how to optionally disable the checks,
is available <A HREF="../19_diagnostics/howto.html#3">here</A>. is available <A HREF="../19_diagnostics/howto.html#3">here</A>.
The code itself might be disabled or replaced already.
</P> </P>
</A> </A>
...@@ -579,7 +580,7 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff ...@@ -579,7 +580,7 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff
on <A HREF="http://gcc.gnu.org/contribute.html">submitting on <A HREF="http://gcc.gnu.org/contribute.html">submitting
patches</A> that covers the procedure, but for libstdc++ you patches</A> that covers the procedure, but for libstdc++ you
should also send the patch to our mailing list in addition to should also send the patch to our mailing list in addition to
the GCC patches mailing list. The libstdc++ the GCC patches mailing list. The libstdc++
<A HREF="../17_intro/contribute.html">contributors' page</A> <A HREF="../17_intro/contribute.html">contributors' page</A>
also talks about how to submit patches. also talks about how to submit patches.
</P> </P>
...@@ -720,9 +721,8 @@ HREF="http://gcc.gnu.org/ml/libstdc++/1999/msg00084.html">speculation</A>. ...@@ -720,9 +721,8 @@ HREF="http://gcc.gnu.org/ml/libstdc++/1999/msg00084.html">speculation</A>.
<HR> <HR>
<P CLASS="fineprint"><EM> <P CLASS="fineprint"><EM>
Comments and suggestions are welcome, and may be sent to Comments and suggestions are welcome, and may be sent to
<A HREF="mailto:pme@sources.redhat.com">Phil Edwards</A> or <A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>.
<A HREF="mailto:gdr@gcc.gnu.org">Gabriel Dos Reis</A>. <BR> $Id: index.html,v 1.5 2001/03/25 00:01:57 pme Exp $
<BR> $Id: index.html,v 1.4 2001/03/01 22:32:23 pme Exp $
</EM></P> </EM></P>
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
header header
o [28]The g++-3 headers are not ours o [28]The g++-3 headers are not ours
o [29]compilation errors from streambuf.h o [29]compilation errors from streambuf.h
o [30]_STL_ERROR::__something_huge_... o [30]errors about *Cconcept and constraints in the STL...
5. [31]Aw, that's easy to fix! 5. [31]Aw, that's easy to fix!
5. [32]Miscellaneous 5. [32]Miscellaneous
1. [33]string::iterator is not char*; vector<T>::iterator is not 1. [33]string::iterator is not char*; vector<T>::iterator is not
...@@ -440,18 +440,16 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff ...@@ -440,18 +440,16 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff
Note that 2.95.x shipped with the [68]old v2 library which is no Note that 2.95.x shipped with the [68]old v2 library which is no
longer maintained. longer maintained.
If you see compilation errors containing messages which begin with If you see compilation errors containing messages about fooConcept and
_STL_ERROR:: followed by a very verbose name, then most likely you a constraints member function, then most likely you have violated one
have violated one of the requirements for types used during of the requirements for types used during instantiation of template
instantiation of template containers. For example, containers. For example, EqualityComparableConcept appears if your
_STL_ERROR::__equality_comparable_requirement_violation appears if types must be comparable with == and you have not provided this
your types must be comparable with == and you have not provided this
capability (a typo, or wrong visibility, or you just plain forgot, capability (a typo, or wrong visibility, or you just plain forgot,
etc). etc).
More information, including how to optionally disable the checks, is More information, including how to optionally disable the checks, is
available [69]here. The code itself might be disabled or replaced available [69]here.
already.
_________________________________________________________________ _________________________________________________________________
4.5 Aw, that's easy to fix! 4.5 Aw, that's easy to fix!
...@@ -573,9 +571,9 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff ...@@ -573,9 +571,9 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff
out! out!
_________________________________________________________________ _________________________________________________________________
Comments and suggestions are welcome, and may be sent to [83]Phil Comments and suggestions are welcome, and may be sent to [83]the
Edwards or [84]Gabriel Dos Reis. mailing list.
$Id: index.html,v 1.4 2001/03/01 22:32:23 pme Exp $ $Id: index.html,v 1.5 2001/03/25 00:01:57 pme Exp $
References References
...@@ -661,5 +659,4 @@ References ...@@ -661,5 +659,4 @@ References
80. http://www.ansi.org/ 80. http://www.ansi.org/
81. http://webstore.ansi.org/ansidocstore/product.asp?sku=ISO%2FIEC+14882%2D1998 81. http://webstore.ansi.org/ansidocstore/product.asp?sku=ISO%2FIEC+14882%2D1998
82. http://www.iso.ch/ 82. http://www.iso.ch/
83. mailto:pme@sources.redhat.com 83. mailto:libstdc++@gcc.gnu.org
84. mailto:gdr@gcc.gnu.org
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<META NAME="GENERATOR" CONTENT="vi and eight fingers"> <META NAME="GENERATOR" CONTENT="vi and eight fingers">
<TITLE>libstdc++-v3 Installation Instructions</TITLE> <TITLE>libstdc++-v3 Installation Instructions</TITLE>
<LINK REL=StyleSheet HREF="lib3styles.css"> <LINK REL=StyleSheet HREF="lib3styles.css">
<!-- $Id: install.html,v 1.3 2001/01/23 17:02:26 pme Exp $ --> <!-- $Id: install.html,v 1.4 2001/02/07 00:03:20 pme Exp $ -->
</HEAD> </HEAD>
<BODY> <BODY>
...@@ -333,9 +333,8 @@ ...@@ -333,9 +333,8 @@
<HR> <HR>
<P CLASS="fineprint"><EM> <P CLASS="fineprint"><EM>
Comments and suggestions are welcome, and may be sent to Comments and suggestions are welcome, and may be sent to
<A HREF="mailto:pme@sources.redhat.com">Phil Edwards</A> or <A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>.
<A HREF="mailto:gdr@gcc.gnu.org">Gabriel Dos Reis</A>. <BR> $Id: install.html,v 1.4 2001/02/07 00:03:20 pme Exp $
<BR> $Id: install.html,v 1.3 2001/01/23 17:02:26 pme Exp $
</EM></P> </EM></P>
......
...@@ -63,9 +63,8 @@ ...@@ -63,9 +63,8 @@
# define __STL_UITHREADS # define __STL_UITHREADS
#endif #endif
// Concept-checking code is off by default unless users define // Concept-checking hooks and related config are now in bits/concept_check.h.
// the _STL_USE_CONCEPT_CHECKS hook.
//#define _STL_USE_CONCEPT_CHECKS 1
// This is also a user hook, but via -f[no-]exceptions, not direct #defines. // This is also a user hook, but via -f[no-]exceptions, not direct #defines.
#ifdef __EXCEPTIONS #ifdef __EXCEPTIONS
...@@ -85,7 +84,8 @@ ...@@ -85,7 +84,8 @@
# define __STL_UNWIND(action) # define __STL_UNWIND(action)
#endif #endif
// This is the "underlying allocator" // This is the "underlying allocator" for STL. The alternatives are
// homegrown schemes involving a kind of mutex and free list; see stl_alloc.h.
#define __USE_MALLOC #define __USE_MALLOC
// Define this to permit user-level control of the expansion of string // Define this to permit user-level control of the expansion of string
...@@ -105,11 +105,6 @@ ...@@ -105,11 +105,6 @@
//# define __STL_LONG_LONG //# define __STL_LONG_LONG
//#endif //#endif
// 20010302 pme -- this is only used in bits/concept_checks.h
//#if (__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ < 95)
# define __STL_NO_FUNCTION_PTR_IN_CLASS_TEMPLATE
//#endif
// Mingw32, GCC compiler using the Microsoft C runtime (settings taken from // Mingw32, GCC compiler using the Microsoft C runtime (settings taken from
// SGI's stl_config.h) // SGI's stl_config.h)
#if defined(__MINGW32__) #if defined(__MINGW32__)
......
// Concept-checking control -*- C++ -*-
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#ifndef _GLIBCPP_CONCEPT_CHECK
#define _GLIBCPP_CONCEPT_CHECK 1
#pragma GCC system_header
#include <bits/c++config.h>
// Concept-checking code is on by default unless users turn it off via any
// of these methods:
// - _GLIBCPP_NO_CONCEPT_CHECKS is a user hook; defining it disables the
// checks.
// - _STL_NO_CONCEPT_CHECKS is a user hook from the old STL implementation
// specifically for this purpose; defining it disables the checks, in
// case the user is expecting the old version.
// - NDEBUG is the usual macro that kills assert(). Defining it will also
// disable the checks, by the reasoning that if the user doesn't want
// any runtime assertion code, then no space penalty for the checks
// is desired either.
// All places in libstdc++-v3 where these are used, or /might/ be used, or
// don't need to be used, or perhaps /should/ be used, are commented with
// "concept requirements" (and maybe some more text). So grep like crazy
// if you're looking for additional places to use these.
#if defined(_GLIBCPP_NO_CONCEPT_CHECKS) || defined(_STL_NO_CONCEPT_CHECKS) \
|| defined(NDEBUG)
#define glibcpp_function_requires(...)
#define glibcpp_class_requires(a,b)
#define glibcpp_class_requires2(a,b,c)
#define glibcpp_class_requires3(a,b,c,d)
#define glibcpp_class_requires4(a,b,c,d,e)
#else // the checks are on
#include <bits/boost_concept_check.h>
// Note that the obvious and elegant approach of
//
//#define glibcpp_function_requires(C) \
// boost::function_requires< boost::C >()
//
// won't work due to concept templates with more than one parameter, e.g.,
// BinaryPredicateConcept. The preprocessor tries to split things up on
// the commas in the template argument list. We can't use an inner pair of
// parenthesis to hide the commas, because "boost::(Temp<Foo,Bar>)" isn't
// a valid instantiation pattern.
#define glibcpp_function_requires(...) \
boost::function_requires< boost::__VA_ARGS__ >()
#define glibcpp_class_requires(a,C) \
BOOST_CLASS_REQUIRES(a, boost, C)
#define glibcpp_class_requires2(a,b,C) \
BOOST_CLASS_REQUIRES2(a, b, boost, C)
#define glibcpp_class_requires3(a,b,c,C) \
BOOST_CLASS_REQUIRES3(a, b, c, boost, C)
#define glibcpp_class_requires4(a,b,c,d,C) \
BOOST_CLASS_REQUIRES4(a, b, c, d, boost, C)
#endif // enable/disable
#endif // _GLIBCPP_CONCEPT_CHECK
/*
* Copyright (c) 1999
* Silicon Graphics Computer Systems, Inc.
*
* 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 appear 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.
*/
#ifndef __STL_CONTAINER_CONCEPTS_H
#define __STL_CONTAINER_CONCEPTS_H
#include <bits/concept_checks.h>
#ifdef __STL_USE_CONCEPT_CHECKS
// This file covers the following concepts:
// _Container
// _ForwardContainer
// _ReversibleContainer
// _const_ReversibleContainer
// _RandomAccessContainer
//
struct _ERROR_IN_STL_CONTAINER {
/* Container expresssions */
template <class _Container>
static void
__begin_iterator_accessor_requirement_violation(_Container __c) {
__c.begin();
}
template <class _Container>
static void
__const_begin_iterator_accessor_requirement_violation(const _Container& __c) {
__c.begin();
}
template <class _Container>
static void
__end_iterator_accessor_requirement_violation(_Container __c) {
__c.end();
}
template <class _Container>
static void
__const_end_iterator_accessor_requirement_violation(const _Container& __c) {
__c.end();
}
template <class _Container>
static void
__rbegin_iterator_accessor_requirement_violation(_Container __c) {
__c.rbegin();
}
template <class _Container>
static void
__const_rbegin_iterator_accessor_requirement_violation(const _Container& __c) {
__c.rbegin();
}
template <class _Container>
static void
__rend_iterator_accessor_requirement_violation(_Container __c) {
__c.rend();
}
template <class _Container>
static void
__const_rend_iterator_accessor_requirement_violation(const _Container& __c) {
__c.rend();
}
template <class _Container>
static void
__size_function_must_be_const(const _Container& __c) {
__c.size();
}
template <class _Container>
static void
__size_function_requirement_violation(_Container& __c) {
__c.size();
__size_function_must_be_const(__c);
}
template <class _Container>
static void
__max_size_function_must_be_const(const _Container& __c) {
__c.max_size();
}
template <class _Container>
static void
__max_size_function_requirement_violation(_Container& __c) {
__c.max_size();
__max_size_function_must_be_const(__c);
}
template <class _Container>
static void
__empty_function_must_be_const(const _Container& __c) {
__c.empty();
}
template <class _Container>
static void
__empty_function_requirement_violation(_Container& __c) {
__c.empty();
__empty_function_must_be_const(__c);
}
template <class _Container>
static void
__swap_function_requirement_violation(_Container& __c) {
__c.swap(__c);
}
};
__STL_TYPEDEF_REQUIREMENT(iterator);
__STL_TYPEDEF_REQUIREMENT(const_iterator);
/* Containers */
template <class _Container>
struct _Container_concept_specification {
static void
_Container_requirement_violation(_Container __c) {
// Refinement of Assignable
_Assignable_concept_specification<_Container>::_Assignable_requirement_violation(__c);
// Associated Types
__value_type__typedef_requirement_violation<_Container>();
__difference_type__typedef_requirement_violation<_Container>();
__size_type__typedef_requirement_violation<_Container>();
__reference__typedef_requirement_violation<_Container>();
__const_reference__typedef_requirement_violation<_Container>();
__pointer__typedef_requirement_violation<_Container>();
__const_pointer__typedef_requirement_violation<_Container>();
__iterator__typedef_requirement_violation<_Container>();
__const_iterator__typedef_requirement_violation<_Container>();
// Valid Expressions
_ERROR_IN_STL_CONTAINER::__const_begin_iterator_accessor_requirement_violation(__c);
_ERROR_IN_STL_CONTAINER::__const_end_iterator_accessor_requirement_violation(__c);
_ERROR_IN_STL_CONTAINER::__begin_iterator_accessor_requirement_violation(__c);
_ERROR_IN_STL_CONTAINER::__end_iterator_accessor_requirement_violation(__c);
_ERROR_IN_STL_CONTAINER::__size_function_requirement_violation(__c);
_ERROR_IN_STL_CONTAINER::__max_size_function_requirement_violation(__c);
_ERROR_IN_STL_CONTAINER::__empty_function_requirement_violation(__c);
_ERROR_IN_STL_CONTAINER::__swap_function_requirement_violation(__c);
// Requirements on Iterators
typedef typename _Container::iterator iter;
typedef typename _Container::const_iterator const_iter;
_InputIterator_concept_specification<const_iter>::_InputIterator_requirement_violation(const_iter());
_InputIterator_concept_specification<iter>::_InputIterator_requirement_violation(iter());
}
};
template <class _ForwardContainer>
struct _ForwardContainer_concept_specification {
static void
_ForwardContainer_requirement_violation(_ForwardContainer __c) {
// Refinement of Container
_Container_concept_specification<_ForwardContainer>::_Container_requirement_violation(__c);
// Requirements on Iterators
typedef typename _ForwardContainer::iterator iter;
typedef typename _ForwardContainer::const_iterator const_iter;
_ForwardIterator_concept_specification<const_iter>::_ForwardIterator_requirement_violation(const_iter());
_Mutable_ForwardIterator_concept_specification<iter>::_Mutable_ForwardIterator_requirement_violation(iter());
}
};
__STL_TYPEDEF_REQUIREMENT(reverse_iterator);
__STL_TYPEDEF_REQUIREMENT(const_reverse_iterator);
template <class _ReversibleContainer>
struct _ReversibleContainer_concept_specification {
static void
_ReversibleContainer_requirement_violation(_ReversibleContainer __c) {
// Refinement of ForwardContainer
_ForwardContainer_concept_specification<_ReversibleContainer>::_ForwardContainer_requirement_violation(__c);
// Associated types
__reverse_iterator__typedef_requirement_violation<_ReversibleContainer>();
__const_reverse_iterator__typedef_requirement_violation<_ReversibleContainer>();
// Valid Expressions
_ERROR_IN_STL_CONTAINER::__const_rbegin_iterator_accessor_requirement_violation(__c);
_ERROR_IN_STL_CONTAINER::__const_rend_iterator_accessor_requirement_violation(__c);
_ERROR_IN_STL_CONTAINER::__rbegin_iterator_accessor_requirement_violation(__c);
_ERROR_IN_STL_CONTAINER::__rend_iterator_accessor_requirement_violation(__c);
// Requirements on Iterators
typedef typename _ReversibleContainer::iterator iter;
typedef typename _ReversibleContainer::const_iterator const_iter;
_BidirectionalIterator_concept_specification<const_iter>::_BidirectionalIterator_requirement_violation(const_iter());
_Mutable_BidirectionalIterator_concept_specification<iter>::_Mutable_BidirectionalIterator_requirement_violation(iter());
}
};
template <class _ReversibleContainer>
struct _const_ReversibleContainer_concept_specification {
static void
_const_ReversibleContainer_requirement_violation(_ReversibleContainer __c) {
// Refinement of Container (JGS, not ForwardContainer)
_Container_concept_specification<_ReversibleContainer>::_Container_requirement_violation(__c);
// Associated types
__reverse_iterator__typedef_requirement_violation<_ReversibleContainer>();
__const_reverse_iterator__typedef_requirement_violation<_ReversibleContainer>();
// Valid Expressions
_ERROR_IN_STL_CONTAINER::__const_rbegin_iterator_accessor_requirement_violation(__c);
_ERROR_IN_STL_CONTAINER::__const_rend_iterator_accessor_requirement_violation(__c);
_ERROR_IN_STL_CONTAINER::__rbegin_iterator_accessor_requirement_violation(__c);
_ERROR_IN_STL_CONTAINER::__rend_iterator_accessor_requirement_violation(__c);
// Requirements on Iterators
typedef typename _ReversibleContainer::iterator iter;
typedef typename _ReversibleContainer::const_iterator const_iter;
_BidirectionalIterator_concept_specification<const_iter>::_BidirectionalIterator_requirement_violation(const_iter());
}
};
template <class _RandomAccessContainer>
struct _RandomAccessContainer_concept_specification {
static void
_RandomAccessContainer_requirement_violation(_RandomAccessContainer __c) {
// Refinement of ReversibleContainer
_ReversibleContainer_concept_specification<_RandomAccessContainer>::_ReversibleContainer_requirement_violation(__c);
// Valid Expressions
typedef typename _RandomAccessContainer::value_type __T;
typedef typename _RandomAccessContainer::difference_type _Dist;
typedef typename _Mutable_trait<__T>::_Type Type;
typedef Type* _TypePtr;
typedef typename _Mutable_trait<_Dist>::_Type Dist;
_STL_ERROR::__element_access_operator_requirement_violation(__c,
_TypePtr(),
Dist());
// Requirements on Iterators
typedef typename _RandomAccessContainer::iterator iter;
typedef typename _RandomAccessContainer::const_iterator const_iter;
_RandomAccessIterator_concept_specification<const_iter>::_RandomAccessIterator_requirement_violation(const_iter());
_Mutable_RandomAccessIterator_concept_specification<iter>::_Mutable_RandomAccessIterator_requirement_violation(iter());
}
};
#endif /* if __STL_USE_CONCEPT_CHECKS */
#endif /* __STL_CONTAINER_CONCEPTS_H */
...@@ -39,7 +39,7 @@ namespace std ...@@ -39,7 +39,7 @@ namespace std
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
class ostreambuf_iterator class ostreambuf_iterator
#if 0 // XXX this is standard: #if 1 // XXX this is standard:
: public iterator<output_iterator_tag, _CharT, void, void, void> : public iterator<output_iterator_tag, _CharT, void, void, void>
#else #else
: public output_iterator : public output_iterator
......
/*
* Copyright (c) 1999
* Silicon Graphics Computer Systems, Inc.
*
* 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 appear 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.
*/
#ifndef _STL_SEQUENCE_CONCEPTS_H
#define _STL_SEQUENCE_CONCEPTS_H 1
#pragma GCC system_header
#include <bits/container_concepts.h>
#ifdef __STL_USE_CONCEPT_CHECKS
// This file covers the following concepts:
// _Sequence
// _FrontInsertionSequence
// _BackInsertionSequence
struct _ERROR_IN_STL_SEQ {
template <class _XX>
static void
__fill_constructor_requirement_violation(_XX& __s) {
typename _XX::value_type __t = typename _XX::value_type();
typename _XX::difference_type __n = typename _XX::difference_type();
_XX __x(__n, __t);
__sink_unused_warning(__x);
}
template <class _XX>
static void
__fill_default_constructor_requirement_violation(_XX& __s) {
_STL_ERROR::__default_constructor_requirement_violation(*__s.begin());
typename _XX::difference_type __n = typename _XX::difference_type();
_XX __x(__n);
__sink_unused_warning(__x);
}
template <class _XX>
static void
__range_constructor_requirement_violation(_XX& __s) {
_XX __x(__s.begin(), __s.end());
__sink_unused_warning(__x);
}
template <class _XX>
static void
__insert_function_requirement_violation(_XX& __s) {
typename _XX::value_type __t = typename _XX::value_type();
typename _XX::iterator __p = typename _XX::iterator();
__p = __s.insert(__p, __t);
}
template <class _XX>
static void
__fill_insert_function_requirement_violation(_XX& __s) {
typename _XX::value_type __t = typename _XX::value_type();
typename _XX::iterator __p = typename _XX::iterator();
typename _XX::difference_type __n = typename _XX::difference_type();
__s.insert(__p, __n, __t);
}
template <class _XX>
static void
__range_insert_function_requirement_violation(_XX& __s) {
typename _XX::iterator __p = typename _XX::iterator();
typename _XX::iterator __i = typename _XX::iterator();
typename _XX::iterator __j = typename _XX::iterator();
__s.insert(__p, __i, __j);
}
template <class _XX>
static void
__insert_element_function_requirement_violation(_XX& __s) {
typename _XX::value_type __t = typename _XX::value_type();
std::pair<typename _XX::iterator, bool> __r;
__r = __s.insert(__t);
__sink_unused_warning(__r);
}
template <class _XX>
static void
__unconditional_insert_element_function_requirement_violation(_XX& __s) {
typename _XX::value_type __t = typename _XX::value_type();
typename _XX::iterator __p;
__p = __s.insert(__t);
__sink_unused_warning(__p);
}
template <class _XX>
static void
__erase_function_requirement_violation(_XX& __s) {
typename _XX::iterator __p = typename _XX::iterator();
__p = __s.erase(__p);
}
template <class _XX>
static void
__range_erase_function_requirement_violation(_XX& __s) {
typename _XX::iterator __p = typename _XX::iterator();
typename _XX::iterator __q = typename _XX::iterator();
__p = __s.erase(__p, __q);
}
template <class _XX>
static void
__const_front_function_requirement_violation(const _XX& __s) {
typename _XX::const_reference __t = __s.front();
__sink_unused_warning(__t);
}
template <class _XX>
static void
__front_function_requirement_violation(_XX& __s) {
typename _XX::reference __t = __s.front();
__const_front_function_requirement_violation(__s);
__sink_unused_warning(__t);
}
template <class _XX>
static void
__const_back_function_requirement_violation(const _XX& __s) {
typename _XX::const_reference __t = __s.back();
__sink_unused_warning(__t);
}
template <class _XX>
static void
__back_function_requirement_violation(_XX& __s) {
typename _XX::reference __t = __s.back();
__const_back_function_requirement_violation(__s);
__sink_unused_warning(__t);
}
template <class _XX>
static void
__push_front_function_requirement_violation(_XX& __s) {
typename _XX::value_type __t = typename _XX::value_type();
__s.push_front(__t);
}
template <class _XX>
static void
__pop_front_function_requirement_violation(_XX& __s) {
__s.pop_front();
}
template <class _XX>
static void
__push_back_function_requirement_violation(_XX& __s) {
typename _XX::value_type __t = typename _XX::value_type();
__s.push_back(__t);
}
template <class _XX>
static void
__pop_back_function_requirement_violation(_XX& __s) {
__s.pop_back();
}
};
/* Sequence Containers */
template <class _Sequence>
struct _Sequence_concept_specification {
static void
_Sequence_requirement_violation(_Sequence __s) {
// Refinement of ForwardContainer
_ForwardContainer_concept_specification<_Sequence>::_ForwardContainer_requirement_violation(__s);
// Refinement of DefaultConstructible
_DefaultConstructible_concept_specification<_Sequence>::_DefaultConstructible_requirement_violation(__s);
// Valid Expressions
_ERROR_IN_STL_SEQ::__fill_constructor_requirement_violation(__s);
_ERROR_IN_STL_SEQ::__fill_default_constructor_requirement_violation(__s);
_ERROR_IN_STL_SEQ::__range_constructor_requirement_violation(__s);
_ERROR_IN_STL_SEQ::__insert_function_requirement_violation(__s);
_ERROR_IN_STL_SEQ::__fill_insert_function_requirement_violation(__s);
_ERROR_IN_STL_SEQ::__range_insert_function_requirement_violation(__s);
_ERROR_IN_STL_SEQ::__erase_function_requirement_violation(__s);
_ERROR_IN_STL_SEQ::__range_erase_function_requirement_violation(__s);
_ERROR_IN_STL_SEQ::__front_function_requirement_violation(__s);
}
};
template <class _FrontInsertionSequence>
struct _FrontInsertionSequence_concept_specification {
static void
_FrontInsertionSequence_requirement_violation(_FrontInsertionSequence __s) {
// Refinement of Sequence
_Sequence_concept_specification<_FrontInsertionSequence>::_Sequence_requirement_violation(__s);
// Valid Expressions
_ERROR_IN_STL_SEQ::__push_front_function_requirement_violation(__s);
_ERROR_IN_STL_SEQ::__pop_front_function_requirement_violation(__s);
}
};
template <class _BackInsertionSequence>
struct _BackInsertionSequence_concept_specification {
static void
_BackInsertionSequence_requirement_violation(_BackInsertionSequence __s) {
// Refinement of Sequence
_Sequence_concept_specification<_BackInsertionSequence>::_Sequence_requirement_violation(__s);
// Valid Expressions
_ERROR_IN_STL_SEQ::__back_function_requirement_violation(__s);
_ERROR_IN_STL_SEQ::__push_back_function_requirement_violation(__s);
_ERROR_IN_STL_SEQ::__pop_back_function_requirement_violation(__s);
}
};
#endif /* if __STL_USE_CONCEPT_CHECKS */
#endif /* _STL_SEQUENCE_CONCEPTS_H */
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
#include <bits/c++config.h> #include <bits/c++config.h>
#include <bits/std_cstddef.h> #include <bits/std_cstddef.h>
#include <bits/std_iosfwd.h> #include <bits/std_iosfwd.h>
#include <bits/stl_iterator_base.h> #include <bits/stl_iterator_base_types.h>
#include <bits/stl_iterator_base_funcs.h>
#include <bits/stl_iterator.h> #include <bits/stl_iterator.h>
#endif /* _CPP_ITERATOR */ #endif /* _CPP_ITERATOR */
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <bits/stl_algobase.h> #include <bits/stl_algobase.h>
#include <bits/stl_alloc.h> #include <bits/stl_alloc.h>
#include <bits/stl_construct.h> #include <bits/stl_construct.h>
#include <bits/stl_iterator_base.h> //for iterator_traits #include <bits/stl_iterator_base_types.h> //for iterator_traits
#include <bits/stl_tempbuf.h> #include <bits/stl_tempbuf.h>
#include <bits/stl_uninitialized.h> #include <bits/stl_uninitialized.h>
#include <bits/stl_raw_storage_iter.h> #include <bits/stl_raw_storage_iter.h>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -81,7 +81,7 @@ __destroy(_ForwardIterator __first, _ForwardIterator __last, _Tp*) ...@@ -81,7 +81,7 @@ __destroy(_ForwardIterator __first, _ForwardIterator __last, _Tp*)
template <class _ForwardIterator> template <class _ForwardIterator>
inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last) { inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last) {
__destroy(__first, __last, __VALUE_TYPE(__first)); __destroy(__first, __last, __value_type(__first));
} }
inline void _Destroy(char*, char*) {} inline void _Destroy(char*, char*) {}
......
...@@ -28,7 +28,9 @@ ...@@ -28,7 +28,9 @@
* You should not attempt to use it directly. * You should not attempt to use it directly.
*/ */
#include <bits/concept_checks.h> #include <bits/concept_check.h>
#include <bits/stl_iterator_base_types.h>
#include <bits/stl_iterator_base_funcs.h>
#ifndef __SGI_STL_INTERNAL_DEQUE_H #ifndef __SGI_STL_INTERNAL_DEQUE_H
#define __SGI_STL_INTERNAL_DEQUE_H #define __SGI_STL_INTERNAL_DEQUE_H
...@@ -354,9 +356,8 @@ _Deque_base<_Tp,_Alloc>::_M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish) ...@@ -354,9 +356,8 @@ _Deque_base<_Tp,_Alloc>::_M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish)
template <class _Tp, class _Alloc = allocator<_Tp> > template <class _Tp, class _Alloc = allocator<_Tp> >
class deque : protected _Deque_base<_Tp, _Alloc> { class deque : protected _Deque_base<_Tp, _Alloc> {
// requirements: // concept requirements
glibcpp_class_requires(_Tp, SGIAssignableConcept);
__STL_CLASS_REQUIRES(_Tp, _Assignable);
typedef _Deque_base<_Tp, _Alloc> _Base; typedef _Deque_base<_Tp, _Alloc> _Base;
public: // Basic types public: // Basic types
...@@ -469,7 +470,7 @@ public: // Constructor, destructor. ...@@ -469,7 +470,7 @@ public: // Constructor, destructor.
template <class _InputIter> template <class _InputIter>
void _M_initialize_dispatch(_InputIter __first, _InputIter __last, void _M_initialize_dispatch(_InputIter __first, _InputIter __last,
__false_type) { __false_type) {
_M_range_initialize(__first, __last, __ITERATOR_CATEGORY(__first)); _M_range_initialize(__first, __last, __iterator_category(__first));
} }
~deque() { destroy(_M_start, _M_finish); } ~deque() { destroy(_M_start, _M_finish); }
...@@ -531,7 +532,7 @@ private: // helper functions for assign() ...@@ -531,7 +532,7 @@ private: // helper functions for assign()
template <class _InputIterator> template <class _InputIterator>
void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, void _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
__false_type) { __false_type) {
_M_assign_aux(__first, __last, __ITERATOR_CATEGORY(__first)); _M_assign_aux(__first, __last, __iterator_category(__first));
} }
template <class _InputIterator> template <class _InputIterator>
...@@ -653,7 +654,7 @@ public: // Insert ...@@ -653,7 +654,7 @@ public: // Insert
void _M_insert_dispatch(iterator __pos, void _M_insert_dispatch(iterator __pos,
_InputIterator __first, _InputIterator __last, _InputIterator __first, _InputIterator __last,
__false_type) { __false_type) {
insert(__pos, __first, __last, __ITERATOR_CATEGORY(__first)); insert(__pos, __first, __last, __iterator_category(__first));
} }
void resize(size_type __new_size, const value_type& __x) { void resize(size_type __new_size, const value_type& __x) {
......
...@@ -62,11 +62,14 @@ template <class _RandomAccessIterator> ...@@ -62,11 +62,14 @@ template <class _RandomAccessIterator>
inline void inline void
push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{ {
__STL_REQUIRES(_RandomAccessIterator, _Mutable_RandomAccessIterator); // concept requirements
__STL_REQUIRES(typename iterator_traits<_RandomAccessIterator>::value_type, glibcpp_function_requires(Mutable_RandomAccessIteratorConcept<
_LessThanComparable); _RandomAccessIterator>);
glibcpp_function_requires(LessThanComparableConcept<
typename iterator_traits<_RandomAccessIterator>::value_type>);
__push_heap_aux(__first, __last, __push_heap_aux(__first, __last,
__DISTANCE_TYPE(__first), __VALUE_TYPE(__first)); __distance_type(__first), __value_type(__first));
} }
template <class _RandomAccessIterator, class _Distance, class _Tp, template <class _RandomAccessIterator, class _Distance, class _Tp,
...@@ -100,9 +103,12 @@ inline void ...@@ -100,9 +103,12 @@ inline void
push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Compare __comp) _Compare __comp)
{ {
__STL_REQUIRES(_RandomAccessIterator, _Mutable_RandomAccessIterator); // concept requirements
glibcpp_function_requires(Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>);
__push_heap_aux(__first, __last, __comp, __push_heap_aux(__first, __last, __comp,
__DISTANCE_TYPE(__first), __VALUE_TYPE(__first)); __distance_type(__first), __value_type(__first));
} }
template <class _RandomAccessIterator, class _Distance, class _Tp> template <class _RandomAccessIterator, class _Distance, class _Tp>
...@@ -141,17 +147,20 @@ __pop_heap_aux(_RandomAccessIterator __first, _RandomAccessIterator __last, ...@@ -141,17 +147,20 @@ __pop_heap_aux(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Tp*) _Tp*)
{ {
__pop_heap(__first, __last - 1, __last - 1, __pop_heap(__first, __last - 1, __last - 1,
_Tp(*(__last - 1)), __DISTANCE_TYPE(__first)); _Tp(*(__last - 1)), __distance_type(__first));
} }
template <class _RandomAccessIterator> template <class _RandomAccessIterator>
inline void pop_heap(_RandomAccessIterator __first, inline void pop_heap(_RandomAccessIterator __first,
_RandomAccessIterator __last) _RandomAccessIterator __last)
{ {
__STL_REQUIRES(_RandomAccessIterator, _Mutable_RandomAccessIterator); // concept requirements
__STL_REQUIRES(typename iterator_traits<_RandomAccessIterator>::value_type, glibcpp_function_requires(Mutable_RandomAccessIteratorConcept<
_LessThanComparable); _RandomAccessIterator>);
__pop_heap_aux(__first, __last, __VALUE_TYPE(__first)); glibcpp_function_requires(LessThanComparableConcept<
typename iterator_traits<_RandomAccessIterator>::value_type>);
__pop_heap_aux(__first, __last, __value_type(__first));
} }
template <class _RandomAccessIterator, class _Distance, template <class _RandomAccessIterator, class _Distance,
...@@ -194,7 +203,7 @@ __pop_heap_aux(_RandomAccessIterator __first, ...@@ -194,7 +203,7 @@ __pop_heap_aux(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Tp*, _Compare __comp) _RandomAccessIterator __last, _Tp*, _Compare __comp)
{ {
__pop_heap(__first, __last - 1, __last - 1, _Tp(*(__last - 1)), __comp, __pop_heap(__first, __last - 1, __last - 1, _Tp(*(__last - 1)), __comp,
__DISTANCE_TYPE(__first)); __distance_type(__first));
} }
template <class _RandomAccessIterator, class _Compare> template <class _RandomAccessIterator, class _Compare>
...@@ -202,8 +211,11 @@ inline void ...@@ -202,8 +211,11 @@ inline void
pop_heap(_RandomAccessIterator __first, pop_heap(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp) _RandomAccessIterator __last, _Compare __comp)
{ {
__STL_REQUIRES(_RandomAccessIterator, _Mutable_RandomAccessIterator); // concept requirements
__pop_heap_aux(__first, __last, __VALUE_TYPE(__first), __comp); glibcpp_function_requires(Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>);
__pop_heap_aux(__first, __last, __value_type(__first), __comp);
} }
template <class _RandomAccessIterator, class _Tp, class _Distance> template <class _RandomAccessIterator, class _Tp, class _Distance>
...@@ -226,11 +238,14 @@ template <class _RandomAccessIterator> ...@@ -226,11 +238,14 @@ template <class _RandomAccessIterator>
inline void inline void
make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{ {
__STL_REQUIRES(_RandomAccessIterator, _Mutable_RandomAccessIterator); // concept requirements
__STL_REQUIRES(typename iterator_traits<_RandomAccessIterator>::value_type, glibcpp_function_requires(Mutable_RandomAccessIteratorConcept<
_LessThanComparable); _RandomAccessIterator>);
glibcpp_function_requires(LessThanComparableConcept<
typename iterator_traits<_RandomAccessIterator>::value_type>);
__make_heap(__first, __last, __make_heap(__first, __last,
__VALUE_TYPE(__first), __DISTANCE_TYPE(__first)); __value_type(__first), __distance_type(__first));
} }
template <class _RandomAccessIterator, class _Compare, template <class _RandomAccessIterator, class _Compare,
...@@ -256,17 +271,23 @@ inline void ...@@ -256,17 +271,23 @@ inline void
make_heap(_RandomAccessIterator __first, make_heap(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp) _RandomAccessIterator __last, _Compare __comp)
{ {
__STL_REQUIRES(_RandomAccessIterator, _Mutable_RandomAccessIterator); // concept requirements
glibcpp_function_requires(Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>);
__make_heap(__first, __last, __comp, __make_heap(__first, __last, __comp,
__VALUE_TYPE(__first), __DISTANCE_TYPE(__first)); __value_type(__first), __distance_type(__first));
} }
template <class _RandomAccessIterator> template <class _RandomAccessIterator>
void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{ {
__STL_REQUIRES(_RandomAccessIterator, _Mutable_RandomAccessIterator); // concept requirements
__STL_REQUIRES(typename iterator_traits<_RandomAccessIterator>::value_type, glibcpp_function_requires(Mutable_RandomAccessIteratorConcept<
_LessThanComparable); _RandomAccessIterator>);
glibcpp_function_requires(LessThanComparableConcept<
typename iterator_traits<_RandomAccessIterator>::value_type>);
while (__last - __first > 1) while (__last - __first > 1)
pop_heap(__first, __last--); pop_heap(__first, __last--);
} }
...@@ -276,7 +297,10 @@ void ...@@ -276,7 +297,10 @@ void
sort_heap(_RandomAccessIterator __first, sort_heap(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp) _RandomAccessIterator __last, _Compare __comp)
{ {
__STL_REQUIRES(_RandomAccessIterator, _Mutable_RandomAccessIterator); // concept requirements
glibcpp_function_requires(Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>);
while (__last - __first > 1) while (__last - __first > 1)
pop_heap(__first, __last--, __comp); pop_heap(__first, __last--, __comp);
} }
......
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* 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 appear 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.
*
*
* Copyright (c) 1996-1998
* Silicon Graphics Computer Systems, Inc.
*
* 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 appear 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.
*/
/* NOTE: This is an internal header file, included by other STL headers.
* You should not attempt to use it directly.
*/
#ifndef __SGI_STL_INTERNAL_ITERATOR_BASE_FUNCS_H
#define __SGI_STL_INTERNAL_ITERATOR_BASE_FUNCS_H
// This file contains all of the general iterator-related utility
// functions, such as distance() and advance().
// The internal file stl_iterator.h contains predefined iterators,
// such as front_insert_iterator and istream_iterator.
#pragma GCC system_header
#include <bits/concept_check.h>
namespace std
{
// There are two signatures for distance. In addition to the one taking
// two iterators and returning a result, there is another taking two
// iterators and a reference-to-result variable, and returning nothing.
// The latter seems to be an SGI extension. -- pedwards
template <class _InputIterator, class _Distance>
inline void __distance(_InputIterator __first, _InputIterator __last,
_Distance& __n, input_iterator_tag)
{
// concept requirements
glibcpp_function_requires(InputIteratorConcept<_InputIterator>);
while (__first != __last) { ++__first; ++__n; }
}
template <class _RandomAccessIterator, class _Distance>
inline void __distance(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Distance& __n, random_access_iterator_tag)
{
// concept requirements
glibcpp_function_requires(RandomAccessIteratorConcept<_RandomAccessIterator>);
__n += __last - __first;
}
template <class _InputIterator, class _Distance>
inline void distance(_InputIterator __first,
_InputIterator __last, _Distance& __n)
{
// concept requirements -- taken care of in __distance
__distance(__first, __last, __n, iterator_category(__first));
}
template <class _InputIterator>
inline typename iterator_traits<_InputIterator>::difference_type
__distance(_InputIterator __first, _InputIterator __last, input_iterator_tag)
{
// concept requirements
glibcpp_function_requires(InputIteratorConcept<_InputIterator>);
typename iterator_traits<_InputIterator>::difference_type __n = 0;
while (__first != __last) {
++__first; ++__n;
}
return __n;
}
template <class _RandomAccessIterator>
inline typename iterator_traits<_RandomAccessIterator>::difference_type
__distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
random_access_iterator_tag)
{
// concept requirements
glibcpp_function_requires(RandomAccessIteratorConcept<_RandomAccessIterator>);
return __last - __first;
}
template <class _InputIterator>
inline typename iterator_traits<_InputIterator>::difference_type
distance(_InputIterator __first, _InputIterator __last)
{
// concept requirements -- taken care of in __distance
typedef typename iterator_traits<_InputIterator>::iterator_category
_Category;
return __distance(__first, __last, _Category());
}
template <class _InputIter, class _Distance>
inline void __advance(_InputIter& __i, _Distance __n, input_iterator_tag)
{
// concept requirements
glibcpp_function_requires(InputIteratorConcept<_InputIter>);
while (__n--) ++__i;
}
template <class _BidirectionalIterator, class _Distance>
inline void __advance(_BidirectionalIterator& __i, _Distance __n,
bidirectional_iterator_tag)
{
// concept requirements
glibcpp_function_requires(BidirectionalIteratorConcept<_BidirectionalIterator>);
if (__n >= 0)
while (__n--) ++__i;
else
while (__n++) --__i;
}
template <class _RandomAccessIterator, class _Distance>
inline void __advance(_RandomAccessIterator& __i, _Distance __n,
random_access_iterator_tag)
{
// concept requirements
glibcpp_function_requires(RandomAccessIteratorConcept<_RandomAccessIterator>);
__i += __n;
}
template <class _InputIterator, class _Distance>
inline void advance(_InputIterator& __i, _Distance __n)
{
// concept requirements -- taken care of in __advance
__advance(__i, __n, iterator_category(__i));
}
} // namespace std
#endif /* __SGI_STL_INTERNAL_ITERATOR_BASE_FUNCS_H */
// Local Variables:
// mode:C++
// End:
...@@ -28,14 +28,15 @@ ...@@ -28,14 +28,15 @@
* You should not attempt to use it directly. * You should not attempt to use it directly.
*/ */
#ifndef __SGI_STL_INTERNAL_ITERATOR_BASE_H #ifndef __SGI_STL_INTERNAL_ITERATOR_BASE_TYPES_H
#define __SGI_STL_INTERNAL_ITERATOR_BASE_H #define __SGI_STL_INTERNAL_ITERATOR_BASE_TYPES_H
// This file contains all of the general iterator-related utilities. // This file contains all of the general iterator-related utility
// types, such as iterator_traits and struct iterator.
// The internal file stl_iterator.h contains predefined iterators, // The internal file stl_iterator.h contains predefined iterators,
// such as front_insert_iterator and istream_iterator. // such as front_insert_iterator and istream_iterator.
#include <bits/concept_checks.h> #pragma GCC system header
namespace std namespace std
{ {
...@@ -171,93 +172,9 @@ template <class _Iter> ...@@ -171,93 +172,9 @@ template <class _Iter>
inline typename iterator_traits<_Iter>::value_type* inline typename iterator_traits<_Iter>::value_type*
value_type(const _Iter& __i) { return __value_type(__i); } value_type(const _Iter& __i) { return __value_type(__i); }
#define __ITERATOR_CATEGORY(__i) __iterator_category(__i)
#define __DISTANCE_TYPE(__i) __distance_type(__i)
#define __VALUE_TYPE(__i) __value_type(__i)
template <class _InputIterator, class _Distance>
inline void __distance(_InputIterator __first, _InputIterator __last,
_Distance& __n, input_iterator_tag)
{
while (__first != __last) { ++__first; ++__n; }
}
template <class _RandomAccessIterator, class _Distance>
inline void __distance(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Distance& __n, random_access_iterator_tag)
{
__STL_REQUIRES(_RandomAccessIterator, _RandomAccessIterator);
__n += __last - __first;
}
template <class _InputIterator, class _Distance>
inline void distance(_InputIterator __first,
_InputIterator __last, _Distance& __n)
{
__STL_REQUIRES(_InputIterator, _InputIterator);
__distance(__first, __last, __n, iterator_category(__first));
}
template <class _InputIterator>
inline typename iterator_traits<_InputIterator>::difference_type
__distance(_InputIterator __first, _InputIterator __last, input_iterator_tag)
{
typename iterator_traits<_InputIterator>::difference_type __n = 0;
while (__first != __last) {
++__first; ++__n;
}
return __n;
}
template <class _RandomAccessIterator>
inline typename iterator_traits<_RandomAccessIterator>::difference_type
__distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
random_access_iterator_tag) {
__STL_REQUIRES(_RandomAccessIterator, _RandomAccessIterator);
return __last - __first;
}
template <class _InputIterator>
inline typename iterator_traits<_InputIterator>::difference_type
distance(_InputIterator __first, _InputIterator __last) {
typedef typename iterator_traits<_InputIterator>::iterator_category
_Category;
__STL_REQUIRES(_InputIterator, _InputIterator);
return __distance(__first, __last, _Category());
}
template <class _InputIter, class _Distance>
inline void __advance(_InputIter& __i, _Distance __n, input_iterator_tag) {
while (__n--) ++__i;
}
template <class _BidirectionalIterator, class _Distance>
inline void __advance(_BidirectionalIterator& __i, _Distance __n,
bidirectional_iterator_tag) {
__STL_REQUIRES(_BidirectionalIterator, _BidirectionalIterator);
if (__n >= 0)
while (__n--) ++__i;
else
while (__n++) --__i;
}
template <class _RandomAccessIterator, class _Distance>
inline void __advance(_RandomAccessIterator& __i, _Distance __n,
random_access_iterator_tag) {
__STL_REQUIRES(_RandomAccessIterator, _RandomAccessIterator);
__i += __n;
}
template <class _InputIterator, class _Distance>
inline void advance(_InputIterator& __i, _Distance __n) {
__STL_REQUIRES(_InputIterator, _InputIterator);
__advance(__i, __n, iterator_category(__i));
}
} // namespace std } // namespace std
#endif /* __SGI_STL_INTERNAL_ITERATOR_BASE_H */ #endif /* __SGI_STL_INTERNAL_ITERATOR_BASE_TYPES_H */
// Local Variables: // Local Variables:
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#ifndef __SGI_STL_INTERNAL_LIST_H #ifndef __SGI_STL_INTERNAL_LIST_H
#define __SGI_STL_INTERNAL_LIST_H #define __SGI_STL_INTERNAL_LIST_H
#include <bits/concept_checks.h> #include <bits/concept_check.h>
namespace std namespace std
{ {
...@@ -198,10 +198,10 @@ _List_base<_Tp,_Alloc>::clear() ...@@ -198,10 +198,10 @@ _List_base<_Tp,_Alloc>::clear()
} }
template <class _Tp, class _Alloc = allocator<_Tp> > template <class _Tp, class _Alloc = allocator<_Tp> >
class list : protected _List_base<_Tp, _Alloc> { class list : protected _List_base<_Tp, _Alloc>
// requirements: {
// concept requirements
__STL_CLASS_REQUIRES(_Tp, _Assignable); glibcpp_class_requires(_Tp, SGIAssignableConcept);
typedef _List_base<_Tp, _Alloc> _Base; typedef _List_base<_Tp, _Alloc> _Base;
protected: protected:
......
...@@ -31,23 +31,21 @@ ...@@ -31,23 +31,21 @@
#ifndef _CPP_BITS_STL_MAP_H #ifndef _CPP_BITS_STL_MAP_H
#define _CPP_BITS_STL_MAP_H 1 #define _CPP_BITS_STL_MAP_H 1
#include <bits/concept_checks.h> #include <bits/concept_check.h>
namespace std namespace std
{ {
template <class _Key, class _Tp, class _Compare = less<_Key>, template <class _Key, class _Tp, class _Compare = less<_Key>,
class _Alloc = allocator<pair<const _Key, _Tp> > > class _Alloc = allocator<pair<const _Key, _Tp> > >
class map { class map
public: {
// concept requirements
// requirements: glibcpp_class_requires(_Tp, SGIAssignableConcept);
glibcpp_class_requires4(_Compare, bool, _Key, _Key, BinaryFunctionConcept);
__STL_CLASS_REQUIRES(_Tp, _Assignable);
__STL_CLASS_BINARY_FUNCTION_CHECK(_Compare, bool, _Key, _Key);
// typedefs:
public:
// typedefs:
typedef _Key key_type; typedef _Key key_type;
typedef _Tp data_type; typedef _Tp data_type;
typedef _Tp mapped_type; typedef _Tp mapped_type;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#ifndef __SGI_STL_INTERNAL_MULTIMAP_H #ifndef __SGI_STL_INTERNAL_MULTIMAP_H
#define __SGI_STL_INTERNAL_MULTIMAP_H #define __SGI_STL_INTERNAL_MULTIMAP_H
#include <bits/concept_checks.h> #include <bits/concept_check.h>
namespace std namespace std
{ {
...@@ -52,11 +52,11 @@ inline bool operator<(const multimap<_Key,_Tp,_Compare,_Alloc>& __x, ...@@ -52,11 +52,11 @@ inline bool operator<(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
const multimap<_Key,_Tp,_Compare,_Alloc>& __y); const multimap<_Key,_Tp,_Compare,_Alloc>& __y);
template <class _Key, class _Tp, class _Compare, class _Alloc> template <class _Key, class _Tp, class _Compare, class _Alloc>
class multimap { class multimap
// requirements: {
// concept requirements
__STL_CLASS_REQUIRES(_Tp, _Assignable); glibcpp_class_requires(_Tp, SGIAssignableConcept);
__STL_CLASS_BINARY_FUNCTION_CHECK(_Compare, bool, _Key, _Key); glibcpp_class_requires4(_Compare, bool, _Key, _Key, BinaryFunctionConcept);
public: public:
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#ifndef __SGI_STL_INTERNAL_MULTISET_H #ifndef __SGI_STL_INTERNAL_MULTISET_H
#define __SGI_STL_INTERNAL_MULTISET_H #define __SGI_STL_INTERNAL_MULTISET_H
#include <bits/concept_checks.h> #include <bits/concept_check.h>
namespace std namespace std
{ {
...@@ -51,11 +51,11 @@ inline bool operator<(const multiset<_Key,_Compare,_Alloc>& __x, ...@@ -51,11 +51,11 @@ inline bool operator<(const multiset<_Key,_Compare,_Alloc>& __x,
const multiset<_Key,_Compare,_Alloc>& __y); const multiset<_Key,_Compare,_Alloc>& __y);
template <class _Key, class _Compare, class _Alloc> template <class _Key, class _Compare, class _Alloc>
class multiset { class multiset
// requirements: {
// concept requirements
__STL_CLASS_REQUIRES(_Key, _Assignable); glibcpp_class_requires(_Key, SGIAssignableConcept);
__STL_CLASS_BINARY_FUNCTION_CHECK(_Compare, bool, _Key, _Key); glibcpp_class_requires4(_Compare, bool, _Key, _Key, BinaryFunctionConcept);
public: public:
......
...@@ -38,7 +38,9 @@ namespace std ...@@ -38,7 +38,9 @@ namespace std
template <class _InputIterator, class _Tp> template <class _InputIterator, class _Tp>
_Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp __init) _Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
{ {
__STL_REQUIRES(_InputIterator, _InputIterator); // concept requirements
glibcpp_function_requires(InputIteratorConcept<_InputIterator>);
for ( ; __first != __last; ++__first) for ( ; __first != __last; ++__first)
__init = __init + *__first; __init = __init + *__first;
return __init; return __init;
...@@ -48,7 +50,9 @@ template <class _InputIterator, class _Tp, class _BinaryOperation> ...@@ -48,7 +50,9 @@ template <class _InputIterator, class _Tp, class _BinaryOperation>
_Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, _Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp __init,
_BinaryOperation __binary_op) _BinaryOperation __binary_op)
{ {
__STL_REQUIRES(_InputIterator, _InputIterator); // concept requirements
glibcpp_function_requires(InputIteratorConcept<_InputIterator>);
for ( ; __first != __last; ++__first) for ( ; __first != __last; ++__first)
__init = __binary_op(__init, *__first); __init = __binary_op(__init, *__first);
return __init; return __init;
...@@ -58,8 +62,10 @@ template <class _InputIterator1, class _InputIterator2, class _Tp> ...@@ -58,8 +62,10 @@ template <class _InputIterator1, class _InputIterator2, class _Tp>
_Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _Tp __init) _InputIterator2 __first2, _Tp __init)
{ {
__STL_REQUIRES(_InputIterator2, _InputIterator); // concept requirements
__STL_REQUIRES(_InputIterator2, _InputIterator); glibcpp_function_requires(InputIteratorConcept<_InputIterator1>);
glibcpp_function_requires(InputIteratorConcept<_InputIterator2>);
for ( ; __first1 != __last1; ++__first1, ++__first2) for ( ; __first1 != __last1; ++__first1, ++__first2)
__init = __init + (*__first1 * *__first2); __init = __init + (*__first1 * *__first2);
return __init; return __init;
...@@ -72,8 +78,10 @@ _Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, ...@@ -72,8 +78,10 @@ _Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
_BinaryOperation1 __binary_op1, _BinaryOperation1 __binary_op1,
_BinaryOperation2 __binary_op2) _BinaryOperation2 __binary_op2)
{ {
__STL_REQUIRES(_InputIterator2, _InputIterator); // concept requirements
__STL_REQUIRES(_InputIterator2, _InputIterator); glibcpp_function_requires(InputIteratorConcept<_InputIterator1>);
glibcpp_function_requires(InputIteratorConcept<_InputIterator2>);
for ( ; __first1 != __last1; ++__first1, ++__first2) for ( ; __first1 != __last1; ++__first1, ++__first2)
__init = __binary_op1(__init, __binary_op2(*__first1, *__first2)); __init = __binary_op1(__init, __binary_op2(*__first1, *__first2));
return __init; return __init;
...@@ -97,11 +105,14 @@ _OutputIterator ...@@ -97,11 +105,14 @@ _OutputIterator
partial_sum(_InputIterator __first, _InputIterator __last, partial_sum(_InputIterator __first, _InputIterator __last,
_OutputIterator __result) _OutputIterator __result)
{ {
__STL_REQUIRES(_InputIterator, _InputIterator); // concept requirements
__STL_REQUIRES(_OutputIterator, _OutputIterator); glibcpp_function_requires(InputIteratorConcept<_InputIterator>);
glibcpp_function_requires(OutputIteratorConcept<_OutputIterator,
typename iterator_traits<_InputIterator>::value_type>);
if (__first == __last) return __result; if (__first == __last) return __result;
*__result = *__first; *__result = *__first;
return __partial_sum(__first, __last, __result, __VALUE_TYPE(__first)); return __partial_sum(__first, __last, __result, __value_type(__first));
} }
template <class _InputIterator, class _OutputIterator, class _Tp, template <class _InputIterator, class _OutputIterator, class _Tp,
...@@ -123,11 +134,14 @@ _OutputIterator ...@@ -123,11 +134,14 @@ _OutputIterator
partial_sum(_InputIterator __first, _InputIterator __last, partial_sum(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, _BinaryOperation __binary_op) _OutputIterator __result, _BinaryOperation __binary_op)
{ {
__STL_REQUIRES(_InputIterator, _InputIterator); // concept requirements
__STL_REQUIRES(_OutputIterator, _OutputIterator); glibcpp_function_requires(InputIteratorConcept<_InputIterator>);
glibcpp_function_requires(OutputIteratorConcept<_OutputIterator,
typename iterator_traits<_InputIterator>::value_type>);
if (__first == __last) return __result; if (__first == __last) return __result;
*__result = *__first; *__result = *__first;
return __partial_sum(__first, __last, __result, __VALUE_TYPE(__first), return __partial_sum(__first, __last, __result, __value_type(__first),
__binary_op); __binary_op);
} }
...@@ -150,12 +164,15 @@ _OutputIterator ...@@ -150,12 +164,15 @@ _OutputIterator
adjacent_difference(_InputIterator __first, adjacent_difference(_InputIterator __first,
_InputIterator __last, _OutputIterator __result) _InputIterator __last, _OutputIterator __result)
{ {
__STL_REQUIRES(_InputIterator, _InputIterator); // concept requirements
__STL_REQUIRES(_OutputIterator, _OutputIterator); glibcpp_function_requires(InputIteratorConcept<_InputIterator>);
glibcpp_function_requires(OutputIteratorConcept<_OutputIterator,
typename iterator_traits<_InputIterator>::value_type>);
if (__first == __last) return __result; if (__first == __last) return __result;
*__result = *__first; *__result = *__first;
return __adjacent_difference(__first, __last, __result, return __adjacent_difference(__first, __last, __result,
__VALUE_TYPE(__first)); __value_type(__first));
} }
template <class _InputIterator, class _OutputIterator, class _Tp, template <class _InputIterator, class _OutputIterator, class _Tp,
...@@ -178,12 +195,15 @@ _OutputIterator ...@@ -178,12 +195,15 @@ _OutputIterator
adjacent_difference(_InputIterator __first, _InputIterator __last, adjacent_difference(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, _BinaryOperation __binary_op) _OutputIterator __result, _BinaryOperation __binary_op)
{ {
__STL_REQUIRES(_InputIterator, _InputIterator); // concept requirements
__STL_REQUIRES(_OutputIterator, _OutputIterator); glibcpp_function_requires(InputIteratorConcept<_InputIterator>);
glibcpp_function_requires(OutputIteratorConcept<_OutputIterator,
typename iterator_traits<_InputIterator>::value_type>);
if (__first == __last) return __result; if (__first == __last) return __result;
*__result = *__first; *__result = *__first;
return __adjacent_difference(__first, __last, __result, return __adjacent_difference(__first, __last, __result,
__VALUE_TYPE(__first), __value_type(__first),
__binary_op); __binary_op);
} }
...@@ -241,8 +261,11 @@ template <class _ForwardIter, class _Tp> ...@@ -241,8 +261,11 @@ template <class _ForwardIter, class _Tp>
void void
iota(_ForwardIter __first, _ForwardIter __last, _Tp __value) iota(_ForwardIter __first, _ForwardIter __last, _Tp __value)
{ {
__STL_REQUIRES(_ForwardIter, _Mutable_ForwardIterator); // concept requirements
__STL_CONVERTIBLE(_Tp, typename iterator_traits<_ForwardIter>::value_type); glibcpp_function_requires(Mutable_ForwardIteratorConcept<_ForwardIter>);
glibcpp_function_requires(ConvertibleConcept<_Tp,
typename iterator_traits<_ForwardIter>::value_type>);
while (__first != __last) while (__first != __last)
*__first++ = __value++; *__first++ = __value++;
} }
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#ifndef __SGI_STL_INTERNAL_QUEUE_H #ifndef __SGI_STL_INTERNAL_QUEUE_H
#define __SGI_STL_INTERNAL_QUEUE_H #define __SGI_STL_INTERNAL_QUEUE_H
#include <bits/sequence_concepts.h> #include <bits/concept_check.h>
namespace std namespace std
{ {
...@@ -50,16 +50,14 @@ inline bool operator<(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&); ...@@ -50,16 +50,14 @@ inline bool operator<(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&);
template <class _Tp, class _Sequence> template <class _Tp, class _Sequence>
class queue { class queue
{
// requirements: // concept requirements
glibcpp_class_requires(_Tp, SGIAssignableConcept);
__STL_CLASS_REQUIRES(_Tp, _Assignable); glibcpp_class_requires(_Sequence, FrontInsertionSequenceConcept);
__STL_CLASS_REQUIRES(_Sequence, _FrontInsertionSequence); glibcpp_class_requires(_Sequence, BackInsertionSequenceConcept);
__STL_CLASS_REQUIRES(_Sequence, _BackInsertionSequence);
typedef typename _Sequence::value_type _Sequence_value_type; typedef typename _Sequence::value_type _Sequence_value_type;
__STL_CLASS_REQUIRES_SAME_TYPE(_Tp, _Sequence_value_type); glibcpp_class_requires2(_Tp, _Sequence_value_type, SameTypeConcept);
template <class _Tp1, class _Seq1> template <class _Tp1, class _Seq1>
friend bool operator== (const queue<_Tp1, _Seq1>&, friend bool operator== (const queue<_Tp1, _Seq1>&,
...@@ -135,17 +133,17 @@ operator>=(const queue<_Tp, _Sequence>& __x, const queue<_Tp, _Sequence>& __y) ...@@ -135,17 +133,17 @@ operator>=(const queue<_Tp, _Sequence>& __x, const queue<_Tp, _Sequence>& __y)
template <class _Tp, template <class _Tp,
class _Sequence = vector<_Tp>, class _Sequence = vector<_Tp>,
class _Compare = less<typename _Sequence::value_type> > class _Compare = less<typename _Sequence::value_type> >
class priority_queue { class priority_queue
public: {
// concept requirements
// requirements: glibcpp_class_requires(_Tp, SGIAssignableConcept);
__STL_CLASS_REQUIRES(_Tp, _Assignable); glibcpp_class_requires(_Sequence, SequenceConcept);
__STL_CLASS_REQUIRES(_Sequence, _Sequence); glibcpp_class_requires(_Sequence, RandomAccessContainerConcept);
__STL_CLASS_REQUIRES(_Sequence, _RandomAccessContainer);
typedef typename _Sequence::value_type _Sequence_value_type; typedef typename _Sequence::value_type _Sequence_value_type;
__STL_CLASS_REQUIRES_SAME_TYPE(_Tp, _Sequence_value_type); glibcpp_class_requires2(_Tp, _Sequence_value_type, SameTypeConcept);
__STL_CLASS_BINARY_FUNCTION_CHECK(_Compare, bool, _Tp, _Tp); glibcpp_class_requires4(_Compare, bool, _Tp, _Tp, BinaryFunctionConcept);
public:
typedef typename _Sequence::value_type value_type; typedef typename _Sequence::value_type value_type;
typedef typename _Sequence::size_type size_type; typedef typename _Sequence::size_type size_type;
typedef _Sequence container_type; typedef _Sequence container_type;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#ifndef __SGI_STL_INTERNAL_SET_H #ifndef __SGI_STL_INTERNAL_SET_H
#define __SGI_STL_INTERNAL_SET_H #define __SGI_STL_INTERNAL_SET_H
#include <bits/concept_checks.h> #include <bits/concept_check.h>
namespace std namespace std
{ {
...@@ -52,15 +52,14 @@ inline bool operator<(const set<_Key,_Compare,_Alloc>& __x, ...@@ -52,15 +52,14 @@ inline bool operator<(const set<_Key,_Compare,_Alloc>& __x,
template <class _Key, class _Compare, class _Alloc> template <class _Key, class _Compare, class _Alloc>
class set { class set
// requirements: {
// concept requirements
__STL_CLASS_REQUIRES(_Key, _Assignable); glibcpp_class_requires(_Key, SGIAssignableConcept);
__STL_CLASS_BINARY_FUNCTION_CHECK(_Compare, bool, _Key, _Key); glibcpp_class_requires4(_Compare, bool, _Key, _Key, BinaryFunctionConcept);
public: public:
// typedefs: // typedefs:
typedef _Key key_type; typedef _Key key_type;
typedef _Key value_type; typedef _Key value_type;
typedef _Compare key_compare; typedef _Compare key_compare;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#ifndef __SGI_STL_INTERNAL_STACK_H #ifndef __SGI_STL_INTERNAL_STACK_H
#define __SGI_STL_INTERNAL_STACK_H #define __SGI_STL_INTERNAL_STACK_H
#include <bits/sequence_concepts.h> #include <bits/concept_check.h>
namespace std namespace std
{ {
...@@ -50,15 +50,13 @@ bool operator<(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y); ...@@ -50,15 +50,13 @@ bool operator<(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y);
template <class _Tp, class _Sequence> template <class _Tp, class _Sequence>
class stack { class stack
{
// requirements: // concept requirements
glibcpp_class_requires(_Tp, SGIAssignableConcept);
__STL_CLASS_REQUIRES(_Tp, _Assignable); glibcpp_class_requires(_Sequence, BackInsertionSequenceConcept);
__STL_CLASS_REQUIRES(_Sequence, _BackInsertionSequence);
typedef typename _Sequence::value_type _Sequence_value_type; typedef typename _Sequence::value_type _Sequence_value_type;
__STL_CLASS_REQUIRES_SAME_TYPE(_Tp, _Sequence_value_type); glibcpp_class_requires2(_Tp, _Sequence_value_type, SameTypeConcept);
template <class _Tp1, class _Seq1> template <class _Tp1, class _Seq1>
friend bool operator== (const stack<_Tp1, _Seq1>&, friend bool operator== (const stack<_Tp1, _Seq1>&,
......
...@@ -80,7 +80,7 @@ inline _ForwardIter ...@@ -80,7 +80,7 @@ inline _ForwardIter
_ForwardIter __result) _ForwardIter __result)
{ {
return __uninitialized_copy(__first, __last, __result, return __uninitialized_copy(__first, __last, __result,
__VALUE_TYPE(__result)); __value_type(__result));
} }
inline char* uninitialized_copy(const char* __first, const char* __last, inline char* uninitialized_copy(const char* __first, const char* __last,
...@@ -130,7 +130,7 @@ inline pair<_InputIter, _ForwardIter> ...@@ -130,7 +130,7 @@ inline pair<_InputIter, _ForwardIter>
__uninitialized_copy_n(_InputIter __first, _Size __count, __uninitialized_copy_n(_InputIter __first, _Size __count,
_ForwardIter __result) { _ForwardIter __result) {
return __uninitialized_copy_n(__first, __count, __result, return __uninitialized_copy_n(__first, __count, __result,
__ITERATOR_CATEGORY(__first)); __iterator_category(__first));
} }
template <class _InputIter, class _Size, class _ForwardIter> template <class _InputIter, class _Size, class _ForwardIter>
...@@ -138,7 +138,7 @@ inline pair<_InputIter, _ForwardIter> ...@@ -138,7 +138,7 @@ inline pair<_InputIter, _ForwardIter>
uninitialized_copy_n(_InputIter __first, _Size __count, uninitialized_copy_n(_InputIter __first, _Size __count,
_ForwardIter __result) { _ForwardIter __result) {
return __uninitialized_copy_n(__first, __count, __result, return __uninitialized_copy_n(__first, __count, __result,
__ITERATOR_CATEGORY(__first)); __iterator_category(__first));
} }
// Valid if copy construction is equivalent to assignment, and if the // Valid if copy construction is equivalent to assignment, and if the
...@@ -178,7 +178,7 @@ inline void uninitialized_fill(_ForwardIter __first, ...@@ -178,7 +178,7 @@ inline void uninitialized_fill(_ForwardIter __first,
_ForwardIter __last, _ForwardIter __last,
const _Tp& __x) const _Tp& __x)
{ {
__uninitialized_fill(__first, __last, __x, __VALUE_TYPE(__first)); __uninitialized_fill(__first, __last, __x, __value_type(__first));
} }
// Valid if copy construction is equivalent to assignment, and if the // Valid if copy construction is equivalent to assignment, and if the
...@@ -217,7 +217,7 @@ template <class _ForwardIter, class _Size, class _Tp> ...@@ -217,7 +217,7 @@ template <class _ForwardIter, class _Size, class _Tp>
inline _ForwardIter inline _ForwardIter
uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x) uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x)
{ {
return __uninitialized_fill_n(__first, __n, __x, __VALUE_TYPE(__first)); return __uninitialized_fill_n(__first, __n, __x, __value_type(__first));
} }
// Extensions: __uninitialized_copy_copy, __uninitialized_copy_fill, // Extensions: __uninitialized_copy_copy, __uninitialized_copy_fill,
......
...@@ -31,8 +31,9 @@ ...@@ -31,8 +31,9 @@
#ifndef __SGI_STL_INTERNAL_VECTOR_H #ifndef __SGI_STL_INTERNAL_VECTOR_H
#define __SGI_STL_INTERNAL_VECTOR_H #define __SGI_STL_INTERNAL_VECTOR_H
#include <bits/stl_iterator_base_funcs.h>
#include <bits/functexcept.h> #include <bits/functexcept.h>
#include <bits/concept_checks.h> #include <bits/concept_check.h>
namespace std namespace std
{ {
...@@ -116,9 +117,8 @@ struct _Vector_base ...@@ -116,9 +117,8 @@ struct _Vector_base
template <class _Tp, class _Alloc = allocator<_Tp> > template <class _Tp, class _Alloc = allocator<_Tp> >
class vector : protected _Vector_base<_Tp, _Alloc> class vector : protected _Vector_base<_Tp, _Alloc>
{ {
// requirements: // concept requirements
glibcpp_class_requires(_Tp, SGIAssignableConcept);
__STL_CLASS_REQUIRES(_Tp, _Assignable);
private: private:
typedef _Vector_base<_Tp, _Alloc> _Base; typedef _Vector_base<_Tp, _Alloc> _Base;
...@@ -223,7 +223,7 @@ public: ...@@ -223,7 +223,7 @@ public:
template <class _InputIterator> template <class _InputIterator>
void _M_initialize_aux(_InputIterator __first, _InputIterator __last, void _M_initialize_aux(_InputIterator __first, _InputIterator __last,
__false_type) { __false_type) {
_M_range_initialize(__first, __last, __ITERATOR_CATEGORY(__first)); _M_range_initialize(__first, __last, __iterator_category(__first));
} }
~vector() { destroy(_M_start, _M_finish); } ~vector() { destroy(_M_start, _M_finish); }
...@@ -261,7 +261,7 @@ public: ...@@ -261,7 +261,7 @@ public:
template <class _InputIter> template <class _InputIter>
void _M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type) void _M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type)
{ _M_assign_aux(__first, __last, __ITERATOR_CATEGORY(__first)); } { _M_assign_aux(__first, __last, __iterator_category(__first)); }
template <class _InputIterator> template <class _InputIterator>
void _M_assign_aux(_InputIterator __first, _InputIterator __last, void _M_assign_aux(_InputIterator __first, _InputIterator __last,
...@@ -334,7 +334,7 @@ public: ...@@ -334,7 +334,7 @@ public:
void _M_insert_dispatch(iterator __pos, void _M_insert_dispatch(iterator __pos,
_InputIterator __first, _InputIterator __last, _InputIterator __first, _InputIterator __last,
__false_type) { __false_type) {
_M_range_insert(__pos, __first, __last, __ITERATOR_CATEGORY(__first)); _M_range_insert(__pos, __first, __last, __iterator_category(__first));
} }
void insert (iterator __pos, size_type __n, const _Tp& __x) void insert (iterator __pos, size_type __n, const _Tp& __x)
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#define __SGI_STL_INTERNAL_HASH_MAP_H #define __SGI_STL_INTERNAL_HASH_MAP_H
#include <ext/stl_hashtable.h> #include <ext/stl_hashtable.h>
#include <bits/concept_check.h>
namespace std namespace std
{ {
...@@ -121,8 +122,6 @@ public: ...@@ -121,8 +122,6 @@ public:
friend bool operator== (const hash_map<_K1, _T1, _HF, _EqK, _Al>&, friend bool operator== (const hash_map<_K1, _T1, _HF, _EqK, _Al>&,
const hash_map<_K1, _T1, _HF, _EqK, _Al>&); const hash_map<_K1, _T1, _HF, _EqK, _Al>&);
#include <bits/concept_checks.h>
iterator begin() { return _M_ht.begin(); } iterator begin() { return _M_ht.begin(); }
iterator end() { return _M_ht.end(); } iterator end() { return _M_ht.end(); }
const_iterator begin() const { return _M_ht.begin(); } const_iterator begin() const { return _M_ht.begin(); }
...@@ -204,11 +203,11 @@ operator==(const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm1, ...@@ -204,11 +203,11 @@ operator==(const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm1,
template <class _Key, class _Tp, class _HashFcn, class _EqualKey, class _Alloc> template <class _Key, class _Tp, class _HashFcn, class _EqualKey, class _Alloc>
class hash_multimap class hash_multimap
{ {
// requirements: // concept requirements
__STL_CLASS_REQUIRES(_Key, _Assignable); glibcpp_class_requires(_Key, SGIAssignableConcept);
__STL_CLASS_REQUIRES(_Tp, _Assignable); glibcpp_class_requires(_Tp, SGIAssignableConcept);
__STL_CLASS_UNARY_FUNCTION_CHECK(_HashFcn, size_t, _Key); glibcpp_class_requires3(_HashFcn, size_t, _Key, UnaryFunctionConcept);
__STL_CLASS_BINARY_FUNCTION_CHECK(_EqualKey, bool, _Key, _Key); glibcpp_class_requires3(_EqualKey, _Key, _Key, BinaryPredicateConcept);
private: private:
typedef hashtable<pair<const _Key, _Tp>, _Key, _HashFcn, typedef hashtable<pair<const _Key, _Tp>, _Key, _HashFcn,
......
...@@ -32,8 +32,7 @@ ...@@ -32,8 +32,7 @@
#define __SGI_STL_INTERNAL_HASH_SET_H #define __SGI_STL_INTERNAL_HASH_SET_H
#include <ext/stl_hashtable.h> #include <ext/stl_hashtable.h>
#include <bits/concept_check.h>
#include <bits/concept_checks.h>
namespace std namespace std
{ {
...@@ -54,11 +53,10 @@ operator==(const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs1, ...@@ -54,11 +53,10 @@ operator==(const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs1,
template <class _Value, class _HashFcn, class _EqualKey, class _Alloc> template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
class hash_set class hash_set
{ {
// requirements: // concept requirements
glibcpp_class_requires(_Value, SGIAssignableConcept);
__STL_CLASS_REQUIRES(_Value, _Assignable); glibcpp_class_requires3(_HashFcn, size_t, _Value, UnaryFunctionConcept);
__STL_CLASS_UNARY_FUNCTION_CHECK(_HashFcn, size_t, _Value); glibcpp_class_requires3(_EqualKey, _Value, _Value, BinaryPredicateConcept);
__STL_CLASS_BINARY_FUNCTION_CHECK(_EqualKey, bool, _Value, _Value);
private: private:
typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>, typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
...@@ -206,11 +204,10 @@ operator==(const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1, ...@@ -206,11 +204,10 @@ operator==(const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1,
template <class _Value, class _HashFcn, class _EqualKey, class _Alloc> template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
class hash_multiset class hash_multiset
{ {
// requirements: // concept requirements
glibcpp_class_requires(_Value, SGIAssignableConcept);
__STL_CLASS_REQUIRES(_Value, _Assignable); glibcpp_class_requires3(_HashFcn, size_t, _Value, UnaryFunctionConcept);
__STL_CLASS_UNARY_FUNCTION_CHECK(_HashFcn, size_t, _Value); glibcpp_class_requires3(_EqualKey, _Value, _Value, BinaryPredicateConcept);
__STL_CLASS_BINARY_FUNCTION_CHECK(_EqualKey, bool, _Value, _Value);
private: private:
typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>, typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#ifndef __SGI_STL_INTERNAL_SLIST_H #ifndef __SGI_STL_INTERNAL_SLIST_H
#define __SGI_STL_INTERNAL_SLIST_H #define __SGI_STL_INTERNAL_SLIST_H
#include <bits/concept_checks.h> #include <bits/concept_check.h>
namespace std namespace std
{ {
...@@ -257,9 +257,8 @@ _Slist_base<_Tp,_Alloc>::_M_erase_after(_Slist_node_base* __before_first, ...@@ -257,9 +257,8 @@ _Slist_base<_Tp,_Alloc>::_M_erase_after(_Slist_node_base* __before_first,
template <class _Tp, class _Alloc = allocator<_Tp> > template <class _Tp, class _Alloc = allocator<_Tp> >
class slist : private _Slist_base<_Tp,_Alloc> class slist : private _Slist_base<_Tp,_Alloc>
{ {
// requirements: // concept requirements
glibcpp_class_requires(_Tp, SGIAssignableConcept);
__STL_CLASS_REQUIRES(_Tp, _Assignable);
private: private:
typedef _Slist_base<_Tp,_Alloc> _Base; typedef _Slist_base<_Tp,_Alloc> _Base;
......
...@@ -353,13 +353,13 @@ public: ...@@ -353,13 +353,13 @@ public:
template <class _InputIterator> template <class _InputIterator>
void insert_unique(_InputIterator __f, _InputIterator __l) void insert_unique(_InputIterator __f, _InputIterator __l)
{ {
insert_unique(__f, __l, __ITERATOR_CATEGORY(__f)); insert_unique(__f, __l, __iterator_category(__f));
} }
template <class _InputIterator> template <class _InputIterator>
void insert_equal(_InputIterator __f, _InputIterator __l) void insert_equal(_InputIterator __f, _InputIterator __l)
{ {
insert_equal(__f, __l, __ITERATOR_CATEGORY(__f)); insert_equal(__f, __l, __iterator_category(__f));
} }
template <class _InputIterator> template <class _InputIterator>
......
...@@ -111,7 +111,7 @@ xcompiling = @xcompiling@ ...@@ -111,7 +111,7 @@ xcompiling = @xcompiling@
AUTOMAKE_OPTIONS = 1.3 cygnus AUTOMAKE_OPTIONS = 1.3 cygnus
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
@GLIBCPP_BUILD_LIBIO_TRUE@noinst_LTLIBRARIES = libio.la @GLIBCPP_BUILD_LIBIO_TRUE@noinst_LTLIBRARIES = @GLIBCPP_BUILD_LIBIO_TRUE@libio.la
@GLIBCPP_BUILD_LIBIO_FALSE@noinst_LTLIBRARIES = @GLIBCPP_BUILD_LIBIO_FALSE@noinst_LTLIBRARIES =
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES # Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
...@@ -123,14 +123,21 @@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ ...@@ -123,14 +123,21 @@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBIO_INCLUDES = @LIBIO_INCLUDES@ LIBIO_INCLUDES = @LIBIO_INCLUDES@
CSHADOW_INCLUDES = @CSHADOW_INCLUDES@ CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
INCLUDES = -nostdinc++ -I$(top_builddir)/include -I$(GLIBCPP_INCLUDE_DIR) $(LIBIO_INCLUDES) $(TOPLEVEL_INCLUDES) INCLUDES = \
-nostdinc++ \
-I$(top_builddir)/include -I$(GLIBCPP_INCLUDE_DIR) \
$(LIBIO_INCLUDES) $(TOPLEVEL_INCLUDES)
libio_headers = libio.h libioP.h iolibio.h libio_headers = \
libio.h libioP.h iolibio.h
@GLIBCPP_NEED_LIBIO_TRUE@LIBIO_SRCS = filedoalloc.c genops.c fileops.c stdfiles.c c_codecvt.c iofclose.c iofopen.c @GLIBCPP_NEED_LIBIO_TRUE@LIBIO_SRCS = @GLIBCPP_NEED_LIBIO_TRUE@\
@GLIBCPP_NEED_LIBIO_TRUE@ filedoalloc.c genops.c fileops.c stdfiles.c c_codecvt.c \
@GLIBCPP_NEED_LIBIO_TRUE@ iofclose.c iofopen.c
@GLIBCPP_NEED_LIBIO_FALSE@LIBIO_SRCS = @GLIBCPP_NEED_LIBIO_FALSE@LIBIO_SRCS =
@GLIBCPP_NEED_WLIBIO_TRUE@LIBIO_WSRCS = wfiledoalloc.c wfileops.c wgenops.c iofwide.c @GLIBCPP_NEED_WLIBIO_TRUE@LIBIO_WSRCS = @GLIBCPP_NEED_WLIBIO_TRUE@\
@GLIBCPP_NEED_WLIBIO_TRUE@ wfiledoalloc.c wfileops.c wgenops.c iofwide.c
@GLIBCPP_NEED_WLIBIO_FALSE@LIBIO_WSRCS = @GLIBCPP_NEED_WLIBIO_FALSE@LIBIO_WSRCS =
EXTRA_DIST = iostreamP.h EXTRA_DIST = iostreamP.h
......
...@@ -114,18 +114,24 @@ mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs ...@@ -114,18 +114,24 @@ mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
noinst_LTLIBRARIES = libmath.la noinst_LTLIBRARIES = libmath.la
EXTRA_LONG_DOUBLE_yes = hypotl.c signbitl.c EXTRA_LONG_DOUBLE_yes = \
hypotl.c signbitl.c
EXTRA_DIST = hypot.c hypotf.c atan2f.c expf.c $(EXTRA_LONG_DOUBLE_yes) EXTRA_DIST = \
hypot.c hypotf.c atan2f.c expf.c \
$(EXTRA_LONG_DOUBLE_yes)
libmath_la_LIBADD = @LIBMATHOBJS@ $(EXTRA_LONG_DOUBLE_$(USE_COMPLEX_LONG_DOUBLE)) libmath_la_LIBADD = \
@LIBMATHOBJS@ \
$(EXTRA_LONG_DOUBLE_$(USE_COMPLEX_LONG_DOUBLE))
libmath_la_DEPENDENCIES = $(libmath_la_LIBADD) libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
libmath_la_SOURCES = signbit.c signbitf.c libmath_la_SOURCES = \
signbit.c signbitf.c
LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
...@@ -139,7 +145,9 @@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ ...@@ -139,7 +145,9 @@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBIO_INCLUDES = @LIBIO_INCLUDES@ LIBIO_INCLUDES = @LIBIO_INCLUDES@
CSHADOW_INCLUDES = @CSHADOW_INCLUDES@ CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
INCLUDES = -I$(GLIBCPP_INCLUDE_DIR) -I$(top_builddir)/include $(TOPLEVEL_INCLUDES) INCLUDES = \
-I$(GLIBCPP_INCLUDE_DIR) -I$(top_builddir)/include \
$(TOPLEVEL_INCLUDES)
CONFIG_HEADER = ../config.h CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
......
...@@ -129,11 +129,13 @@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@ ...@@ -129,11 +129,13 @@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
# These bits are all figured out from configure. Look in acinclude.m4 # These bits are all figured out from configure. Look in acinclude.m4
# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS # or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden. # NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
CONFIG_CXXFLAGS = @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@ CONFIG_CXXFLAGS = \
@EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@
# Warning flags to use. # Warning flags to use.
WARN_CXXFLAGS = @WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once WARN_CXXFLAGS = \
@WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES # Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
...@@ -145,13 +147,38 @@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ ...@@ -145,13 +147,38 @@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBIO_INCLUDES = @LIBIO_INCLUDES@ LIBIO_INCLUDES = @LIBIO_INCLUDES@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
INCLUDES = -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include -I$(GLIBCPP_INCLUDE_DIR) $(CSTD_INCLUDES) -I$(top_builddir)/include $(LIBSUPCXX_INCLUDES) INCLUDES = \
-I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include \
-I$(GLIBCPP_INCLUDE_DIR) $(CSTD_INCLUDES) -I$(top_builddir)/include \
headers = exception new typeinfo cxxabi.h exception_defines.h $(LIBSUPCXX_INCLUDES)
sources = del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_aux_runtime.cc eh_catch.cc eh_exception.cc eh_globals.cc eh_personality.cc eh_terminate.cc eh_throw.cc new_handler.cc new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc pure.cc tinfo.cc tinfo2.cc vec.cc headers = \
exception new typeinfo cxxabi.h exception_defines.h
sources = \
del_op.cc \
del_opnt.cc \
del_opv.cc \
del_opvnt.cc \
eh_alloc.cc \
eh_aux_runtime.cc \
eh_catch.cc \
eh_exception.cc \
eh_globals.cc \
eh_personality.cc \
eh_terminate.cc \
eh_throw.cc \
new_handler.cc \
new_op.cc \
new_opnt.cc \
new_opv.cc \
new_opvnt.cc \
pure.cc \
tinfo.cc \
tinfo2.cc \
vec.cc
libsupc___la_SOURCES = $(sources) libsupc___la_SOURCES = $(sources)
...@@ -167,7 +194,12 @@ LIBSUPCXX_CXXFLAGS = -prefer-pic ...@@ -167,7 +194,12 @@ LIBSUPCXX_CXXFLAGS = -prefer-pic
# set this option because CONFIG_CXXFLAGS has to be after # set this option because CONFIG_CXXFLAGS has to be after
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# as the occasion call for it. (ie, --enable-debug) # as the occasion call for it. (ie, --enable-debug)
AM_CXXFLAGS = -fno-implicit-templates $(LIBSUPCXX_CXXFLAGS) $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) AM_CXXFLAGS = \
-fno-implicit-templates \
$(LIBSUPCXX_CXXFLAGS) \
$(WARN_CXXFLAGS) \
$(OPTIMIZE_CXXFLAGS) \
$(CONFIG_CXXFLAGS)
# libstdc++ libtool notes # libstdc++ libtool notes
...@@ -191,7 +223,9 @@ AM_CXXFLAGS = -fno-implicit-templates $(LIBSUPCXX_CXXFLAGS) $(WARN_CXXFLAGS) ...@@ -191,7 +223,9 @@ AM_CXXFLAGS = -fno-implicit-templates $(LIBSUPCXX_CXXFLAGS) $(WARN_CXXFLAGS)
# #
# We have to put --tag disable-shared after --tag CXX lest things # We have to put --tag disable-shared after --tag CXX lest things
# CXX undo the affect of disable-shared. # CXX undo the affect of disable-shared.
LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared --mode=compile $(CXX) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
--mode=compile $(CXX) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
# 3) We'd have a problem when building the shared libstdc++ object if # 3) We'd have a problem when building the shared libstdc++ object if
...@@ -200,7 +234,9 @@ LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared --mode=c ...@@ -200,7 +234,9 @@ LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared --mode=c
# course is problematic at this point. So, we get the top-level # course is problematic at this point. So, we get the top-level
# directory to configure libstdc++-v3 to use gcc as the C++ # directory to configure libstdc++-v3 to use gcc as the C++
# compilation driver. # compilation driver.
CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared --mode=link $(CXX) @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@ CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared \
--mode=link $(CXX) \
@OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
CONFIG_HEADER = ../config.h CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA. ## USA.
## $Id: Makefile.am,v 1.79 2001/03/28 01:19:42 aoliva Exp $ ## $Id: Makefile.am,v 1.80 2001/03/31 20:15:43 bkoz Exp $
AUTOMAKE_OPTIONS = 1.3 gnits AUTOMAKE_OPTIONS = 1.3 gnits
MAINT_CHARSET = latin1 MAINT_CHARSET = latin1
...@@ -80,7 +80,8 @@ base_headers = \ ...@@ -80,7 +80,8 @@ base_headers = \
bits/streambuf.tcc bits/basic_file.h \ bits/streambuf.tcc bits/basic_file.h \
bits/locale_facets.h bits/locale_facets.tcc bits/localefwd.h \ bits/locale_facets.h bits/locale_facets.tcc bits/localefwd.h \
bits/stl_pthread_alloc.h bits/pthread_allocimpl.h \ bits/stl_pthread_alloc.h bits/pthread_allocimpl.h \
bits/stl_threads.h bits/stl_iterator_base.h \ bits/stl_threads.h \
bits/stl_iterator_base_types.h bits/stl_iterator_base_funcs.h \
bits/std_bitset.h bits/std_deque.h bits/std_functional.h \ bits/std_bitset.h bits/std_deque.h bits/std_functional.h \
bits/std_iterator.h bits/std_list.h \ bits/std_iterator.h bits/std_list.h \
bits/std_map.h bits/std_memory.h bits/std_numeric.h \ bits/std_map.h bits/std_memory.h bits/std_numeric.h \
...@@ -91,12 +92,11 @@ base_headers = \ ...@@ -91,12 +92,11 @@ base_headers = \
bits/stl_heap.h bits/stl_iterator.h bits/stl_list.h bits/stl_map.h \ bits/stl_heap.h bits/stl_iterator.h bits/stl_list.h bits/stl_map.h \
bits/stl_multimap.h bits/stl_multiset.h bits/stl_numeric.h \ bits/stl_multimap.h bits/stl_multiset.h bits/stl_numeric.h \
bits/stl_pair.h bits/stl_queue.h bits/stl_raw_storage_iter.h \ bits/stl_pair.h bits/stl_queue.h bits/stl_raw_storage_iter.h \
bits/stl_relops.h bits/stl_set.h \ bits/stl_relops.h bits/stl_set.h bits/stl_stack.h bits/stl_tempbuf.h \
bits/stl_stack.h bits/stl_tempbuf.h \
bits/stl_tree.h bits/stl_uninitialized.h bits/stl_vector.h \ bits/stl_tree.h bits/stl_uninitialized.h bits/stl_vector.h \
bits/stl_bvector.h bits/type_traits.h bits/std_algorithm.h \ bits/stl_bvector.h bits/type_traits.h bits/std_algorithm.h \
bits/concept_checks.h bits/container_concepts.h \ bits/stl_construct.h bits/boost_concept_check.h bits/concept_check.h
bits/sequence_concepts.h bits/stl_construct.h
backward_headers = \ backward_headers = \
backward/complex.h backward/iomanip.h backward/istream.h \ backward/complex.h backward/iomanip.h backward/istream.h \
...@@ -299,8 +299,12 @@ tmp-libstdc++.INC: Makefile ...@@ -299,8 +299,12 @@ tmp-libstdc++.INC: Makefile
# set this option because CONFIG_CXXFLAGS has to be after # set this option because CONFIG_CXXFLAGS has to be after
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# as the occasion call for it. (ie, --enable-debug) # as the occasion call for it. (ie, --enable-debug)
#
# The no-implicit-templates flag will generate unresolved references to
# the concept-checking symbols. So we must disable the checks while
# actually building the library.
AM_CXXFLAGS = \ AM_CXXFLAGS = \
-fno-implicit-templates \ -fno-implicit-templates -D_GLIBCPP_NO_CONCEPT_CHECKS \
$(LIBSUPCXX_CXXFLAGS) \ $(LIBSUPCXX_CXXFLAGS) \
$(WARN_CXXFLAGS) \ $(WARN_CXXFLAGS) \
$(OPTIMIZE_CXXFLAGS) \ $(OPTIMIZE_CXXFLAGS) \
......
...@@ -118,10 +118,14 @@ AUTOMAKE_OPTIONS = foreign dejagnu no-installinfo ...@@ -118,10 +118,14 @@ AUTOMAKE_OPTIONS = foreign dejagnu no-installinfo
DEJATOOL = libstdc++ DEJATOOL = libstdc++
EXPECT = `if [ -f $(top_builddir)/../expect/expect ] ; then echo $(top_builddir)/../expect/expect ; else echo expect ; fi` EXPECT = `if [ -f $(top_builddir)/../expect/expect ] ; then \
echo $(top_builddir)/../expect/expect ; \
else echo expect ; fi`
RUNTEST = `if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then echo $(top_srcdir)/../dejagnu/runtest ; else echo runtest; fi` RUNTEST = `if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \
echo $(top_srcdir)/../dejagnu/runtest ; \
else echo runtest; fi`
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ../config.h CONFIG_HEADER = ../config.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment