re PR libstdc++/3666 (Invalid concept-checking code.)

2001-11-01  Phil Edwards  <pme@gcc.gnu.org>

	* acinclude.m4:  Fix spacing.
	(GLIBCPP_ENABLE_CONCEPT_CHECKS):  New macro.
	* configure.in:  Call here.
	* acconfig.h:  Add _GLIBCPP_CONCEPT_CHECKS.
	* include/bits/boost_concept_check.h:  Fix headers.
	(__function_requires):  Make inline.
	* include/bits/c++config (_GLIBCPP_CONCEPT_CHECKS):  Remove.
	* aclocal.m4:  Regenerate.
	* config.h.in:  Regenerate.
	* configure:  Regenerate.

	Move trailing ';' inside macro, PR libstdc++/3666.
	* include/bits/concept_check.h:  Add semicolon.
	* include/bits/stl_algo.h:  Remove semicolon.
	* include/bits/stl_algobase.h:  Likewise.
	* include/bits/stl_deque.h:  Likewise.
	* include/bits/stl_heap.h:  Likewise.
	* include/bits/stl_iterator_base_funcs.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_vector.h:  Likewise.
	* include/ext/hash_map:  Likewise.
	* include/ext/hash_set:  Likewise.
	* include/ext/slist:  Likewise.

	* src/concept-inst.cc:  New file with explicit instantiations.
	* src/Makefile.am (sources):  Add here, with special build rules.
	* src/Makefile.in:  Regenerate.

From-SVN: r46697
This commit is contained in:
Phil Edwards 2001-11-01 15:46:48 +00:00
parent 93cacb72d0
commit 4d16bdbbf6
30 changed files with 1802 additions and 1704 deletions

View file

@ -1,3 +1,40 @@
2001-11-01 Phil Edwards <pme@gcc.gnu.org>
* acinclude.m4: Fix spacing.
(GLIBCPP_ENABLE_CONCEPT_CHECKS): New macro.
* configure.in: Call here.
* acconfig.h: Add _GLIBCPP_CONCEPT_CHECKS.
* include/bits/boost_concept_check.h: Fix headers.
(__function_requires): Make inline.
* include/bits/c++config (_GLIBCPP_CONCEPT_CHECKS): Remove.
* aclocal.m4: Regenerate.
* config.h.in: Regenerate.
* configure: Regenerate.
Move trailing ';' inside macro, PR libstdc++/3666.
* include/bits/concept_check.h: Add semicolon.
* include/bits/stl_algo.h: Remove semicolon.
* include/bits/stl_algobase.h: Likewise.
* include/bits/stl_deque.h: Likewise.
* include/bits/stl_heap.h: Likewise.
* include/bits/stl_iterator_base_funcs.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_vector.h: Likewise.
* include/ext/hash_map: Likewise.
* include/ext/hash_set: Likewise.
* include/ext/slist: Likewise.
* src/concept-inst.cc: New file with explicit instantiations.
* src/Makefile.am (sources): Add here, with special build rules.
* src/Makefile.in: Regenerate.
2001-11-01 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
* include/bits/std_complex.h (_Norm_helper): New class template.

View file

@ -34,6 +34,9 @@
// Define if using setrlimit to limit memory usage during 'make check'.
#undef _GLIBCPP_MEM_LIMITS
// Define to use concept checking code from the boost libraries.
#undef _GLIBCPP_CONCEPT_CHECKS
// Define if you have the atan2f function.
#undef _GLIBCPP_HAVE_ATAN2F

View file

