BIND 10 master, updated. f9169a71cb277c3733a8ff7d0fea87762196762d [master] Initialize the list of strings before passing it to boost foreach.

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Jan 16 09:18:31 UTC 2013


The branch, master has been updated
       via  f9169a71cb277c3733a8ff7d0fea87762196762d (commit)
      from  7d4b55818c8510a180889b157bfb360ef601af1b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f9169a71cb277c3733a8ff7d0fea87762196762d
Author: Marcin Siodelski <marcin at isc.org>
Date:   Wed Jan 16 10:09:46 2013 +0100

    [master] Initialize the list of strings before passing it to boost foreach.
    
    This overcomes the compilation failure on Sunstudio that is caused by the
    boost::foreach_detail_::is_rvalue_() overloading ambiguity when
    passing the rvalue to boost foreach.

-----------------------------------------------------------------------

Summary of changes:
 src/bin/dhcp4/config_parser.cc |   12 +++++++-----
 src/bin/dhcp6/config_parser.cc |   12 +++++++-----
 2 files changed, 14 insertions(+), 10 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/dhcp4/config_parser.cc b/src/bin/dhcp4/config_parser.cc
index 40c00bf..fdb4240 100644
--- a/src/bin/dhcp4/config_parser.cc
+++ b/src/bin/dhcp4/config_parser.cc
@@ -1197,8 +1197,9 @@ public:
 
         // We need to move option definitions from the temporary
         // storage to the global storage.
-        BOOST_FOREACH(std::string space_name,
-                      option_def_intermediate.getOptionSpaceNames()) {
+        std::list<std::string> space_names =
+            option_def_intermediate.getOptionSpaceNames();
+        BOOST_FOREACH(std::string space_name, space_names) {
 
             BOOST_FOREACH(OptionDefinitionPtr def,
                           *option_def_intermediate.getItems(space_name)) {
@@ -1387,7 +1388,8 @@ private:
         // Configured options reside in the container where options
         // are grouped by space names. Thus we need to get all space names
         // and iterate over all options that belong to them.
-        BOOST_FOREACH(std::string option_space, options_.getOptionSpaceNames()) {
+        std::list<std::string> space_names = options_.getOptionSpaceNames();
+        BOOST_FOREACH(std::string option_space, space_names) {
             // Get all options within a particular option space.
             BOOST_FOREACH(Subnet::OptionDescriptor desc,
                           *options_.getItems(option_space)) {
@@ -1414,8 +1416,8 @@ private:
         // they have been configured in the global scope. If they have been
         // configured in the subnet scope we don't add global option because
         // the one configured in the subnet scope always takes precedence.
-        BOOST_FOREACH(std::string option_space,
-                      option_defaults.getOptionSpaceNames()) {
+        space_names = option_defaults.getOptionSpaceNames();
+        BOOST_FOREACH(std::string option_space, space_names) {
             // Get all global options for the particular option space.
             BOOST_FOREACH(Subnet::OptionDescriptor desc,
                           *option_defaults.getItems(option_space)) {
diff --git a/src/bin/dhcp6/config_parser.cc b/src/bin/dhcp6/config_parser.cc
index 5b03ab8..5c8675e 100644
--- a/src/bin/dhcp6/config_parser.cc
+++ b/src/bin/dhcp6/config_parser.cc
@@ -1227,8 +1227,9 @@ public:
 
         // We need to move option definitions from the temporary
         // storage to the global storage.
-        BOOST_FOREACH(std::string space_name,
-                      option_def_intermediate.getOptionSpaceNames()) {
+        std::list<std::string> space_names =
+            option_def_intermediate.getOptionSpaceNames();
+        BOOST_FOREACH(std::string space_name, space_names) {
 
             BOOST_FOREACH(OptionDefinitionPtr def,
                           *option_def_intermediate.getItems(space_name)) {
@@ -1419,7 +1420,8 @@ private:
         // Configured options reside in the container where options
         // are grouped by space names. Thus we need to get all space names
         // and iterate over all options that belong to them.
-        BOOST_FOREACH(std::string option_space, options_.getOptionSpaceNames()) {
+        std::list<std::string> space_names = options_.getOptionSpaceNames();
+        BOOST_FOREACH(std::string option_space, space_names) {
             // Get all options within a particular option space.
             BOOST_FOREACH(Subnet::OptionDescriptor desc,
                           *options_.getItems(option_space)) {
@@ -1446,8 +1448,8 @@ private:
         // they have been configured in the global scope. If they have been
         // configured in the subnet scope we don't add global option because
         // the one configured in the subnet scope always takes precedence.
-        BOOST_FOREACH(std::string option_space,
-                      option_defaults.getOptionSpaceNames()) {
+        space_names = option_defaults.getOptionSpaceNames();
+        BOOST_FOREACH(std::string option_space, space_names) {
             // Get all global options for the particular option space.
             BOOST_FOREACH(Subnet::OptionDescriptor desc,
                           *option_defaults.getItems(option_space)) {



More information about the bind10-changes mailing list