diff --git a/indra/llcommon/llleaplistener.cpp b/indra/llcommon/llleaplistener.cpp
index fa5730f112e2be3eac4aeec79d8a4e49373da179..6b42b22e28347804ab7f1ef5697fadbce7df6a23 100644
--- a/indra/llcommon/llleaplistener.cpp
+++ b/indra/llcommon/llleaplistener.cpp
@@ -16,7 +16,6 @@
 // STL headers
 // std headers
 // external library headers
-#include <boost/foreach.hpp>
 // other Linden headers
 #include "lluuid.h"
 #include "llsdutil.h"
@@ -113,7 +112,7 @@ LLLeapListener::~LLLeapListener()
     // value_type, and Bad Things would happen if you copied an
     // LLTempBoundListener. (Destruction of the original would disconnect the
     // listener, invalidating every stored connection.)
-    BOOST_FOREACH(ListenersMap::value_type& pair, mListeners)
+    for(ListenersMap::value_type& pair : mListeners)
     {
         pair.second.disconnect();
     }
diff --git a/indra/llcommon/llprocess.cpp b/indra/llcommon/llprocess.cpp
index 1fa53f322b1da8ca17b8bffbf11a5116349b8b8f..7b914281b06fe084decb01a370ccddf269ed8421 100644
--- a/indra/llcommon/llprocess.cpp
+++ b/indra/llcommon/llprocess.cpp
@@ -36,7 +36,6 @@
 #include "llevents.h"
 #include "llexception.h"
 
-#include <boost/foreach.hpp>
 #include <boost/bind.hpp>
 #include <boost/asio/streambuf.hpp>
 #include <boost/asio/buffers_iterator.hpp>
@@ -572,7 +571,7 @@ LLProcess::LLProcess(const LLSDOrParams& params):
 	// apr_procattr_child_err_set()), or accepting a filename, opening it and
 	// passing that apr_file_t (simple <, >, 2> redirect emulation).
 	std::vector<apr_int32_t> select;