@ -1922,3 +1922,32 @@ AC_DEFUN(AC_LC_MESSAGES, [
])
])
dnl
dnl Check for whether the Boost-derived checks should be turned on.
dnl
dnl GLIBCPP_ENABLE_CONCEPT_CHECKS
dnl --enable-concept-checks turns them on.
dnl --disable-concept-checks leaves them off.
dnl + Usage: GLIBCPP_ENABLE_CONCEPT_CHECKS[(DEFAULT)]
dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
dnl defaults to `no'.
AC_DEFUN(GLIBCPP_ENABLE_CONCEPT_CHECKS, [dnl
define([GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT], ifelse($1, yes, yes, no))dnl
AC_ARG_ENABLE(concept-checks,
changequote(<<, >>)dnl
<< --enable-concept-checks use Boost-derived template checks [default=>>GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT],
changequote([, ])dnl
[case "$enableval" in
yes) enable_concept_checks=yes ;;
no) enable_concept_checks=no ;;
*) AC_MSG_ERROR([Unknown argument to enable/disable concept checks]) ;;
esac],
enable_concept_checks=GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT)dnl
dnl Option parsed, now set things appropriately
if test x"$enable_concept_checks" = xyes; then
AC_DEFINE(_GLIBCPP_CONCEPT_CHECKS)
fi
])

View file

@ -1,6 +1,6 @@
dnl aclocal.m4 generated automatically by aclocal 1.4-p5
dnl aclocal.m4 generated automatically by aclocal 1.4
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@ -1935,30 +1935,41 @@ AC_DEFUN(AC_LC_MESSAGES, [
])
#serial 1
# This test replaces the one in autoconf.
# Currently this macro should have the same name as the autoconf macro
# because gettext's gettext.m4 (distributed in the automake package)
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
# give these diagnostics:
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
dnl
dnl Check for whether the Boost-derived checks should be turned on.
dnl
dnl GLIBCPP_ENABLE_CONCEPT_CHECKS
dnl --enable-concept-checks turns them on.
dnl --disable-concept-checks leaves them off.
dnl + Usage: GLIBCPP_ENABLE_CONCEPT_CHECKS[(DEFAULT)]
dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
dnl defaults to `no'.
AC_DEFUN(GLIBCPP_ENABLE_CONCEPT_CHECKS, [dnl
define([GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT], ifelse($1, yes, yes, no))dnl
AC_ARG_ENABLE(concept-checks,
changequote(<<, >>)dnl
<< --enable-concept-checks use Boost-derived template checks [default=>>GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT],
changequote([, ])dnl
[case "$enableval" in
yes) enable_concept_checks=yes ;;
no) enable_concept_checks=no ;;
*) AC_MSG_ERROR([Unknown argument to enable/disable concept checks]) ;;
esac],
enable_concept_checks=GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT)dnl
dnl Option parsed, now set things appropriately
if test x"$enable_concept_checks" = xyes; then
AC_DEFINE(_GLIBCPP_CONCEPT_CHECKS)
fi
])
undefine([AC_ISC_POSIX])
AC_DEFUN([AC_ISC_POSIX],
[
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
]
)
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
# serial 1
AC_DEFUN([AM_MAINTAINER_MODE],
AC_DEFUN(AM_MAINTAINER_MODE,
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode is disabled by default
AC_ARG_ENABLE(maintainer-mode,
@ -1975,7 +1986,7 @@ AC_DEFUN([AM_MAINTAINER_MODE],
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
AC_DEFUN(AM_CONDITIONAL,
[AC_SUBST($1_TRUE)
AC_SUBST($1_FALSE)
if $2; then
@ -1989,42 +2000,14 @@ fi])
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file can be copied and used freely without restrictions. It can
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 9
# serial 3
dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
dnl depending on --{enable,disable}-{shared,static} and on the presence of
dnl AM-DISABLE-SHARED). Otherwise, a static library
dnl $(top_builddir)/intl/libintl.a will be created.
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
dnl implementations (in libc or libintl) without the ngettext() function
dnl will be ignored.
dnl LIBDIR is used to find the intl libraries. If empty,
dnl the value `$(top_builddir)/intl/' is used.
dnl
dnl The result of the configuration is one of three cases:
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
dnl and used.
dnl Catalog format: GNU --> install in $(datadir)
dnl Catalog extension: .mo after installation, .gmo in source tree
dnl 2) GNU gettext has been found in the system's C library.
dnl Catalog format: GNU --> install in $(datadir)
dnl Catalog extension: .mo after installation, .gmo in source tree
dnl 3) No internationalization, always use English msgid.
dnl Catalog format: none
dnl Catalog extension: none
dnl The use of .gmo is historical (it was needed to avoid overwriting the
dnl GNU format catalogs when building on a platform with an X/Open gettext),
dnl but we keep it in order not to force irrelevant filename changes on the
dnl maintainers.
dnl
AC_DEFUN([AM_WITH_NLS],
AC_DEFUN(AM_WITH_NLS,
[AC_MSG_CHECKING([whether NLS is requested])
dnl Default is enabled NLS
AC_ARG_ENABLE(nls,
@ -2033,15 +2016,11 @@ AC_DEFUN([AM_WITH_NLS],
AC_MSG_RESULT($USE_NLS)
AC_SUBST(USE_NLS)
BUILD_INCLUDED_LIBINTL=no
USE_INCLUDED_LIBINTL=no
INTLLIBS=
dnl If we use NLS figure out what method
if test "$USE_NLS" = "yes"; then
AC_DEFINE(ENABLE_NLS, 1,
[Define to 1 if translation of program messages to the user's native language
is requested.])
AC_DEFINE(ENABLE_NLS)
AC_MSG_CHECKING([whether included gettext is requested])
AC_ARG_WITH(included-gettext,
[ --with-included-gettext use the GNU gettext library included here],
@ -2052,74 +2031,85 @@ AC_DEFUN([AM_WITH_NLS],
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
dnl User does not insist on using GNU NLS library. Figure out what
dnl to use. If GNU gettext is available we use this. Else we have
dnl to fall back to GNU NLS library.
dnl to use. If gettext or catgets are available (in this order) we
dnl use this. Else we have to fall back to GNU NLS library.
dnl catgets is only used if permitted by option --with-catgets.
nls_cv_header_intl=
nls_cv_header_libgt=
CATOBJEXT=NONE
dnl Add a version number to the cache macros.
define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
AC_CHECK_HEADER(libintl.h,
[AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
[AC_TRY_LINK([#include <libintl.h>
extern int _nl_msg_cat_cntr;],
[bindtextdomain ("", "");
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
gt_cv_func_gnugettext_libc=yes,
gt_cv_func_gnugettext_libc=no)])
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
AC_CACHE_CHECK([for GNU gettext in libintl],
gt_cv_func_gnugettext_libintl,
[gt_save_LIBS="$LIBS"
LIBS="$LIBS -lintl $LIBICONV"
AC_TRY_LINK([#include <libintl.h>
extern int _nl_msg_cat_cntr;],
[bindtextdomain ("", "");
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
gt_cv_func_gnugettext_libintl=yes,
gt_cv_func_gnugettext_libintl=no)
LIBS="$gt_save_LIBS"])
if test "$gt_cv_func_gettext_libc" != "yes"; then
AC_CHECK_LIB(intl, bindtextdomain,
[AC_CACHE_CHECK([for gettext in libintl],
gt_cv_func_gettext_libintl,
[AC_TRY_LINK([], [return (int) gettext ("")],
gt_cv_func_gettext_libintl=yes,
gt_cv_func_gettext_libintl=no)])])
fi
dnl If an already present or preinstalled GNU gettext() is found,
dnl use it. But if this macro is used in GNU gettext, and GNU
dnl gettext is already preinstalled in libintl, we update this
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
if test "$gt_cv_func_gnugettext_libc" = "yes" \
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
&& test "$PACKAGE" != gettext; }; then
AC_DEFINE(HAVE_GETTEXT, 1,
[Define if the GNU gettext() function is already present or preinstalled.])
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
dnl If iconv() is in a separate libiconv library, then anyone
dnl linking with libintl{.a,.so} also needs to link with
dnl libiconv.
INTLLIBS="-lintl $LIBICONV"
fi
gt_save_LIBS="$LIBS"
LIBS="$LIBS $INTLLIBS"
AC_CHECK_FUNCS(dcgettext)
LIBS="$gt_save_LIBS"
if test "$gt_cv_func_gettext_libc" = "yes" \
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
AC_DEFINE(HAVE_GETTEXT)
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
if test "$MSGFMT" != "no"; then
AC_CHECK_FUNCS(dcgettext)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
fi
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
CATOBJEXT=.gmo
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr],
[CATOBJEXT=.gmo
DATADIRNAME=share],
[CATOBJEXT=.mo
DATADIRNAME=lib])
INSTOBJEXT=.mo
fi
fi
])
if test "$CATOBJEXT" = "NONE"; then
dnl GNU gettext is not found in the C library.
AC_MSG_CHECKING([whether catgets can be used])
AC_ARG_WITH(catgets,
[ --with-catgets use catgets functions if available],
nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
AC_MSG_RESULT($nls_cv_use_catgets)
if test "$nls_cv_use_catgets" = "yes"; then
dnl No gettext in C library. Try catgets next.
AC_CHECK_LIB(i, main)
AC_CHECK_FUNC(catgets,
[AC_DEFINE(HAVE_CATGETS)
INTLOBJS="\$(CATOBJS)"
AC_PATH_PROG(GENCAT, gencat, no)dnl
if test "$GENCAT" != "no"; then
AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
if test "$GMSGFMT" = "no"; then
AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
fi
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.cat
INSTOBJEXT=.cat
DATADIRNAME=lib
INTLDEPS='$(top_builddir)/intl/libintl.a'
INTLLIBS=$INTLDEPS
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi])
fi
fi
if test "$CATOBJEXT" = "NONE"; then
dnl Neither gettext nor catgets in included in the C library.
dnl Fall back on GNU gettext library.
nls_cv_use_gnu_gettext=yes
fi
@ -2134,11 +2124,15 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_SUBST(MSGFMT)
BUILD_INCLUDED_LIBINTL=yes
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo
INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
INSTOBJEXT=.mo
DATADIRNAME=share
INTLDEPS='$(top_builddir)/intl/libintl.a'
INTLLIBS=$INTLDEPS
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi
dnl Test whether we really found GNU xgettext.
@ -2149,78 +2143,24 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
: ;
else
AC_MSG_RESULT(
[found xgettext program is not GNU xgettext; ignore it])
[found xgettext programs is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
fi
dnl We need to process the po/ directory.
# We need to process the po/ directory.
POSUB=po
fi
AC_OUTPUT_COMMANDS(
[for ac_file in $CONFIG_FILES; do
# Support "outfile[:infile[:infile...]]"
case "$ac_file" in
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
esac
# PO directories have a Makefile.in generated from Makefile.in.in.
case "$ac_file" in */Makefile.in)
# Adjust a relative srcdir.
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
case "$ac_given_srcdir" in
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
/*) top_srcdir="$ac_given_srcdir" ;;
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
rm -f "$ac_dir/POTFILES"
echo creating "$ac_dir/POTFILES"
sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
echo creating "$ac_dir/Makefile"
sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
fi
;;
esac
done])
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
dnl to 'yes' because some of the testsuite requires it.
if test "$PACKAGE" = gettext; then
BUILD_INCLUDED_LIBINTL=yes
fi
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
dnl because plural.y uses bison specific features. It requires at least
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
dnl compile.
dnl bison is only needed for the maintainer (who touches plural.y). But in
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
dnl the rule in general Makefile. Now, some people carelessly touch the
dnl files or have a broken "make" program, hence the plural.c rule will
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
dnl present or too old.
AC_CHECK_PROGS([INTLBISON], [bison])
if test -z "$INTLBISON"; then
ac_verc_fail=yes
else
dnl Found it, now check the version.
AC_MSG_CHECKING([version of bison])
changequote(<<,>>)dnl
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison .* \([0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
changequote([,])dnl
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
esac
AC_MSG_RESULT([$ac_prog_version])
DATADIRNAME=share
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi
if test $ac_verc_fail = yes; then
INTLBISON=:
# If this is used in GNU gettext we have to set USE_NLS to `yes'
# because some of the sources are only built for this goal.
if test "$PACKAGE" = gettext; then
USE_NLS=yes
USE_INCLUDED_LIBINTL=yes
fi
dnl These rules are solely for the distribution goal. While doing this
@ -2232,38 +2172,22 @@ changequote([,])dnl
done
dnl Make all variables we use known to autoconf.
AC_SUBST(BUILD_INCLUDED_LIBINTL)
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(CATALOGS)
AC_SUBST(CATOBJEXT)
AC_SUBST(DATADIRNAME)
AC_SUBST(GMOFILES)
AC_SUBST(INSTOBJEXT)
AC_SUBST(INTLDEPS)
AC_SUBST(INTLLIBS)
AC_SUBST(INTLOBJS)
AC_SUBST(POFILES)
AC_SUBST(POSUB)
dnl For backward compatibility. Some configure.ins may be using this.
nls_cv_header_intl=
nls_cv_header_libgt=
dnl For backward compatibility. Some Makefiles may be using this.
DATADIRNAME=share
AC_SUBST(DATADIRNAME)
dnl For backward compatibility. Some Makefiles may be using this.
INSTOBJEXT=.mo
AC_SUBST(INSTOBJEXT)
dnl For backward compatibility. Some Makefiles may be using this.
GENCAT=gencat
AC_SUBST(GENCAT)
])
dnl Usage: Just like AM_WITH_NLS, which see.
AC_DEFUN([AM_GNU_GETTEXT],
AC_DEFUN(AM_GNU_GETTEXT,
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_ISC_POSIX])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
@ -2273,18 +2197,21 @@ AC_DEFUN([AM_GNU_GETTEXT],
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_FUNC_MMAP])dnl
AC_REQUIRE([jm_GLIBC21])dnl
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
stdlib.h string.h unistd.h sys/param.h])
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
unistd.h values.h sys/param.h])
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
__argz_count __argz_stringify __argz_next])
if test "${ac_cv_func_stpcpy+set}" != "set"; then
AC_CHECK_FUNCS(stpcpy)
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
AC_DEFINE(HAVE_STPCPY)
fi
AM_ICONV
AM_LANGINFO_CODESET
AM_LC_MESSAGES
AM_WITH_NLS([$1],[$2],[$3])
AM_WITH_NLS
if test "x$CATOBJEXT" != "x"; then
if test "x$ALL_LINGUAS" = "x"; then
@ -2292,22 +2219,11 @@ strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
for presentlang in $ALL_LINGUAS; do
useit=no
for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
# Use the presentlang catalog if desiredlang is
# a. equal to presentlang, or
# b. a variant of presentlang (because in this case,
# presentlang can be used as a fallback for messages
# which are not translated in the desiredlang catalog).
case "$desiredlang" in
"$presentlang"*) useit=yes;;
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
esac
done
if test $useit = yes; then
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
fi
done
LINGUAS=$NEW_LINGUAS
AC_MSG_RESULT($LINGUAS)
fi
@ -2318,8 +2234,47 @@ strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
fi
fi
dnl The reference to <locale.h> in the installed <libintl.h> file
dnl must be resolved because we cannot expect the users of this
dnl to define HAVE_LOCALE_H.
if test $ac_cv_header_locale_h = yes; then
INCLUDE_LOCALE_H="#include <locale.h>"
else
INCLUDE_LOCALE_H="\
/* The system does not provide the header <locale.h>. Take care yourself. */"
fi
AC_SUBST(INCLUDE_LOCALE_H)
dnl Determine which catalog format we have (if any is needed)
dnl For now we know about two different formats:
dnl Linux libc-5 and the normal X/Open format
test -d intl || mkdir intl
if test "$CATOBJEXT" = ".cat"; then
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
dnl Transform the SED scripts while copying because some dumb SEDs
dnl cannot handle comments.
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
fi
dnl po2tbl.sed is always needed.
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
dnl In the intl/Makefile.in we have a special dependency which makes
dnl only sense for gettext. We comment this out for non-gettext
dnl packages.
if test "$PACKAGE" = "gettext"; then
GT_NO="#NO#"
GT_YES=
else
GT_NO=
GT_YES="#YES#"
fi
AC_SUBST(GT_NO)
AC_SUBST(GT_YES)
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
dnl Try to locate is.
MKINSTALLDIRS=
if test -n "$ac_aux_dir"; then
@ -2330,15 +2285,31 @@ strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
fi
AC_SUBST(MKINSTALLDIRS)
dnl Enable libtool support if the surrounding package wishes it.
INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
dnl *** For now the libtool support in intl/Makefile is not for real.
l=
AC_SUBST(l)
dnl Generate list of files to be processed by xgettext which will
dnl be included in po/Makefile.
test -d po || mkdir po
if test "x$srcdir" != "x."; then
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
posrcprefix="$srcdir/"
else
posrcprefix="../$srcdir/"
fi
else
posrcprefix="../"
fi
rm -f po/POTFILES
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
])
# Search path for a program which passes the given test.
# Ulrich Drepper <drepper@cygnus.com>, 1996.
#
# This file can be copied and used freely without restrictions. It can
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
@ -2347,7 +2318,7 @@ strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
AC_DEFUN(AM_PATH_PROG_WITH_TEST,
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
@ -2383,139 +2354,24 @@ fi
AC_SUBST($1)dnl
])
#serial 2
# Test for the GNU C Library, version 2.1 or newer.
# From Bruno Haible.
AC_DEFUN([jm_GLIBC21],
[
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
ac_cv_gnu_library_2_1,
[AC_EGREP_CPP([Lucky GNU user],
[
#include <features.h>
#ifdef __GNU_LIBRARY__
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
Lucky GNU user
#endif
#endif
],
ac_cv_gnu_library_2_1=yes,
ac_cv_gnu_library_2_1=no)
]
)
AC_SUBST(GLIBC21)
GLIBC21="$ac_cv_gnu_library_2_1"
]
)
#serial AM2
dnl From Bruno Haible.
AC_DEFUN([AM_ICONV],
[
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
dnl those with the standalone portable GNU libiconv installed).
AC_ARG_WITH([libiconv-prefix],
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
for dir in `echo "$withval" | tr : ' '`; do
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
done
])
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
am_cv_func_iconv=yes)
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
am_cv_lib_iconv=yes
am_cv_func_iconv=yes)
LIBS="$am_save_LIBS"
fi
])
if test "$am_cv_func_iconv" = yes; then
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
AC_MSG_CHECKING([for iconv declaration])
AC_CACHE_VAL(am_cv_proto_iconv, [
AC_TRY_COMPILE([
#include <stdlib.h>
#include <iconv.h>
extern
#ifdef __cplusplus
"C"
#endif
#if defined(__STDC__) || defined(__cplusplus)
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#else
size_t iconv();
#endif
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
AC_MSG_RESULT([$]{ac_t:-
}[$]am_cv_proto_iconv)
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
[Define as const if the declaration of iconv() needs const.])
fi
LIBICONV=
if test "$am_cv_lib_iconv" = yes; then
LIBICONV="-liconv"
fi
AC_SUBST(LIBICONV)
])
#serial AM1
dnl From Bruno Haible.
AC_DEFUN([AM_LANGINFO_CODESET],
[
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
[AC_TRY_LINK([#include <langinfo.h>],
[char* cs = nl_langinfo(CODESET);],
am_cv_langinfo_codeset=yes,
am_cv_langinfo_codeset=no)
])
if test $am_cv_langinfo_codeset = yes; then
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
fi
])
# Check whether LC_MESSAGES is available in <locale.h>.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file can be copied and used freely without restrictions. It can
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 2
# serial 1
AC_DEFUN([AM_LC_MESSAGES],
AC_DEFUN(AM_LC_MESSAGES,
[if test $ac_cv_header_locale_h = yes; then
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
if test $am_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES, 1,
[Define if your <locale.h> file defines LC_MESSAGES.])
[Define if your locale.h file contains LC_MESSAGES.])
fi
fi])
@ -2528,7 +2384,7 @@ AC_DEFUN([AM_LC_MESSAGES],
dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN([AM_INIT_AUTOMAKE],
AC_DEFUN(AM_INIT_AUTOMAKE,
[AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
@ -2556,7 +2412,7 @@ AC_REQUIRE([AC_PROG_MAKE_SET])])
# Check to make sure that the build environment is sane.
#
AC_DEFUN([AM_SANITY_CHECK],
AC_DEFUN(AM_SANITY_CHECK,
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
@ -2597,7 +2453,7 @@ AC_MSG_RESULT(yes)])
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
dnl The program must properly implement --version.
AC_DEFUN([AM_MISSING_PROG],
AC_DEFUN(AM_MISSING_PROG,
[AC_MSG_CHECKING(for working $2)
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
@ -2613,7 +2469,7 @@ AC_SUBST($1)])
# Like AC_CONFIG_HEADER, but automatically create stamp file.
AC_DEFUN([AM_CONFIG_HEADER],
AC_DEFUN(AM_CONFIG_HEADER,
[AC_PREREQ([2.12])
AC_CONFIG_HEADER([$1])
dnl When config.status generates a header, we must update the stamp-h file.

View file

@ -3,6 +3,9 @@
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
// Define if GCC supports weak symbols
#undef _GLIBCPP_SUPPORTS_WEAK
@ -24,6 +27,9 @@
// Define if using setrlimit to limit memory usage during 'make check'.
#undef _GLIBCPP_MEM_LIMITS
// Define to use concept checking code from the boost libraries.
#undef _GLIBCPP_CONCEPT_CHECKS
// Define if mbstate_t exists in wchar.h.
#undef HAVE_MBSTATE_T
@ -690,9 +696,6 @@
/* Define if you have the <nan.h> header file. */
#undef HAVE_NAN_H
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if you have the <sys/isa_defs.h> header file. */
#undef HAVE_SYS_ISA_DEFS_H
@ -702,9 +705,6 @@
/* Define if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H
/* Define if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H

1924
libstdc++-v3/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -48,6 +48,7 @@ GLIBCPP_ENABLE_CHEADERS([c_std])
GLIBCPP_ENABLE_THREADS
GLIBCPP_ENABLE_CXX_FLAGS([none])
GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
GLIBCPP_ENABLE_CONCEPT_CHECKS
if test -n "$with_cross_host" || test x"$build" != x"$host"; then

View file

@ -11,6 +11,7 @@
#define _GLIBCPP_BOOST_CONCEPT_CHECK 1
#pragma GCC system_header
#include <bits/std_cstddef.h> // for ptrdiff_t, used next
#include <bits/stl_iterator_base_types.h> // for traits and tags
#include <utility> // for pair<>
@ -20,8 +21,11 @@ namespace __gnu_cxx
#define _IsUnused __attribute__ ((__unused__))
// When the C-C code is in use, we would like this function to do as little
// as possible at runtime, use as few resources as possible, and hopefully
// be elided out of existence... hmmm.
template <class _Concept>
void __function_requires()
inline void __function_requires()
{
void (_Concept::*__x)() _IsUnused = &_Concept::__constraints;
}

View file

@ -55,9 +55,6 @@
// Use corrected code from the committee library group's issues list.
#define _GLIBCPP_RESOLVE_LIB_DEFECTS 1
// Enable concept checking code from the boost libraries.
//#define _GLIBCPP_CONCEPT_CHECKS 1
// Define this to permit user-level control of the expansion of string
// buffers (via a fn pointer), see basic_string.* for more.
//#define _GLIBCPP_ALLOC_CONTROL

View file

@ -66,15 +66,15 @@
// a valid instantiation pattern. Thus, we steal a feature from C99.
#define __glibcpp_function_requires(...) \
__gnu_cxx::__function_requires< __gnu_cxx::__VA_ARGS__ >()
__gnu_cxx::__function_requires< __gnu_cxx::__VA_ARGS__ >();
#define __glibcpp_class_requires(_a,_C) \
_GLIBCPP_CLASS_REQUIRES(_a, __gnu_cxx, _C)
_GLIBCPP_CLASS_REQUIRES(_a, __gnu_cxx, _C);
#define __glibcpp_class_requires2(_a,_b,_C) \
_GLIBCPP_CLASS_REQUIRES2(_a, _b, __gnu_cxx, _C)
_GLIBCPP_CLASS_REQUIRES2(_a, _b, __gnu_cxx, _C);
#define __glibcpp_class_requires3(_a,_b,_c,_C) \
_GLIBCPP_CLASS_REQUIRES3(_a, _b, _c, __gnu_cxx, _C)
_GLIBCPP_CLASS_REQUIRES3(_a, _b, _c, __gnu_cxx, _C);
#define __glibcpp_class_requires4(_a,_b,_c,_d,_C) \
_GLIBCPP_CLASS_REQUIRES4(_a, _b, _c, _d, __gnu_cxx, _C)
_GLIBCPP_CLASS_REQUIRES4(_a, _b, _c, _d, __gnu_cxx, _C);
#endif // enable/disable

File diff suppressed because it is too large Load diff

View file

@ -89,10 +89,10 @@ namespace std
typedef typename iterator_traits<_ForwardIter2>::value_type _ValueType2;
// concept requirements
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter1>);
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter2>);
__glibcpp_function_requires(_ConvertibleConcept<_ValueType1, _ValueType2>);
__glibcpp_function_requires(_ConvertibleConcept<_ValueType2, _ValueType1>);
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter1>)
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter2>)
__glibcpp_function_requires(_ConvertibleConcept<_ValueType1, _ValueType2>)
__glibcpp_function_requires(_ConvertibleConcept<_ValueType2, _ValueType1>)
_ValueType1 __tmp = *__a;
*__a = *__b;
@ -104,7 +104,7 @@ namespace std
swap(_Tp& __a, _Tp& __b)
{
// concept requirements
__glibcpp_function_requires(_SGIAssignableConcept<_Tp>);
__glibcpp_function_requires(_SGIAssignableConcept<_Tp>)
_Tp __tmp = __a;
__a = __b;
@ -122,7 +122,7 @@ namespace std
min(const _Tp& __a, const _Tp& __b)
{
// concept requirements
__glibcpp_function_requires(_LessThanComparableConcept<_Tp>);
__glibcpp_function_requires(_LessThanComparableConcept<_Tp>)
//return __b < __a ? __b : __a;
if (__b < __a) return __b; return __a;
}
@ -132,7 +132,7 @@ namespace std
max(const _Tp& __a, const _Tp& __b)
{
// concept requirements
__glibcpp_function_requires(_LessThanComparableConcept<_Tp>);
__glibcpp_function_requires(_LessThanComparableConcept<_Tp>)
//return __a < __b ? __b : __a;
if (__a < __b) return __b; return __a;
}
@ -272,9 +272,9 @@ namespace std
copy(_InputIter __first, _InputIter __last, _OutputIter __result)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
typename iterator_traits<_InputIter>::value_type>);
typename iterator_traits<_InputIter>::value_type>)
typedef typename _Is_normal_iterator<_InputIter>::_Normal __Normal;
return __copy_ni1(__first, __last, __result, __Normal());
@ -396,11 +396,11 @@ namespace std
copy_backward(_BI1 __first, _BI1 __last, _BI2 __result)
{
// concept requirements
__glibcpp_function_requires(_BidirectionalIteratorConcept<_BI1>);
__glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>);
__glibcpp_function_requires(_BidirectionalIteratorConcept<_BI1>)
__glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>)
__glibcpp_function_requires(_ConvertibleConcept<
typename iterator_traits<_BI1>::value_type,
typename iterator_traits<_BI2>::value_type>);
typename iterator_traits<_BI2>::value_type>)
typedef typename _Is_normal_iterator<_BI1>::_Normal __Normal;
return __copy_backward_input_normal_iterator(__first, __last, __result,
@ -439,9 +439,9 @@ namespace std
copy_n(_InputIter __first, _Size __count, _OutputIter __result)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
typename iterator_traits<_InputIter>::value_type>);
typename iterator_traits<_InputIter>::value_type>)
return __copy_n(__first, __count, __result, __iterator_category(__first));
}
@ -455,7 +455,7 @@ namespace std
fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __value)
{
// concept requirements
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>);
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
for ( ; __first != __last; ++__first)
*__first = __value;
@ -466,7 +466,7 @@ namespace std
fill_n(_OutputIter __first, _Size __n, const _Tp& __value)
{
// concept requirements
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,_Tp>);
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,_Tp>)
for ( ; __n > 0; --__n, ++__first)
*__first = __value;
@ -530,12 +530,12 @@ namespace std
_InputIter2 __first2)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
__glibcpp_function_requires(_EqualityComparableConcept<
typename iterator_traits<_InputIter1>::value_type>);
typename iterator_traits<_InputIter1>::value_type>)
__glibcpp_function_requires(_EqualityComparableConcept<
typename iterator_traits<_InputIter2>::value_type>);
typename iterator_traits<_InputIter2>::value_type>)
while (__first1 != __last1 && *__first1 == *__first2) {
++__first1;
@ -551,8 +551,8 @@ namespace std
_BinaryPredicate __binary_pred)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) {
++__first1;
@ -567,11 +567,11 @@ namespace std
_InputIter2 __first2)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
__glibcpp_function_requires(_EqualOpConcept<
typename iterator_traits<_InputIter1>::value_type,
typename iterator_traits<_InputIter2>::value_type>);
typename iterator_traits<_InputIter2>::value_type>)
for ( ; __first1 != __last1; ++__first1, ++__first2)
if (!(*__first1 == *__first2))
@ -586,8 +586,8 @@ namespace std
_BinaryPredicate __binary_pred)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
for ( ; __first1 != __last1; ++__first1, ++__first2)
if (!__binary_pred(*__first1, *__first2))
@ -605,12 +605,12 @@ namespace std
_InputIter2 __first2, _InputIter2 __last2)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
__glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_InputIter1>::value_type>);
typename iterator_traits<_InputIter1>::value_type>)
__glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_InputIter2>::value_type>);
typename iterator_traits<_InputIter2>::value_type>)
for ( ; __first1 != __last1 && __first2 != __last2
; ++__first1, ++__first2) {
@ -629,8 +629,8 @@ namespace std
_Compare __comp)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
for ( ; __first1 != __last1 && __first2 != __last2
; ++__first1, ++__first2) {
@ -727,12 +727,12 @@ namespace std
_InputIter2 __first2, _InputIter2 __last2)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
__glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_InputIter1>::value_type>);
typename iterator_traits<_InputIter1>::value_type>)
__glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_InputIter2>::value_type>);
typename iterator_traits<_InputIter2>::value_type>)
return __lexicographical_compare_3way(__first1, __last1, __first2, __last2);
}

View file

@ -394,7 +394,7 @@ template <class _Tp, class _Alloc = allocator<_Tp> >
class deque : protected _Deque_base<_Tp, _Alloc> {
// concept requirements
__glibcpp_class_requires(_Tp, _SGIAssignableConcept);
__glibcpp_class_requires(_Tp, _SGIAssignableConcept)
typedef _Deque_base<_Tp, _Alloc> _Base;
public: // Basic types

View file

@ -89,8 +89,8 @@ namespace std
// concept requirements
__glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>);
__glibcpp_function_requires(_LessThanComparableConcept<_ValueType>);
_RandomAccessIterator>)
__glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
__push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0),
_ValueType(*(__last - 1)));
@ -123,7 +123,7 @@ namespace std
// concept requirements
__glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>);
_RandomAccessIterator>)
__push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0),
_ValueType(*(__last - 1)), __comp);
@ -168,8 +168,8 @@ namespace std
// concept requirements
__glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>);
__glibcpp_function_requires(_LessThanComparableConcept<_ValueType>);
_RandomAccessIterator>)
__glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
__pop_heap(__first, __last - 1, __last - 1, _ValueType(*(__last - 1)));
}
@ -214,7 +214,7 @@ namespace std
{
// concept requirements
__glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>);
_RandomAccessIterator>)
typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType;
__pop_heap(__first, __last - 1, __last - 1, _ValueType(*(__last - 1)), __comp);
@ -231,8 +231,8 @@ namespace std
// concept requirements
__glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>);
__glibcpp_function_requires(_LessThanComparableConcept<_ValueType>);
_RandomAccessIterator>)
__glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
if (__last - __first < 2) return;
_DistanceType __len = __last - __first;
@ -257,7 +257,7 @@ namespace std
// concept requirements
__glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>);
_RandomAccessIterator>)
if (__last - __first < 2) return;
_DistanceType __len = __last - __first;
@ -277,9 +277,9 @@ namespace std
{
// concept requirements
__glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>);
_RandomAccessIterator>)
__glibcpp_function_requires(_LessThanComparableConcept<
typename iterator_traits<_RandomAccessIterator>::value_type>);
typename iterator_traits<_RandomAccessIterator>::value_type>)
while (__last - __first > 1)
pop_heap(__first, __last--);
@ -292,7 +292,7 @@ namespace std
{
// concept requirements
__glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>);
_RandomAccessIterator>)
while (__last - __first > 1)
pop_heap(__first, __last--, __comp);

View file

@ -81,7 +81,7 @@ namespace std
_Distance& __n, input_iterator_tag)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
while (__first != __last) { ++__first; ++__n; }
}
@ -91,7 +91,7 @@ namespace std
_Distance& __n, random_access_iterator_tag)
{
// concept requirements
__glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>);
__glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
__n += __last - __first;
}
@ -109,7 +109,7 @@ namespace std
__distance(_InputIterator __first, _InputIterator __last, input_iterator_tag)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
typename iterator_traits<_InputIterator>::difference_type __n = 0;
while (__first != __last) {
++__first; ++__n;
@ -123,7 +123,7 @@ namespace std
random_access_iterator_tag)
{
// concept requirements
__glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>);
__glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
return __last - __first;
}
@ -140,7 +140,7 @@ namespace std
__advance(_InputIter& __i, _Distance __n, input_iterator_tag)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
while (__n--) ++__i;
}
@ -149,7 +149,7 @@ namespace std
__advance(_BidirectionalIterator& __i, _Distance __n, bidirectional_iterator_tag)
{
// concept requirements
__glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIterator>);
__glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIterator>)
if (__n > 0)
while (__n--) ++__i;
else
@ -161,7 +161,7 @@ namespace std
__advance(_RandomAccessIterator& __i, _Distance __n, random_access_iterator_tag)
{
// concept requirements
__glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>);
__glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
__i += __n;
}

View file

@ -230,7 +230,7 @@ template <class _Tp, class _Alloc = allocator<_Tp> >
class list : protected _List_base<_Tp, _Alloc>
{
// concept requirements
__glibcpp_class_requires(_Tp, _SGIAssignableConcept);
__glibcpp_class_requires(_Tp, _SGIAssignableConcept)
typedef _List_base<_Tp, _Alloc> _Base;
protected:

View file

@ -70,7 +70,7 @@ template <class _Key, class _Tp, class _Compare = less<_Key>,
class map
{
// concept requirements
__glibcpp_class_requires(_Tp, _SGIAssignableConcept);
__glibcpp_class_requires(_Tp, _SGIAssignableConcept)
__glibcpp_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept);
public:

View file

@ -84,7 +84,7 @@ template <class _Key, class _Tp, class _Compare, class _Alloc>
class multimap
{
// concept requirements
__glibcpp_class_requires(_Tp, _SGIAssignableConcept);
__glibcpp_class_requires(_Tp, _SGIAssignableConcept)
__glibcpp_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept);
public:

View file

@ -83,7 +83,7 @@ template <class _Key, class _Compare, class _Alloc>
class multiset
{
// concept requirements
__glibcpp_class_requires(_Key, _SGIAssignableConcept);
__glibcpp_class_requires(_Key, _SGIAssignableConcept)
__glibcpp_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept);
public:

View file

@ -69,7 +69,7 @@ namespace std
accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
for ( ; __first != __last; ++__first)
__init = __init + *__first;
@ -82,7 +82,7 @@ namespace std
_BinaryOperation __binary_op)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
for ( ; __first != __last; ++__first)
__init = __binary_op(__init, *__first);
@ -95,8 +95,8 @@ namespace std
_InputIterator2 __first2, _Tp __init)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
for ( ; __first1 != __last1; ++__first1, ++__first2)
__init = __init + (*__first1 * *__first2);
@ -112,8 +112,8 @@ namespace std
_BinaryOperation2 __binary_op2)
{
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
for ( ; __first1 != __last1; ++__first1, ++__first2)
__init = __binary_op1(__init, __binary_op2(*__first1, *__first2));
@ -128,8 +128,8 @@ namespace std
typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>);
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>)
if (__first == __last) return __result;
*__result = *__first;
@ -149,8 +149,8 @@ namespace std
typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>);
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>)
if (__first == __last) return __result;
*__result = *__first;
@ -170,8 +170,8 @@ namespace std
typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>);
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>)
if (__first == __last) return __result;
*__result = *__first;
@ -192,8 +192,8 @@ namespace std
typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
// concept requirements
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>);
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>);
__glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>)
if (__first == __last) return __result;
*__result = *__first;
@ -259,9 +259,9 @@ namespace std
iota(_ForwardIter __first, _ForwardIter __last, _Tp __value)
{
// concept requirements
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>);
__glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
__glibcpp_function_requires(_ConvertibleConcept<_Tp,
typename iterator_traits<_ForwardIter>::value_type>);
typename iterator_traits<_ForwardIter>::value_type>)
while (__first != __last)
*__first++ = __value++;

View file

@ -82,9 +82,9 @@ template <class _Tp, class _Sequence>
class queue
{
// concept requirements
__glibcpp_class_requires(_Tp, _SGIAssignableConcept);
__glibcpp_class_requires(_Sequence, _FrontInsertionSequenceConcept);
__glibcpp_class_requires(_Sequence, _BackInsertionSequenceConcept);
__glibcpp_class_requires(_Tp, _SGIAssignableConcept)
__glibcpp_class_requires(_Sequence, _FrontInsertionSequenceConcept)
__glibcpp_class_requires(_Sequence, _BackInsertionSequenceConcept)
typedef typename _Sequence::value_type _Sequence_value_type;
__glibcpp_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept);
@ -164,9 +164,9 @@ template <class _Tp,
class priority_queue
{
// concept requirements
__glibcpp_class_requires(_Tp, _SGIAssignableConcept);
__glibcpp_class_requires(_Sequence, _SequenceConcept);
__glibcpp_class_requires(_Sequence, _RandomAccessContainerConcept);
__glibcpp_class_requires(_Tp, _SGIAssignableConcept)
__glibcpp_class_requires(_Sequence, _SequenceConcept)
__glibcpp_class_requires(_Sequence, _RandomAccessContainerConcept)
typedef typename _Sequence::value_type _Sequence_value_type;
__glibcpp_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept);
__glibcpp_class_requires4(_Compare, bool, _Tp, _Tp, _BinaryFunctionConcept);

View file

@ -84,7 +84,7 @@ template <class _Key, class _Compare, class _Alloc>
class set
{
// concept requirements
__glibcpp_class_requires(_Key, _SGIAssignableConcept);
__glibcpp_class_requires(_Key, _SGIAssignableConcept)
__glibcpp_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept);
public:

View file

@ -82,8 +82,8 @@ template <class _Tp, class _Sequence>
class stack
{
// concept requirements
__glibcpp_class_requires(_Tp, _SGIAssignableConcept);
__glibcpp_class_requires(_Sequence, _BackInsertionSequenceConcept);
__glibcpp_class_requires(_Tp, _SGIAssignableConcept)
__glibcpp_class_requires(_Sequence, _BackInsertionSequenceConcept)
typedef typename _Sequence::value_type _Sequence_value_type;
__glibcpp_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept);

View file

@ -147,7 +147,7 @@ template <class _Tp, class _Alloc = allocator<_Tp> >
class vector : protected _Vector_base<_Tp, _Alloc>
{
// concept requirements
__glibcpp_class_requires(_Tp, _SGIAssignableConcept);
__glibcpp_class_requires(_Tp, _SGIAssignableConcept)
private:
typedef _Vector_base<_Tp, _Alloc> _Base;

View file

@ -233,8 +233,8 @@ template <class _Key, class _Tp, class _HashFcn, class _EqualKey, class _Alloc>
class hash_multimap
{
// concept requirements
__glibcpp_class_requires(_Key, _SGIAssignableConcept);
__glibcpp_class_requires(_Tp, _SGIAssignableConcept);
__glibcpp_class_requires(_Key, _SGIAssignableConcept)
__glibcpp_class_requires(_Tp, _SGIAssignableConcept)
__glibcpp_class_requires3(_HashFcn, size_t, _Key, _UnaryFunctionConcept);
__glibcpp_class_requires3(_EqualKey, _Key, _Key, _BinaryPredicateConcept);

View file

@ -83,7 +83,7 @@ template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
class hash_set
{
// concept requirements
__glibcpp_class_requires(_Value, _SGIAssignableConcept);
__glibcpp_class_requires(_Value, _SGIAssignableConcept)
__glibcpp_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept);
__glibcpp_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept);
@ -234,7 +234,7 @@ template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
class hash_multiset
{
// concept requirements
__glibcpp_class_requires(_Value, _SGIAssignableConcept);
__glibcpp_class_requires(_Value, _SGIAssignableConcept)
__glibcpp_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept);
__glibcpp_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept);

View file

@ -291,7 +291,7 @@ template <class _Tp, class _Alloc = allocator<_Tp> >
class slist : private _Slist_base<_Tp,_Alloc>
{
// concept requirements
__glibcpp_class_requires(_Tp, _SGIAssignableConcept);
__glibcpp_class_requires(_Tp, _SGIAssignableConcept)
private:
typedef _Slist_base<_Tp,_Alloc> _Base;

View file

@ -65,7 +65,7 @@ sources = \
locale.cc locale-inst.cc localename.cc \
collate.cc messages.cc moneypunct.cc numpunct.cc time.cc \
misc-inst.cc stdexcept.cc stl-inst.cc string-inst.cc strstream.cc \
valarray-inst.cc wstring-inst.cc
valarray-inst.cc wstring-inst.cc concept-inst.cc
VPATH = $(top_srcdir):$(top_srcdir)/src
@ -88,16 +88,20 @@ strstream.lo: strstream.cc
strstream.o: strstream.cc
$(CXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -c $<
# Use special rules for the concept-checking instantiations so that all
# the generated template functions are also instantiated. Force the checks
# to be on so that the instantiations are actually seen.
concept-inst.lo: concept-inst.cc
$(LTCXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
concept-inst.o: concept-inst.cc
$(CXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
# modified in a per-library or per-sub-library way. Need to manually
# set this option because CONFIG_CXXFLAGS has to be after
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# 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 = \
-fno-implicit-templates \
$(LIBSUPCXX_CXXFLAGS) \

View file

@ -1,6 +1,6 @@
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -66,7 +66,6 @@ AR = @AR@
AS = @AS@
ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
BASIC_FILE_H = @BASIC_FILE_H@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
@ -88,16 +87,16 @@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GENCAT = @GENCAT@
GLIBC21 = @GLIBC21@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIBICONV = @LIBICONV@
LIBMATHOBJS = @LIBMATHOBJS@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
LIBTOOL = @LIBTOOL@
@ -138,6 +137,7 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@
l = @l@
libio_la = @libio_la@
libtool_VERSION = @libtool_VERSION@
release_VERSION = @release_VERSION@
@ -190,7 +190,7 @@ sources = \
locale.cc locale-inst.cc localename.cc \
collate.cc messages.cc moneypunct.cc numpunct.cc time.cc \
misc-inst.cc stdexcept.cc stl-inst.cc string-inst.cc strstream.cc \
valarray-inst.cc wstring-inst.cc
valarray-inst.cc wstring-inst.cc concept-inst.cc
VPATH = $(top_srcdir):$(top_srcdir)/src
@ -215,10 +215,6 @@ GLIBCPP_INCLUDE_DIR = @glibcpp_builddir@/include
# set this option because CONFIG_CXXFLAGS has to be after
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# 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 = \
-fno-implicit-templates \
$(LIBSUPCXX_CXXFLAGS) \
@ -271,7 +267,8 @@ libstdc___la_OBJECTS = basic_file.lo bitset.lo c++locale.lo cmath.lo \
codecvt.lo complex_io.lo functexcept.lo globals.lo ios.lo limits.lo \
locale.lo locale-inst.lo localename.lo collate.lo messages.lo \
moneypunct.lo numpunct.lo time.lo misc-inst.lo stdexcept.lo stl-inst.lo \
string-inst.lo strstream.lo valarray-inst.lo wstring-inst.lo
string-inst.lo strstream.lo valarray-inst.lo wstring-inst.lo \
concept-inst.lo
CXXFLAGS = @CXXFLAGS@
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
@ -502,6 +499,14 @@ strstream.lo: strstream.cc
strstream.o: strstream.cc
$(CXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -c $<
# Use special rules for the concept-checking instantiations so that all
# the generated template functions are also instantiated. Force the checks
# to be on so that the instantiations are actually seen.
concept-inst.lo: concept-inst.cc
$(LTCXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
concept-inst.o: concept-inst.cc
$(CXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -0,0 +1,166 @@
// Concept checking instantiations -*- C++ -*-
// Copyright (C) 2001 Free Software Foundation
//
// This file is part of GNU CC.
//
// GNU CC 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.
//
// GNU CC 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 GNU CC; 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.
// The implementation of some of the more complex checks uses the simple
// checks (good reuse of code), thereby requiring that the simple checks
// be instantiated somewhere. The simple checks use other simple checks,
// and so on, until a couple hundred symbols all need instantiations. We
// explicitly instantiate the initial set of symbols; compiling this file
// with -fimplicit-templates will take care of the rest for us.
#include <bits/concept_check.h>
#ifdef _GLIBCPP_CONCEPT_CHECKS
#include <bits/stl_alloc.h>
#include <bits/std_vector.h>
#include <bits/std_ostream.h>
#define _Instantiate(...) template void __function_requires< __VA_ARGS__ > ()
namespace __gnu_cxx
{
template void __aux_require_boolean_expr<bool>(bool const&);
_Instantiate(_BidirectionalIteratorConcept<
std::__normal_iterator< std::locale::facet**,
std::vector<std::locale::facet*,std::allocator<std::locale::facet*> > > > );
_Instantiate(_BidirectionalIteratorConcept<
std::__normal_iterator< unsigned*,
std::vector<unsigned, std::allocator<unsigned> > > > );
_Instantiate(_ConvertibleConcept<std::locale::facet*, std::locale::facet*> );
_Instantiate(_ConvertibleConcept<unsigned, unsigned> );
_Instantiate(_InputIteratorConcept<char*> );
_Instantiate(_InputIteratorConcept<char const*> );
_Instantiate(_InputIteratorConcept<std::locale::facet**> );
_Instantiate(_InputIteratorConcept<
std::__normal_iterator< std::locale::facet* const*,
std::vector<std::locale::facet*,std::allocator<std::locale::facet*> > > > );
_Instantiate(_InputIteratorConcept<
std::__normal_iterator< std::locale::facet**,
std::vector<std::locale::facet*,std::allocator<std::locale::facet*> > > > );
_Instantiate(_InputIteratorConcept<
std::__normal_iterator< unsigned*,
std::vector<unsigned, std::allocator<unsigned> > > > );
#ifdef _GLIBCPP_USE_WCHAR_T
_Instantiate(_InputIteratorConcept<wchar_t*> );
_Instantiate(_InputIteratorConcept<wchar_t const*> );
_Instantiate(_LessThanComparableConcept<wchar_t*> );
#endif
_Instantiate(_LessThanComparableConcept<char*> );
_Instantiate(_LessThanComparableConcept<int> );
_Instantiate(_LessThanComparableConcept<long> );
#ifdef _GLIBCPP_USE_LONG_LONG
_Instantiate(_LessThanComparableConcept<long long> );
#endif
_Instantiate(_LessThanComparableConcept<unsigned> );
_Instantiate(_Mutable_BidirectionalIteratorConcept<
std::__normal_iterator< std::locale::facet**,
std::vector<std::locale::facet*,std::allocator<std::locale::facet*> > > > );
_Instantiate(_Mutable_BidirectionalIteratorConcept<
std::__normal_iterator< unsigned*,
std::vector<unsigned, std::allocator<unsigned> > > > );
_Instantiate(_Mutable_ForwardIteratorConcept<
std::__normal_iterator< std::locale::facet**,
std::vector<std::locale::facet*,std::allocator<std::locale::facet*> > > > );
_Instantiate(_OutputIteratorConcept<
std::locale::facet**, std::locale::facet*> );
_Instantiate(_OutputIteratorConcept<
std::__normal_iterator< std::locale::facet**,
std::vector<std::locale::facet*, std::allocator<std::locale::facet* > > >,
std::locale::facet* > );
_Instantiate(_OutputIteratorConcept<std::__normal_iterator<
unsigned*, std::vector<unsigned, std::allocator<unsigned> > >, unsigned> );
_Instantiate(_OutputIteratorConcept<std::ostreambuf_iterator<
char, std::char_traits<char> >, char> );
#ifdef _GLIBCPP_USE_WCHAR_T
_Instantiate(_OutputIteratorConcept<std::ostreambuf_iterator<
wchar_t, std::char_traits<wchar_t> >, wchar_t> );
#endif
_Instantiate(_RandomAccessIteratorConcept<char*> );
_Instantiate(_RandomAccessIteratorConcept<char const*> );
_Instantiate(_RandomAccessIteratorConcept<
std::__normal_iterator<char const*, std::string> > );
_Instantiate(_RandomAccessIteratorConcept<
std::__normal_iterator<char*, std::string> > );
#ifdef _GLIBCPP_USE_WCHAR_T
_Instantiate(_RandomAccessIteratorConcept<
std::__normal_iterator<wchar_t const*,
std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> > > > );
_Instantiate(_RandomAccessIteratorConcept<
std::__normal_iterator<wchar_t*,
std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> > > > );
_Instantiate(_RandomAccessIteratorConcept<wchar_t*> );
_Instantiate(_RandomAccessIteratorConcept<wchar_t const*> );
#endif
} // namespace __gnu_cxx
#undef _Instantiate
#endif