Commit cd1e6665 by Benjamin Kosnik Committed by Benjamin Kosnik

memoryfwd.h: New.

	* include/bits/memoryfwd.h: New. Centralize forward declarations.
	* include/bits/algorithmfwd.h: Consistent comments.
	* include/bits/localefwd.h: Same.
	* include/ext/vstring_fwd.h: Same.
	* include/parallel/algorithmfwd.h: Same.
	* include/parallel/numericfwd.h: Same.
	* include/std/iosfwd: Same.

	* include/bits/alloc_traits.h: Include memoryfwd.h, remove allocator
	forward decl.
	* include/ext/alloc_traits.h: Remove allocator forward decl.
	* include/bits/stl_construct.h: Same.
	* include/bits/stringfwd.h: Include memoryfwd.h, remove allocator
	forward decl. Consistent comments.

	* doc/doxygen/user.cfg.in (TEMPLATE_RELATIONS): To NO.

	* include/Makefile.am (bits_headers): Add memoryfwd.h.
	* include/Makefile.in: Regenerate.
	* configure: Same.

e enter the commit message for your changes. Lines starting

From-SVN: r196559
parent 68d047cb
2013-03-08 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/memoryfwd.h: New. Centralize forward declarations.
* include/bits/algorithmfwd.h: Consistent comments.
* include/bits/localefwd.h: Same.
* include/ext/vstring_fwd.h: Same.
* include/parallel/algorithmfwd.h: Same.
* include/parallel/numericfwd.h: Same.
* include/std/iosfwd: Same.
* include/bits/alloc_traits.h: Include memoryfwd.h, remove allocator
forward decl.
* include/ext/alloc_traits.h: Remove allocator forward decl.
* include/bits/stl_construct.h: Same.
* include/bits/stringfwd.h: Include memoryfwd.h, remove allocator
forward decl. Consistent comments.
* doc/doxygen/user.cfg.in (TEMPLATE_RELATIONS): To NO.
* include/Makefile.am (bits_headers): Add memoryfwd.h.
* include/Makefile.in: Regenerate.
* configure: Same.
2013-03-08 François Dumont <fdumont@gcc.gnu.org> 2013-03-08 François Dumont <fdumont@gcc.gnu.org>
* include/bits/vector.tcc (vector<>operator=(const vector<>&): * include/bits/vector.tcc (vector<>operator=(const vector<>&):
......
...@@ -3530,11 +3530,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} ...@@ -3530,11 +3530,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
# We need awk for the "check" target. The system "awk" is bad on # We need awk for the "check" target. The system "awk" is bad on
# some platforms. # some platforms.
# Always define AMTAR for backward compatibility. Yes, it's still used # Always define AMTAR for backward compatibility.
# in the wild :-( We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'
am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' AMTAR=${AMTAR-"${am_missing_run}tar"}
am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
...@@ -1957,7 +1957,7 @@ UML_LIMIT_NUM_FIELDS = 10 ...@@ -1957,7 +1957,7 @@ UML_LIMIT_NUM_FIELDS = 10
# If set to YES, the inheritance and collaboration graphs will show the # If set to YES, the inheritance and collaboration graphs will show the
# relations between templates and their instances. # relations between templates and their instances.
TEMPLATE_RELATIONS = YES TEMPLATE_RELATIONS = NO
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
# tags are set to YES then doxygen will generate a graph for each documented # tags are set to YES then doxygen will generate a graph for each documented
......
...@@ -113,6 +113,7 @@ bits_headers = \ ...@@ -113,6 +113,7 @@ bits_headers = \
${bits_srcdir}/locale_facets_nonio.tcc \ ${bits_srcdir}/locale_facets_nonio.tcc \
${bits_srcdir}/localefwd.h \ ${bits_srcdir}/localefwd.h \
${bits_srcdir}/mask_array.h \ ${bits_srcdir}/mask_array.h \
${bits_srcdir}/memoryfwd.h \
${bits_srcdir}/move.h \ ${bits_srcdir}/move.h \
${bits_srcdir}/ostream.tcc \ ${bits_srcdir}/ostream.tcc \
${bits_srcdir}/ostream_insert.h \ ${bits_srcdir}/ostream_insert.h \
......
# Makefile.in generated by automake 1.11.6 from Makefile.am. # Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Foundation, Inc. # Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
...@@ -15,23 +15,6 @@ ...@@ -15,23 +15,6 @@
@SET_MAKE@ @SET_MAKE@
VPATH = @srcdir@ VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
...@@ -84,11 +67,6 @@ CONFIG_CLEAN_VPATH_FILES = ...@@ -84,11 +67,6 @@ CONFIG_CLEAN_VPATH_FILES =
depcomp = depcomp =
am__depfiles_maybe = am__depfiles_maybe =
SOURCES = SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
ALLOCATOR_H = @ALLOCATOR_H@ ALLOCATOR_H = @ALLOCATOR_H@
...@@ -397,6 +375,7 @@ bits_headers = \ ...@@ -397,6 +375,7 @@ bits_headers = \
${bits_srcdir}/locale_facets_nonio.tcc \ ${bits_srcdir}/locale_facets_nonio.tcc \
${bits_srcdir}/localefwd.h \ ${bits_srcdir}/localefwd.h \
${bits_srcdir}/mask_array.h \ ${bits_srcdir}/mask_array.h \
${bits_srcdir}/memoryfwd.h \
${bits_srcdir}/move.h \ ${bits_srcdir}/move.h \
${bits_srcdir}/ostream.tcc \ ${bits_srcdir}/ostream.tcc \
${bits_srcdir}/ostream_insert.h \ ${bits_srcdir}/ostream_insert.h \
...@@ -1214,7 +1193,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ...@@ -1214,7 +1193,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac; esac;
$(top_srcdir)/fragment.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
...@@ -1250,15 +1228,10 @@ install-am: all-am ...@@ -1250,15 +1228,10 @@ install-am: all-am
installcheck: installcheck-am installcheck: installcheck-am
install-strip: install-strip:
if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \
install; \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
......
// <algorithm> declarations -*- C++ -*- // <algorithm> Forward declarations -*- C++ -*-
// Copyright (C) 2007-2013 Free Software Foundation, Inc. // Copyright (C) 2007-2013 Free Software Foundation, Inc.
// //
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#if __cplusplus >= 201103L #if __cplusplus >= 201103L
#include <bits/memoryfwd.h>
#include <bits/ptr_traits.h> #include <bits/ptr_traits.h>
#include <ext/numeric_traits.h> #include <ext/numeric_traits.h>
...@@ -39,9 +40,6 @@ namespace std _GLIBCXX_VISIBILITY(default) ...@@ -39,9 +40,6 @@ namespace std _GLIBCXX_VISIBILITY(default)
{ {
_GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp>
class allocator;
template<typename _Alloc, typename _Tp> template<typename _Alloc, typename _Tp>
class __alloctr_rebind_helper class __alloctr_rebind_helper
{ {
......
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
#ifndef _ALLOCATOR_H #ifndef _ALLOCATOR_H
#define _ALLOCATOR_H 1 #define _ALLOCATOR_H 1
// Define the base class to std::allocator. #include <bits/c++allocator.h> // Define the base class to std::allocator.
#include <bits/c++allocator.h> #include <bits/memoryfwd.h>
#if __cplusplus >= 201103L #if __cplusplus >= 201103L
#include <type_traits> #include <type_traits>
#endif #endif
...@@ -54,17 +54,10 @@ namespace std _GLIBCXX_VISIBILITY(default) ...@@ -54,17 +54,10 @@ namespace std _GLIBCXX_VISIBILITY(default)
_GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_VERSION
/** /**
* @defgroup allocators Allocators * @addtogroup allocators
* @ingroup memory * @{
*
* Classes encapsulating memory operations.
*
* @{
*/ */
template<typename _Tp>
class allocator;
/// allocator<void> specialization. /// allocator<void> specialization.
template<> template<>
class allocator<void> class allocator<void>
...@@ -150,13 +143,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -150,13 +143,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
operator!=(const allocator<_Tp>&, const allocator<_Tp>&) operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
{ return false; } { return false; }
/// Declare uses_allocator so it can be specialized in \<queue\> etc. /// @} group allocator
template<typename, typename>
struct uses_allocator;
/**
* @}
*/
// Inhibit implicit instantiations for required instantiations, // Inhibit implicit instantiations for required instantiations,
// which are defined via explicit instantiations elsewhere. // which are defined via explicit instantiations elsewhere.
......
// Locale support -*- C++ -*- // <locale> Forward declarations -*- C++ -*-
// Copyright (C) 1997-2013 Free Software Foundation, Inc. // Copyright (C) 1997-2013 Free Software Foundation, Inc.
// //
...@@ -185,6 +185,6 @@ _GLIBCXX_END_NAMESPACE_LDBL ...@@ -185,6 +185,6 @@ _GLIBCXX_END_NAMESPACE_LDBL
class messages_byname; class messages_byname;
_GLIBCXX_END_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION
} // namespace } // namespace std
#endif #endif
// <memory> Forward declarations -*- C++ -*-
// Copyright (C) 2001-2013 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 3, 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.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
* Copyright (c) 1996-1997
* 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.
*/
/** @file bits/memoryfwd.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{memory}
*/
#ifndef _MEMORYFWD_H
#define _MEMORYFWD_H 1
#pragma GCC system_header
#include <bits/c++config.h>
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @defgroup allocators Allocators
* @ingroup memory
*
* Classes encapsulating memory operations.
*
* @{
*/
template<typename>
class allocator;
template<>
class allocator<void>;
/// Declare uses_allocator so it can be specialized in \<queue\> etc.
template<typename, typename>
struct uses_allocator;
/// @} group memory
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif
...@@ -133,8 +133,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -133,8 +133,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* destroy() even if _Tp has a trivial destructor. * destroy() even if _Tp has a trivial destructor.
*/ */
template <typename _Tp> class allocator;
template<typename _ForwardIterator, typename _Allocator> template<typename _ForwardIterator, typename _Allocator>
void void
_Destroy(_ForwardIterator __first, _ForwardIterator __last, _Destroy(_ForwardIterator __first, _ForwardIterator __last,
...@@ -154,7 +152,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -154,7 +152,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
} }
_GLIBCXX_END_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION
} // namespace } // namespace std
#endif /* _STL_CONSTRUCT_H */ #endif /* _STL_CONSTRUCT_H */
// String support -*- C++ -*- // <string> Forward declarations -*- C++ -*-
// Copyright (C) 2001-2013 Free Software Foundation, Inc. // Copyright (C) 2001-2013 Free Software Foundation, Inc.
// //
...@@ -37,14 +37,12 @@ ...@@ -37,14 +37,12 @@
#pragma GCC system_header #pragma GCC system_header
#include <bits/c++config.h> #include <bits/c++config.h>
#include <bits/memoryfwd.h>
namespace std _GLIBCXX_VISIBILITY(default) namespace std _GLIBCXX_VISIBILITY(default)
{ {
_GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Alloc>
class allocator;
/** /**
* @defgroup strings Strings * @defgroup strings Strings
* *
......
...@@ -38,13 +38,6 @@ ...@@ -38,13 +38,6 @@
# include <bits/allocator.h> // for __alloc_swap # include <bits/allocator.h> // for __alloc_swap
#endif #endif
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename> struct allocator;
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{ {
_GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_VERSION
...@@ -244,6 +237,6 @@ template<typename _Alloc> ...@@ -244,6 +237,6 @@ template<typename _Alloc>
}; };
_GLIBCXX_END_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION
} // namespace } // namespace std
#endif #endif
// Versatile string forward -*- C++ -*- // <vstring.h> Forward declarations -*- C++ -*-
// Copyright (C) 2005-2013 Free Software Foundation, Inc. // Copyright (C) 2005-2013 Free Software Foundation, Inc.
// //
......
// <algorithm> parallel extensions -*- C++ -*- // <parallel/algorithm> Forward declarations -*- C++ -*-
// Copyright (C) 2007-2013 Free Software Foundation, Inc. // Copyright (C) 2007-2013 Free Software Foundation, Inc.
// //
......
// <numeric> parallel extensions -*- C++ -*- // <parallel/numeric> Forward declarations -*- C++ -*-
// Copyright (C) 2007-2013 Free Software Foundation, Inc. // Copyright (C) 2007-2013 Free Software Foundation, Inc.
// //
......
// Forwarding declarations -*- C++ -*- // <iosfwd> Forward declarations -*- C++ -*-
// Copyright (C) 1997-2013 Free Software Foundation, Inc. // Copyright (C) 1997-2013 Free Software Foundation, Inc.
// //
......
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