This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[PATCH][libstdc++-v3 parallel mode] Make settings getter return non-const object
- From: Johannes Singler <singler at ira dot uka dot de>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 19 Mar 2008 16:08:07 +0100
- Subject: [PATCH][libstdc++-v3 parallel mode] Make settings getter return non-const object
This patch makes the getter method for the parallel mode settings
structure return a non-const object, so it can be directly modified,
which is much more convenient for the library user.
AFAIK this does not change library binary compatibility, does it?
Tested x86_64-unknown-linux-gnu: No regressions
Please comment and/or approve.
2007-03-19 Johannes Singler <singler@ira.uka.de>
* src/parallel_settings.cc: Removed const for getter.
* include/parallel/settings.h: Removed const for getter.
Johannes
Index: src/parallel_settings.cc
===================================================================
--- src/parallel_settings.cc (revision 133208)
+++ src/parallel_settings.cc (working copy)
@@ -36,7 +36,7 @@
namespace __gnu_parallel
{
- const _Settings&
+ _Settings&
_Settings::get() throw()
{ return s; }
Index: include/parallel/settings.h
===================================================================
--- include/parallel/settings.h (revision 133208)
+++ include/parallel/settings.h (working copy)
@@ -271,7 +271,7 @@
sequence_index_t qsb_steals;
/// Get the global settings.
- static const _Settings&
+ static _Settings&
get() throw();
/// Set the global settings.