[V3 PATCH] rel_ops in backwards-compat headers
Phil Edwards
pedwards@disaster.jaj.com
Tue Feb 13 08:10:00 GMT 2001
For libstdc++, using the std::rel_ops operators causes serious problems
with other components of the library, so we no longer #include that header
in the main library headers. But we didn't make the same change to the
backwards-compatability headers, thus causing compilation failures for
users playing mix-and-match games with old and new headers (which still
needs to work).
Applied to the head and the branch. This fixes a number of PRs (some
already closed as duplicates). Finally! :-)
2001-02-13 Dirk Mueller <dmuell@gmx.net>
Phil Edwards <pme@sources.redhat.com>
* include/backward/function.h: Do not use rel_ops for older
headers either.
* include/backward/pair.h: Likewise.
Index: include/backward/function.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/backward/function.h,v
retrieving revision 1.1
diff -u -3 -p -r1.1 function.h
--- function.h 2000/10/05 11:27:00 1.1
+++ function.h 2001/02/13 15:59:56
@@ -30,23 +30,10 @@
#ifndef _CPP_BITS_STL_CONFIG_H
#include <bits/stl_config.h>
#endif
-#ifndef _CPP_BITS_STL_RELOPS
-#include <bits/stl_relops.h>
-#endif
#include <stddef.h>
#ifndef _CPP_BITS_STL_FUNCTION_H
#include <bits/stl_function.h>
#endif
-
-#ifdef __STL_USE_NAMESPACE_FOR_RELOPS
-
-// Names from stl_relops.h
-using __STD_RELOPS::operator!=;
-using __STD_RELOPS::operator>;
-using __STD_RELOPS::operator<=;
-using __STD_RELOPS::operator>=;
-
-#endif /* __STL_USE_NAMESPACE_FOR_RELOPS */
#ifdef __STL_USE_NAMESPACES
Index: include/backward/pair.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/backward/pair.h,v
retrieving revision 1.1
diff -u -3 -p -r1.1 pair.h
--- pair.h 2000/10/05 11:27:00 1.1
+++ pair.h 2001/02/13 15:59:56
@@ -30,9 +30,6 @@
#ifndef _CPP_BITS_STL_CONFIG_H
#include <bits/stl_config.h>
#endif
-#ifndef _CPP_BITS_STL_RELOPS_H
-#include <bits/stl_relops.h>
-#endif
#ifndef _CPP_BITS_STL_PAIR_H
#include <bits/stl_pair.h>
#endif
More information about the Libstdc++
mailing list