-	BOOST_FOREACH(const FileParam& fparam, params.files)
+	for(const FileParam& fparam : params.files)
 	{
 		// Every iteration, we're going to append an item to 'select'. At the
 		// top of the loop, its size() is, in effect, an index. Use that to
@@ -669,7 +668,7 @@ LLProcess::LLProcess(const LLSDOrParams& params):
 	argv.push_back(params.executable().c_str());
 
 	// Add arguments. See above remarks about c_str().
-	BOOST_FOREACH(const std::string& arg, params.args)
+	for(const std::string& arg: params.args)
 	{
 		argv.push_back(arg.c_str());
 	}
@@ -940,7 +939,7 @@ void LLProcess::handle_status(int reason, int status)
 		// only be performed if in fact we're going to produce the log message.
 		LL_DEBUGS("LLProcess") << empty;
 		std::string reason_str;
-		BOOST_FOREACH(const ReasonCode& rcp, reasons)
+		for(const ReasonCode& rcp : reasons)
 		{
 			if (reason == rcp.code)
 			{
@@ -1130,7 +1129,7 @@ std::ostream& operator<<(std::ostream& out, const LLProcess::Params& params)
 		out << "cd " << LLStringUtil::quote(params.cwd) << ": ";
 	}
 	out << LLStringUtil::quote(params.executable);
-	BOOST_FOREACH(const std::string& arg, params.args)
+	for(const std::string& arg : params.args)
 	{
 		out << ' ' << LLStringUtil::quote(arg);
 	}
diff --git a/indra/llcommon/llsingleton.cpp b/indra/llcommon/llsingleton.cpp
index c45c14457048ecc65da4fc5593f4a5d54972c211..4e1420dd68bd752bf4ce29b80c5c66ee494dafda 100644
--- a/indra/llcommon/llsingleton.cpp
+++ b/indra/llcommon/llsingleton.cpp
@@ -31,7 +31,6 @@
 #include "llerrorcontrol.h"         // LLError::is_available()
 #include "lldependencies.h"
 #include "llcoro_get_id.h"
-#include <boost/foreach.hpp>
 #include <boost/unordered_map.hpp>
 #include <algorithm>
 #include <iostream>                 // std::cerr in dire emergency
@@ -314,7 +313,7 @@ LLSingletonBase::vec_t LLSingletonBase::dep_sort()
     typedef LLDependencies<LLSingletonBase*> SingletonDeps;
     SingletonDeps sdeps;
     list_t& master(get_master());
-    BOOST_FOREACH(LLSingletonBase* sp, master)
+    for (LLSingletonBase* sp : master)
     {
         // Build the SingletonDeps structure by adding, for each
         // LLSingletonBase* sp in the master list, sp itself. It has no
@@ -331,7 +330,7 @@ LLSingletonBase::vec_t LLSingletonBase::dep_sort()
     // extracts just the first (key) element from each sorted_iterator, then
     // uses vec_t's range constructor... but frankly this is more
     // straightforward, as long as we remember the above reserve() call!
-    BOOST_FOREACH(SingletonDeps::sorted_iterator::value_type pair, sdeps.sort())
+    for (SingletonDeps::sorted_iterator::value_type pair : sdeps.sort())
     {
         ret.push_back(pair.first);
     }
@@ -346,7 +345,7 @@ LLSingletonBase::vec_t LLSingletonBase::dep_sort()
 void LLSingletonBase::cleanupAll()
 {
     // It's essential to traverse these in dependency order.
-    BOOST_FOREACH(LLSingletonBase* sp, dep_sort())
+    for (LLSingletonBase* sp : dep_sort())
     {
         // Call cleanupSingleton() only if we haven't already done so for this
         // instance.
@@ -378,7 +377,7 @@ void LLSingletonBase::cleanupAll()
 void LLSingletonBase::deleteAll()
 {
     // It's essential to traverse these in dependency order.
-    BOOST_FOREACH(LLSingletonBase* sp, dep_sort())
+    for (LLSingletonBase* sp : dep_sort())
     {
         // Capture the class name first: in case of exception, don't count on
         // being able to extract it later.
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 1f8d558fbeb0c068c41b7183a667f685703f82b1..758c478262a210dc137076e30656af396cb5dc4b 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -49,7 +49,6 @@
 #include <boost/bind.hpp>
 #include <boost/circular_buffer.hpp>
 #include <boost/regex.hpp>
-#include <boost/foreach.hpp>
 #include <boost/lexical_cast.hpp>
 #include <boost/range.hpp>
 #include <boost/utility/enable_if.hpp>
@@ -883,7 +882,7 @@ void LLMemoryInfo::stream(std::ostream& s) const
 
 	// Max key length
 	size_t key_width(0);
-	BOOST_FOREACH(const MapEntry& pair, inMap(mStatsMap))
+	for (const MapEntry& pair : inMap(mStatsMap))
 	{
 		size_t len(pair.first.length());
 		if (len > key_width)
@@ -893,7 +892,7 @@ void LLMemoryInfo::stream(std::ostream& s) const
 	}
 
 	// Now stream stats
-	BOOST_FOREACH(const MapEntry& pair, inMap(mStatsMap))
+	for (const MapEntry& pair : inMap(mStatsMap))
 	{
 		s << pfx << std::setw(key_width+1) << (pair.first + ':') << ' ';
 		LLSD value(pair.second);
diff --git a/indra/llcommon/tests/lleventdispatcher_test.cpp b/indra/llcommon/tests/lleventdispatcher_test.cpp
index a181d5c941e09a5855eafe0d2bb8f76096bc7734..9fbc043326b52c3937a4d112c35c3c2ba447e2ed 100644
--- a/indra/llcommon/tests/lleventdispatcher_test.cpp
+++ b/indra/llcommon/tests/lleventdispatcher_test.cpp
@@ -31,8 +31,6 @@
 #include <boost/bind.hpp>
 #include <boost/function.hpp>
 #include <boost/range.hpp>
-#include <boost/foreach.hpp>
-#define foreach BOOST_FOREACH
 
 #include <boost/lambda/lambda.hpp>
 
@@ -213,7 +211,7 @@ struct Vars
     void methodnb(NPARAMSb)
     {
         std::ostringstream vbin;
-        foreach(U8 byte, bin)
+        for (U8 byte : bin)
         {
             vbin << std::hex << std::setfill('0') << std::setw(2) << unsigned(byte);
         }
@@ -450,7 +448,7 @@ namespace tut
                                                    (binary));
             cout << "dft_array_full:\n" << dft_array_full << std::endl;
             // Partial defaults arrays.
-            foreach(LLSD::String a, ab)
+            for (LLSD::String a : ab)
             {
                 LLSD::Integer partition(std::min(partial_offset, dft_array_full[a].size()));
                 dft_array_partial[a] =
@@ -459,7 +457,7 @@ namespace tut
             }
             cout << "dft_array_partial:\n" << dft_array_partial << std::endl;
 
-            foreach(LLSD::String a, ab)
+            for (LLSD::String a : ab)
             {
                 // Generate full defaults maps by zipping (params, dft_array_full).
                 dft_map_full[a] = zipmap(params[a], dft_array_full[a]);
@@ -588,7 +586,7 @@ namespace tut
             // it's meaningless to have a modifiable iterator. But since our
             // 'work' object isn't const, by default BOOST_FOREACH() wants to
             // use non-const iterators. Persuade it to use the const_iterator.
-            foreach(LLEventDispatcher::NameDesc nd, const_cast<const Dispatcher&>(work))
+            for (LLEventDispatcher::NameDesc nd : const_cast<const Dispatcher&>(work))
             {
                 DescMap::iterator found = forgotten.find(nd.first);
                 ensure(STRINGIZE("LLEventDispatcher records function '" << nd.first
@@ -606,7 +604,7 @@ namespace tut
                 std::ostringstream out;
                 out << "LLEventDispatcher failed to report";
                 const char* delim = ": ";
-                foreach(const DescMap::value_type& fme, forgotten)
+                for (const DescMap::value_type& fme : forgotten)
                 {
                     out << delim << fme.first;
                     delim = ", ";
@@ -709,7 +707,7 @@ namespace tut
         set_test_name("map-style registration with non-array params");
         // Pass "param names" as scalar or as map
         LLSD attempts(LLSDArray(17)(LLSDMap("pi", 3.14)("two", 2)));
-        foreach(LLSD ae, inArray(attempts))
+        for (LLSD ae : inArray(attempts))
         {
             std::string threw = catch_what<std::exception>([this, &ae](){
                     work.add("freena_err", "freena", freena, ae);
@@ -784,7 +782,7 @@ namespace tut
     {
         set_test_name("query Callables with/out required params");
         LLSD names(LLSDArray("free1")("Dmethod1")("Dcmethod1")("method1"));
-        foreach(LLSD nm, inArray(names))
+        for (LLSD nm : inArray(names))
         {
             LLSD metadata(getMetadata(nm));
             ensure_equals("name mismatch", metadata["name"], nm);
@@ -813,14 +811,14 @@ namespace tut
                        (5)(LLSDArray("freena_array")("smethodna_array")("methodna_array")))
                       (LLSDArray
                        (5)(LLSDArray("freenb_array")("smethodnb_array")("methodnb_array"))));
-        foreach(LLSD ae, inArray(expected))
+        for (LLSD ae : inArray(expected))
         {
             LLSD::Integer arity(ae[0].asInteger());
             LLSD names(ae[1]);
             LLSD req(LLSD::emptyArray());
             if (arity)
                 req[arity - 1] = LLSD();
-            foreach(LLSD nm, inArray(names))
+            for (LLSD nm : inArray(names))
             {
                 LLSD metadata(getMetadata(nm));
                 ensure_equals("name mismatch", metadata["name"], nm);
@@ -839,7 +837,7 @@ namespace tut
         // - (Free function | non-static method), map style, no params (ergo
         //   no defaults)
         LLSD names(LLSDArray("free0_map")("smethod0_map")("method0_map"));
-        foreach(LLSD nm, inArray(names))
+        for (LLSD nm : inArray(names))
         {
             LLSD metadata(getMetadata(nm));
             ensure_equals("name mismatch", metadata["name"], nm);
@@ -869,7 +867,7 @@ namespace tut
                           (LLSDArray("smethodnb_map_adft")("smethodnb_map_mdft"))
                           (LLSDArray("methodna_map_adft")("methodna_map_mdft"))
                           (LLSDArray("methodnb_map_adft")("methodnb_map_mdft")));
-        foreach(LLSD eq, inArray(equivalences))
+        for (LLSD eq : inArray(equivalences))
         {
             LLSD adft(eq[0]);
             LLSD mdft(eq[1]);
@@ -900,7 +898,7 @@ namespace tut
         // params are required. Also maps containing left requirements for
         // partial defaults arrays. Also defaults maps from defaults arrays.
         LLSD allreq, leftreq, rightdft;
-        foreach(LLSD::String a, ab)
+        for (LLSD::String a : ab)
         {
             // The map in which all params are required uses params[a] as
             // keys, with all isUndefined() as values. We can accomplish that
@@ -923,9 +921,9 @@ namespace tut
         // Generate maps containing parameter names not provided by the
         // dft_map_partial maps.
         LLSD skipreq(allreq);
-        foreach(LLSD::String a, ab)
+        for (LLSD::String a : ab)
         {
-            foreach(const MapEntry& me, inMap(dft_map_partial[a]))
+            for (const MapEntry& me : inMap(dft_map_partial[a]))
             {
                 skipreq[a].erase(me.first);
             }
@@ -969,7 +967,7 @@ namespace tut
                      (LLSDArray("freenb_map_mdft")("smethodnb_map_mdft")("methodnb_map_mdft"))
                      (LLSDArray(LLSD::emptyMap())(dft_map_full["b"])))); // required, optional
 
-        foreach(LLSD grp, inArray(groups))
+        for (LLSD grp : inArray(groups))
         {
             // Internal structure of each group in 'groups':
             LLSD names(grp[0]);
@@ -978,7 +976,7 @@ namespace tut
             cout << "For " << names << ",\n" << "required:\n" << required << "\noptional:\n" << optional << std::endl;
 
             // Loop through 'names'
-            foreach(LLSD nm, inArray(names))
+            for (LLSD nm : inArray(names))
             {
                 LLSD metadata(getMetadata(nm));
                 ensure_equals("name mismatch", metadata["name"], nm);
@@ -1054,7 +1052,7 @@ namespace tut
         // LLSD value matching 'required' according to llsd_matches() rules.
         LLSD matching(LLSDMap("d", 3.14)("array", LLSDArray("answer")(true)(answer)));
         // Okay, walk through 'tests'.
-        foreach(const CallablesTriple& tr, tests)
+        for (const CallablesTriple& tr : tests)
         {
             // Should be able to pass 'answer' to Callables registered
             // without 'required'.
@@ -1100,7 +1098,7 @@ namespace tut
                    ("free0_array")("free0_map")
                    ("smethod0_array")("smethod0_map")
                    ("method0_array")("method0_map"));
-        foreach(LLSD name, inArray(names))
+        for (LLSD name : inArray(names))
         {
             // Look up the Vars instance for this function.
             Vars* vars(varsfor(name));
@@ -1129,9 +1127,9 @@ namespace tut
         // Could have two different too-short arrays, one for *na and one for
         // *nb, but since they both take 5 params...
         LLSD tooshort(LLSDArray("this")("array")("too")("short"));
-        foreach(const LLSD& funcsab, inArray(array_funcs))
+        for (const LLSD& funcsab : inArray(array_funcs))
         {
-            foreach(const llsd::MapEntry& e, inMap(funcsab))
+            for (const llsd::MapEntry& e : inMap(funcsab))
             {
                 call_exc(e.second, tooshort, "requires more arguments");
             }
@@ -1157,7 +1155,7 @@ namespace tut
         argsplus["a"].append("bogus");
         argsplus["b"].append("bogus");
         LLSD expect;
-        foreach(LLSD::String a, ab)
+        for (LLSD::String a : ab)
         {
             expect[a] = zipmap(params[a], args[a]);
         }
@@ -1170,9 +1168,9 @@ namespace tut
         // So i==0 selects 'args', i==1 selects argsplus
         for (LLSD::Integer i(0), iend(argsarrays.size()); i < iend; ++i)
         {
-            foreach(const LLSD& funcsab, inArray(array_funcs))
+            for (const LLSD& funcsab : inArray(array_funcs))
             {
-                foreach(LLSD::String a, ab)
+                for (LLSD::String a : ab)
                 {
                     // Reset the Vars instance before each call
                     Vars* vars(varsfor(funcsab[a]));
@@ -1214,7 +1212,7 @@ namespace tut
                         ("a", LLSDArray(false)(255)(98.6)(1024.5)("pointer"))
                         ("b", LLSDArray("object")(LLUUID::generateNewID())(LLDate::now())(LLURI("http://wiki.lindenlab.com/wiki"))(LLSD::Binary(boost::begin(binary), boost::end(binary)))));
         LLSD array_overfull(array_full);
-        foreach(LLSD::String a, ab)
+        for (LLSD::String a : ab)
         {
             array_overfull[a].append("bogus");
         }
@@ -1227,7 +1225,7 @@ namespace tut
         ensure_not_equals("UUID collision",
                           array_full["b"][1].asUUID(), dft_array_full["b"][1].asUUID());
         LLSD map_full, map_overfull;
-        foreach(LLSD::String a, ab)
+        for (LLSD::String a : ab)
         {
             map_full[a] = zipmap(params[a], array_full[a]);
             map_overfull[a] = map_full[a];
@@ -1267,11 +1265,11 @@ namespace tut
                          ("freenb_map_mdft")   ("smethodnb_map_mdft")   ("methodnb_map_mdft")));
         // Treat (full | overfull) (array | map) the same.
         LLSD argssets(LLSDArray(array_full)(array_overfull)(map_full)(map_overfull));
-        foreach(const LLSD& args, inArray(argssets))
+        for (const LLSD& args : inArray(argssets))
         {
-            foreach(LLSD::String a, ab)
+            for (LLSD::String a : ab)
             {
-                foreach(LLSD::String name, inArray(names[a]))
+                for (LLSD::String name : inArray(names[a]))
                 {
                     // Reset the Vars instance
                     Vars* vars(varsfor(name));
diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp
index bf0a74d10da2d9d1453f94fbb9b39788bf2b0258..d1d3996108c423ed013cd8a11883cc35d67f80a7 100644
--- a/indra/llcommon/tests/llleap_test.cpp
+++ b/indra/llcommon/tests/llleap_test.cpp
@@ -18,7 +18,6 @@
 // external library headers
 #include <boost/assign/list_of.hpp>
 #include <boost/phoenix/core/argument.hpp>
-#include <boost/foreach.hpp>
 // other Linden headers
 #include "../test/lltut.h"
 #include "../test/namedtempfile.h"
diff --git a/indra/llcommon/tests/llprocess_test.cpp b/indra/llcommon/tests/llprocess_test.cpp
index 222d8320843de36a2d2db59b86d74f51a2ff689c..ddb4f3e4e25599cda62c7703a7519b8a0ea55c1f 100644
--- a/indra/llcommon/tests/llprocess_test.cpp
+++ b/indra/llcommon/tests/llprocess_test.cpp
@@ -21,7 +21,6 @@
 // external library headers
 #include "llapr.h"
 #include "apr_thread_proc.h"
-#include <boost/foreach.hpp>
 #include <boost/function.hpp>
 #include <boost/algorithm/string/find_iterator.hpp>
 #include <boost/algorithm/string/finder.hpp>
@@ -297,7 +296,7 @@ namespace tut
     {
 /*==========================================================================*|
         std::string reason_str;
-        BOOST_FOREACH(const ReasonCode& rcp, reasons)
+        for (const ReasonCode& rcp : reasons)
         {
             if (reason == rcp.code)
             {
@@ -519,7 +518,7 @@ namespace tut
         catch (const failure&)
         {
             std::cout << "History:\n";
-            BOOST_FOREACH(const Item& item, history)
+            for (const Item& item : history)
             {
                 std::string what(item.what);
                 if ((! what.empty()) && what[what.length() - 1] == '\n')
diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp
index 6ac974e659383dfe7493595ffd648236f41066a7..ea9d9fc8d20c7ebec801e37e23b133551385b9b8 100644
--- a/indra/llcommon/tests/llsdserialize_test.cpp
+++ b/indra/llcommon/tests/llsdserialize_test.cpp
@@ -45,7 +45,6 @@ typedef U32 uint32_t;
 #endif
 
 #include "boost/range.hpp"
-#include "boost/foreach.hpp"
 #include "boost/function.hpp"
 #include "boost/bind.hpp"
 #include "boost/phoenix/bind/bind_function.hpp"
@@ -1792,7 +1791,7 @@ namespace tut
     // helper for test<3>
     static void writeLLSDArray(std::ostream& out, const LLSD& array)
     {
-        BOOST_FOREACH(LLSD item, llsd::inArray(array))
+        for (LLSD item : llsd::inArray(array))
         {
             LLSDSerialize::toNotation(item, out);
             // It's important to separate with newlines because Python's llsd
diff --git a/indra/llcommon/tests/llstreamqueue_test.cpp b/indra/llcommon/tests/llstreamqueue_test.cpp
index 050ad5c5bff287ddc7bdad0f7ed7f59997c9f123..feb8c9c75cae2e708c1687412e5049af2da5a60a 100644
--- a/indra/llcommon/tests/llstreamqueue_test.cpp
+++ b/indra/llcommon/tests/llstreamqueue_test.cpp
@@ -17,7 +17,6 @@
 #include <vector>
 // std headers
 // external library headers
-#include <boost/foreach.hpp>
 // other Linden headers
 #include "../test/lltut.h"
 #include "stringize.h"
@@ -133,7 +132,7 @@ namespace tut
         std::streamsize leave(5);   // len("craft") above
         std::streamsize skip(total - leave);
         std::streamsize written(0);
-        BOOST_FOREACH(const std::string& block, blocks)
+        for (const std::string& block : blocks)
         {
             written += strq.write(&block[0], block.length());
             ensure_equals("size() after write()", strq.size(), written);
@@ -152,7 +151,7 @@ namespace tut
     {
         set_test_name("concatenate blocks");
         std::string blocks[] = { "abcd", "efghij", "klmnopqrs" };
-        BOOST_FOREACH(const std::string& block, blocks)
+        for (const std::string& block : blocks)
         {
             strq.write(&block[0], block.length());
         }
@@ -170,7 +169,7 @@ namespace tut
     {
         set_test_name("split blocks");
         std::string blocks[] = { "abcdefghijklm", "nopqrstuvwxyz" };
-        BOOST_FOREACH(const std::string& block, blocks)
+        for (const std::string& block : blocks)
         {
             strq.write(&block[0], block.length());
         }
diff --git a/indra/llcommon/tests/lltreeiterators_test.cpp b/indra/llcommon/tests/lltreeiterators_test.cpp
index 1d619867d480c7f120788fe8a141f58b3ab655ab..4d93915405142b8b50ad901f0e78f617fdfd15f1 100644
--- a/indra/llcommon/tests/lltreeiterators_test.cpp
+++ b/indra/llcommon/tests/lltreeiterators_test.cpp
@@ -38,7 +38,6 @@
 // external library headers
 #include <boost/bind.hpp>
 #include <boost/range/iterator_range.hpp>
-#include <boost/foreach.hpp>
 
 // associated header
 #include "../lltreeiterators.h"
@@ -402,7 +401,7 @@ class TreeNode: public LLRefCount
  *
  * Example:
  * @code
- * BOOST_FOREACH(TreeNodePtr node, getRootRange<LLTreeIter::UP>(somenode))
+ * for (TreeNodePtr node : getRootRange<LLTreeIter::UP>(somenode))
  * {
  *     std::cout << node->name() << '\n';
  * }
@@ -424,7 +423,7 @@ getRootRange(const TreeNodePtr& node)
  *
  * Example:
  * @code
- * BOOST_FOREACH(TreeNodePtr node, getWalkRange<LLTreeIter::DFS_PRE>(root))
+ * for (TreeNodePtr node : getWalkRange<LLTreeIter::DFS_PRE>(root))
  * {
  *     std::cout << node->name() << '\n';
  * }
@@ -520,7 +519,7 @@ class EnhancedTreeNode: public LLRefCount
      *
      * Example usage:
      * @code
-     * BOOST_FOREACH(EnhancedTreeNodePtr node, somenode->getRootRange<LLTreeIter::UP>())
+     * for (EnhancedTreeNodePtr node : somenode->getRootRange<LLTreeIter::UP>())
      * {
      *     std::cout << node->name() << '\n';
      * }
@@ -564,7 +563,7 @@ class EnhancedTreeNode: public LLRefCount
      *
      * Example usage:
      * @code
-     * BOOST_FOREACH(EnhancedTreeNodePtr node, somenode->getWalkRange<LLTreeIter::DFS_PRE>())
+     * for (EnhancedTreeNodePtr node : somenode->getWalkRange<LLTreeIter::DFS_PRE>())
      * {
      *     std::cout << node->name() << '\n';
      * }
@@ -644,7 +643,7 @@ LLLinkedIter<PlainTree> PlainTree_child_end(PlainTree* node)
  *
  * Example:
  * @code
- * BOOST_FOREACH(PlainTree* node, getRootRange<LLTreeIter::UP>(somenode))
+ * for (PlainTree* node : getRootRange<LLTreeIter::UP>(somenode))
  * {
  *     std::cout << node->name() << '\n';
  * }
@@ -668,7 +667,7 @@ getRootRange(PlainTree* node)
  *
  * Example:
  * @code
- * BOOST_FOREACH(PlainTree* node, getWalkRange<LLTreeIter::DFS_PRE>(root))
+ * for (PlainTree* node : getWalkRange<LLTreeIter::DFS_PRE>(root))
  * {
  *     std::cout << node->name() << '\n';
  * }
@@ -1103,18 +1102,18 @@ namespace tut
         // This test function illustrates the looping techniques described in the
         // comments for the getRootRange() free function, the
         // EnhancedTreeNode::root_range template and the
-        // EnhancedTreeNode::getRootRange() method. Obviously the BOOST_FOREACH()
+        // EnhancedTreeNode::getRootRange() method. Obviously the range-for()
         // forms are more succinct.
         TreeNodePtr tnroot(example_tree<TreeNode>());
         TreeNodePtr tnB2b(get_B2b<TreeNode, TreeNode::child_iterator>
                           (tnroot, boost::bind(&TreeNode::child_begin, _1)));
     
-        std::string desc1("BOOST_FOREACH(TreeNodePr, getRootRange<LLTreeIter::UP>(tnB2b))");
+        std::string desc1("for (TreeNodePr : getRootRange<LLTreeIter::UP>(tnB2b))");
 //      std::cout << desc1 << "\n";
         // Although we've commented out the output statement, ensure that the
         // loop construct is still valid, as promised by the getRootRange()
         // documentation.
-        BOOST_FOREACH(TreeNodePtr node, getRootRange<LLTreeIter::UP>(tnB2b))
+        for (TreeNodePtr node : getRootRange<LLTreeIter::UP>(tnB2b))
         {
 //          std::cout << node->name() << '\n';
         }
@@ -1137,9 +1136,9 @@ namespace tut
 //          std::cout << (*ri)->name() << '\n';
         }
 
-        std::string desc2("BOOST_FOREACH(EnhancedTreeNodePtr node, etnB2b->getRootRange<LLTreeIter::UP>())");
+        std::string desc2("for (EnhancedTreeNodePtr node : etnB2b->getRootRange<LLTreeIter::UP>())");
 //      std::cout << desc2 << '\n';
-        BOOST_FOREACH(EnhancedTreeNodePtr node, etnB2b->getRootRange<LLTreeIter::UP>())
+        for (EnhancedTreeNodePtr node : etnB2b->getRootRange<LLTreeIter::UP>())
         {
 //          std::cout << node->name() << '\n';
         }
diff --git a/indra/test/test.cpp b/indra/test/test.cpp
index b14c2eb255a5a1ca657b426749315cb3602808f5..ef7a121cf50e9fd9f28ccfe629fb64eb36ad9048 100644
--- a/indra/test/test.cpp
+++ b/indra/test/test.cpp
@@ -393,7 +393,7 @@ class LLTCTestCallback : public LLTestCallback
 	{
 		// Per http://confluence.jetbrains.net/display/TCD65/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ServiceMessages
 		std::string result;
-		BOOST_FOREACH(char c, str)
+		for (char c : str)
 		{
 			switch (c)
 			{