Index: src/AST/Convert.cpp
===================================================================
--- src/AST/Convert.cpp	(revision e4d7c1c357a5b1b2a17a980a263be977539b988b)
+++ src/AST/Convert.cpp	(revision db6cdc0f7e39fa424be65d849107ecd0c1e8e90b)
@@ -1876,5 +1876,5 @@
 		auto&& type = GET_ACCEPT_1(type, Type);
 		auto&& attr = GET_ACCEPT_V(attributes, Attribute);
- 
+
 		auto decl = new ast::InlineMemberDecl(
 			old->location,
Index: src/AST/Decl.hpp
===================================================================
--- src/AST/Decl.hpp	(revision e4d7c1c357a5b1b2a17a980a263be977539b988b)
+++ src/AST/Decl.hpp	(revision db6cdc0f7e39fa424be65d849107ecd0c1e8e90b)
@@ -398,4 +398,5 @@
 };
 
+/// Static Assertion `_Static_assert( ... , ... );`
 class StaticAssertDecl : public Decl {
 public:
@@ -412,4 +413,5 @@
 };
 
+/// Inline Member Declaration `inline TypeName;`
 class InlineMemberDecl final : public DeclWithType {
 public:
@@ -429,4 +431,5 @@
 	MUTATE_FRIEND
 };
+
 }
 
Index: src/AST/Pass.hpp
===================================================================
--- src/AST/Pass.hpp	(revision e4d7c1c357a5b1b2a17a980a263be977539b988b)
+++ src/AST/Pass.hpp	(revision db6cdc0f7e39fa424be65d849107ecd0c1e8e90b)
@@ -141,5 +141,5 @@
 	const ast::DirectiveDecl *    visit( const ast::DirectiveDecl        * ) override final;
 	const ast::StaticAssertDecl * visit( const ast::StaticAssertDecl     * ) override final;
-	const ast::DeclWithType	*     visit( const ast::InlineMemberDecl      * ) override final;
+	const ast::DeclWithType	*     visit( const ast::InlineMemberDecl     * ) override final;
 	const ast::CompoundStmt *     visit( const ast::CompoundStmt         * ) override final;
 	const ast::Stmt *             visit( const ast::ExprStmt             * ) override final;
Index: src/AST/Pass.impl.hpp
===================================================================
--- src/AST/Pass.impl.hpp	(revision e4d7c1c357a5b1b2a17a980a263be977539b988b)
+++ src/AST/Pass.impl.hpp	(revision db6cdc0f7e39fa424be65d849107ecd0c1e8e90b)
@@ -810,5 +810,5 @@
 
 //--------------------------------------------------------------------------
-// DeclWithType
+// InlineMemberDecl
 template< typename core_t >
 const ast::DeclWithType * ast::Pass< core_t >::visit( const ast::InlineMemberDecl * node ) {
Index: src/AST/Visitor.hpp
===================================================================
--- src/AST/Visitor.hpp	(revision e4d7c1c357a5b1b2a17a980a263be977539b988b)
+++ src/AST/Visitor.hpp	(revision db6cdc0f7e39fa424be65d849107ecd0c1e8e90b)
@@ -33,5 +33,5 @@
     virtual const ast::DirectiveDecl *    visit( const ast::DirectiveDecl        * ) = 0;
     virtual const ast::StaticAssertDecl * visit( const ast::StaticAssertDecl     * ) = 0;
-    virtual const ast::DeclWithType *     visit( const ast::InlineMemberDecl      * ) = 0;
+    virtual const ast::DeclWithType *     visit( const ast::InlineMemberDecl     * ) = 0;
     virtual const ast::CompoundStmt *     visit( const ast::CompoundStmt         * ) = 0;
     virtual const ast::Stmt *             visit( const ast::ExprStmt             * ) = 0;
Index: src/Common/utility.h
===================================================================
--- src/Common/utility.h	(revision e4d7c1c357a5b1b2a17a980a263be977539b988b)
+++ src/Common/utility.h	(revision db6cdc0f7e39fa424be65d849107ecd0c1e8e90b)
@@ -461,16 +461,22 @@
 	Iterables iterables;
 
+	// Getting the iterator and value types this way preserves const.
 	template<size_t I> using Iter = decltype(std::get<I>(iterables).begin());
 	template<size_t I> using Data = decltype(*std::get<I>(iterables).begin());
 	template<typename> struct base_iterator;
 
-	template<std::size_t... Is>
-	struct base_iterator<std::integer_sequence<std::size_t, Is...>> {
-		using value_type = std::tuple< Data<Is>... >;
-		std::tuple<Iter<Is>...> iterators;
-
-		base_iterator( Iter<Is>... is ) : iterators( is... ) {}
+	// This inner template puts the sequence of `0, 1, ... sizeof...(Args)-1`
+	// into a pack. These are the indexes into the tuples, so unpacking can
+	// go over each element of the tuple.
+	// The std::integer_sequence is just used to build that sequence.
+	// A library reference will probably explain it better than I can.
+	template<std::size_t... Indices>
+	struct base_iterator<std::integer_sequence<std::size_t, Indices...>> {
+		using value_type = std::tuple< Data<Indices>... >;
+		std::tuple<Iter<Indices>...> iterators;
+
+		base_iterator( Iter<Indices>... is ) : iterators( is... ) {}
 		base_iterator operator++() {
-			return base_iterator( ++std::get<Is>( iterators )... );
+			return base_iterator( ++std::get<Indices>( iterators )... );
 		}
 		bool operator!=( const base_iterator& other ) const {
@@ -478,12 +484,12 @@
 		}
 		value_type operator*() const {
-			return std::tie( *std::get<Is>( iterators )... );
+			return std::tie( *std::get<Indices>( iterators )... );
 		}
 
 		static base_iterator make_begin( Iterables & data ) {
-			return base_iterator( std::get<Is>( data ).begin()... );
+			return base_iterator( std::get<Indices>( data ).begin()... );
 		}
 		static base_iterator make_end( Iterables & data ) {
-			return base_iterator( std::get<Is>( data ).end()... );
+			return base_iterator( std::get<Indices>( data ).end()... );
 		}
 	};
Index: src/GenPoly/ErasableScopedMap.h
===================================================================
--- src/GenPoly/ErasableScopedMap.h	(revision e4d7c1c357a5b1b2a17a980a263be977539b988b)
+++ src/GenPoly/ErasableScopedMap.h	(revision db6cdc0f7e39fa424be65d849107ecd0c1e8e90b)
@@ -23,256 +23,268 @@
 
 namespace GenPoly {
-	/// A map where the items are placed into nested scopes;
-	/// inserted items are placed into the innermost scope, lookup looks from the innermost scope outward;
-	/// erasing a key means that find() will no longer report any instance of the key in a scope further
-	/// out, but the erasure itself is scoped. Key erasure works by inserting a sentinal value into the
-	/// value field, and thus only works for Value types where a meaningful sentinal can be chosen.
-	template<typename Key, typename Value>
-	class ErasableScopedMap {
-		typedef std::map< Key, Value > Scope;
-		typedef std::vector< Scope > ScopeList;
-
-		ScopeList scopes; ///< scoped list of maps
-		Value erased;     ///< sentinal value for erased keys
-	public:
-		typedef typename Scope::key_type key_type;
-		typedef typename Scope::mapped_type mapped_type;
-		typedef typename Scope::value_type value_type;
-		typedef typename ScopeList::size_type size_type;
-		typedef typename ScopeList::difference_type difference_type;
-		typedef typename Scope::reference reference;
-		typedef typename Scope::const_reference const_reference;
-		typedef typename Scope::pointer pointer;
-		typedef typename Scope::const_pointer const_pointer;
-
-		class iterator : public std::iterator< std::bidirectional_iterator_tag,
-		                                       value_type > {
-		friend class ErasableScopedMap;
-		friend class const_iterator;
-			typedef typename std::map< Key, Value >::iterator wrapped_iterator;
-			typedef typename std::vector< std::map< Key, Value > > scope_list;
-			typedef typename scope_list::size_type size_type;
-
-			/// Checks if this iterator points to a valid item
-			bool is_valid() const {
-				return it != map->scopes[i].end() && it->second != map->erased;
+
+/// A map where the items are placed into nested scopes.
+/// Inserted items are placed into the innermost scope, lookup looks from the
+/// innermost scope outward. Erasing a key means that find() will no longer
+/// report any instance of the key in a scope further out, but the erasure
+/// itself is scoped. Key erasure works by inserting a sentinal value into
+/// the value field, and thus only works for Value types where a meaningful
+/// sentinal can be chosen.
+template<typename Key, typename Value>
+class ErasableScopedMap {
+	typedef std::map< Key, Value > Scope;
+	typedef std::vector< Scope > ScopeList;
+
+	/// Scoped list of maps.
+	ScopeList scopes;
+	/// Sentinal value for erased keys.
+	Value erased;
+public:
+	typedef typename Scope::key_type key_type;
+	typedef typename Scope::mapped_type mapped_type;
+	typedef typename Scope::value_type value_type;
+	typedef typename ScopeList::size_type size_type;
+	typedef typename ScopeList::difference_type difference_type;
+	typedef typename Scope::reference reference;
+	typedef typename Scope::const_reference const_reference;
+	typedef typename Scope::pointer pointer;
+	typedef typename Scope::const_pointer const_pointer;
+
+	// Both iterator types are complete bidirection iterators, defined below.
+	class iterator;
+	class const_iterator;
+
+	/// Starts a new scope
+	void beginScope() {
+		Scope scope;
+		scopes.push_back(scope);
+	}
+
+	/// Ends a scope; invalidates any iterators pointing to elements of that scope
+	void endScope() {
+		scopes.pop_back();
+		assert( ! scopes.empty() );
+	}
+
+	/// Default constructor initializes with one scope
+	ErasableScopedMap( const Value &erased_ ) : erased( erased_ ) { beginScope(); }
+
+	iterator begin() { return iterator(*this, scopes.back().begin(), scopes.size()-1).next_valid(); }
+	const_iterator begin() const { return const_iterator(*this, scopes.back().begin(), scopes.size()-1).next_valid(); }
+	const_iterator cbegin() const { return const_iterator(*this, scopes.back().begin(), scopes.size()-1).next_valid(); }
+	iterator end() { return iterator(*this, scopes[0].end(), 0); }
+	const_iterator end() const { return const_iterator(*this, scopes[0].end(), 0); }
+	const_iterator cend() const { return const_iterator(*this, scopes[0].end(), 0); }
+
+	/// Gets the index of the current scope (counted from 1)
+	size_type currentScope() const { return scopes.size(); }
+
+	/// Finds the given key in the outermost scope it occurs; returns end() for none such
+	iterator find( const Key &key ) {
+		for ( size_type i = scopes.size() - 1; ; --i ) {
+			typename Scope::iterator val = scopes[i].find( key );
+			if ( val != scopes[i].end() ) {
+				return val->second == erased ? end() : iterator( *this, val, i );
 			}
-
-			/// Increments on invalid
-			iterator& next_valid() {
-				if ( ! is_valid() ) { ++(*this); }
-				return *this;
+			if ( i == 0 ) break;
+		}
+		return end();
+	}
+	const_iterator find( const Key &key ) const {
+		return const_iterator( const_cast< ErasableScopedMap< Key, Value >* >(this)->find( key ) );
+	}
+
+	/// Finds the given key in the outermost scope inside the given scope where it occurs
+	iterator findNext( const_iterator &it, const Key &key ) {
+		if ( it.i == 0 ) return end();
+		for ( size_type i = it.i - 1; ; --i ) {
+			typename Scope::iterator val = scopes[i].find( key );
+			if ( val != scopes[i].end() ) {
+				return val->second == erased ? end() : iterator( *this, val, i );
 			}
-
-			/// Decrements on invalid
-			iterator& prev_valid() {
-				if ( ! is_valid() ) { --(*this); }
-				return *this;
-			}
-			
-			iterator(ErasableScopedMap< Key, Value > const &_map, const wrapped_iterator &_it, size_type _i)
-					: map(&_map), it(_it), i(_i) {}
-			
-		public:
-			iterator(const iterator &that) : map(that.map), it(that.it), i(that.i) {}
-			iterator& operator= (const iterator &that) {
-				map = that.map; i = that.i; it = that.it;
-				return *this;
-			}
-
-			reference operator* () { return *it; }
-			pointer operator-> () { return it.operator->(); }
-
-			iterator& operator++ () {
-				if ( it == map->scopes[i].end() ) {
-					if ( i == 0 ) return *this;
-					--i;
-					it = map->scopes[i].begin();
-				} else {
-					++it;
-				}
-				return next_valid();
-			}
-			iterator& operator++ (int) { iterator tmp = *this; ++(*this); return tmp; }
-
-			iterator& operator-- () {
-				// may fail if this is the begin iterator; allowed by STL spec
-				if ( it == map->scopes[i].begin() ) {
-					++i;
-					it = map->scopes[i].end();
-				}
-				--it;
-				return prev_valid();
-			}
-			iterator& operator-- (int) { iterator tmp = *this; --(*this); return tmp; }
-
-			bool operator== (const iterator &that) {
-				return map == that.map && i == that.i && it == that.it;
-			}
-			bool operator!= (const iterator &that) { return !( *this == that ); }
-
-		private:
-			ErasableScopedMap< Key, Value > const *map;
-			wrapped_iterator it;
-			size_type i;
-		};
-
-		class const_iterator : public std::iterator< std::bidirectional_iterator_tag,
-		                                             value_type > {
-		friend class ErasableScopedMap;
-			typedef typename std::map< Key, Value >::iterator wrapped_iterator;
-			typedef typename std::map< Key, Value >::const_iterator wrapped_const_iterator;
-			typedef typename std::vector< std::map< Key, Value > > scope_list;
-			typedef typename scope_list::size_type size_type;
-
-			/// Checks if this iterator points to a valid item
-			bool is_valid() const {
-				return it != map->scopes[i].end() && it->second != map->erased;
-			}
-
-			/// Increments on invalid
-			const_iterator& next_valid() {
-				if ( ! is_valid() ) { ++(*this); }
-				return *this;
-			}
-
-			/// Decrements on invalid
-			const_iterator& prev_valid() {
-				if ( ! is_valid() ) { --(*this); }
-				return *this;
-			}
-			
-			const_iterator(ErasableScopedMap< Key, Value > const &_map, const wrapped_const_iterator &_it, size_type _i)
-					: map(&_map), it(_it), i(_i) {}
-		public:
-			const_iterator(const iterator &that) : map(that.map), it(that.it), i(that.i) {}
-			const_iterator(const const_iterator &that) : map(that.map), it(that.it), i(that.i) {}
-			const_iterator& operator= (const iterator &that) {
-				map = that.map; i = that.i; it = that.it;
-				return *this;
-			}
-			const_iterator& operator= (const const_iterator &that) {
-				map = that.map; i = that.i; it = that.it;
-				return *this;
-			}
-
-			const_reference operator* () { return *it; }
-			const_pointer operator-> () { return it.operator->(); }
-
-			const_iterator& operator++ () {
-				if ( it == map->scopes[i].end() ) {
-					if ( i == 0 ) return *this;
-					--i;
-					it = map->scopes[i].begin();
-				} else {
-					++it;
-				}
-				return next_valid();
-			}
-			const_iterator& operator++ (int) { const_iterator tmp = *this; ++(*this); return tmp; }
-
-			const_iterator& operator-- () {
-				// may fail if this is the begin iterator; allowed by STL spec
-				if ( it == map->scopes[i].begin() ) {
-					++i;
-					it = map->scopes[i].end();
-				}
-				--it;
-				return prev_valid();
-			}
-			const_iterator& operator-- (int) { const_iterator tmp = *this; --(*this); return tmp; }
-
-			bool operator== (const const_iterator &that) {
-				return map == that.map && i == that.i && it == that.it;
-			}
-			bool operator!= (const const_iterator &that) { return !( *this == that ); }
-
-		private:
-			ErasableScopedMap< Key, Value > const *map;
-			wrapped_const_iterator it;
-			size_type i;
-		};
-
-		/// Starts a new scope
-		void beginScope() {
-			Scope scope;
-			scopes.push_back(scope);
-		}
-
-		/// Ends a scope; invalidates any iterators pointing to elements of that scope
-		void endScope() {
-			scopes.pop_back();
-			assert( ! scopes.empty() );
-		}
-
-		/// Default constructor initializes with one scope
-		ErasableScopedMap( const Value &erased_ ) : erased( erased_ ) { beginScope(); }
-
-		iterator begin() { return iterator(*this, scopes.back().begin(), scopes.size()-1).next_valid(); }
-		const_iterator begin() const { return const_iterator(*this, scopes.back().begin(), scopes.size()-1).next_valid(); }
-		const_iterator cbegin() const { return const_iterator(*this, scopes.back().begin(), scopes.size()-1).next_valid(); }
-		iterator end() { return iterator(*this, scopes[0].end(), 0); }
-		const_iterator end() const { return const_iterator(*this, scopes[0].end(), 0); }
-		const_iterator cend() const { return const_iterator(*this, scopes[0].end(), 0); }
-
-		/// Gets the index of the current scope (counted from 1)
-		size_type currentScope() const { return scopes.size(); }
-
-		/// Finds the given key in the outermost scope it occurs; returns end() for none such
-		iterator find( const Key &key ) {
-			for ( size_type i = scopes.size() - 1; ; --i ) {
-				typename Scope::iterator val = scopes[i].find( key );
-				if ( val != scopes[i].end() ) {
-					return val->second == erased ? end() : iterator( *this, val, i );
-				}
-				if ( i == 0 ) break;
-			}
-			return end();
-		}
-		const_iterator find( const Key &key ) const {
-				return const_iterator( const_cast< ErasableScopedMap< Key, Value >* >(this)->find( key ) );
-		}
-
-		/// Finds the given key in the outermost scope inside the given scope where it occurs
-		iterator findNext( const_iterator &it, const Key &key ) {
-			if ( it.i == 0 ) return end();
-			for ( size_type i = it.i - 1; ; --i ) {
-				typename Scope::iterator val = scopes[i].find( key );
-				if ( val != scopes[i].end() ) {
-					return val->second == erased ? end() : iterator( *this, val, i );
-				}
-				if ( i == 0 ) break;
-			}
-			return end();
-		}
-		const_iterator findNext( const_iterator &it, const Key &key ) const {
-				return const_iterator( const_cast< ErasableScopedMap< Key, Value >* >(this)->findNext( it, key ) );
-		}
-
-		/// Inserts the given key-value pair into the outermost scope
-		std::pair< iterator, bool > insert( const value_type &value ) {
-			std::pair< typename Scope::iterator, bool > res = scopes.back().insert( value );
-			return std::make_pair( iterator(*this, res.first, scopes.size()-1), res.second );
-		}
-		std::pair< iterator, bool > insert( const Key &key, const Value &value ) { return insert( std::make_pair( key, value ) ); }
-
-		/// Marks the given element as erased from this scope inward; returns 1 for erased an element, 0 otherwise
-		size_type erase( const Key &key ) {
-			typename Scope::iterator val = scopes.back().find( key );
-			if ( val != scopes.back().end() ) {
-				val->second = erased;
-				return 1;
-			} else {
-				scopes.back().insert( val, std::make_pair( key, erased ) );
-				return 0;
-			}
-		}
-
-		Value& operator[] ( const Key &key ) {
-			iterator slot = find( key );
-			if ( slot != end() ) return slot->second;
-			return insert( key, Value() ).first->second;
-		}
-	};
+			if ( i == 0 ) break;
+		}
+		return end();
+	}
+	const_iterator findNext( const_iterator &it, const Key &key ) const {
+		return const_iterator( const_cast< ErasableScopedMap< Key, Value >* >(this)->findNext( it, key ) );
+	}
+
+	/// Inserts the given key-value pair into the outermost scope
+	std::pair< iterator, bool > insert( const value_type &value ) {
+		std::pair< typename Scope::iterator, bool > res = scopes.back().insert( value );
+		return std::make_pair( iterator(*this, res.first, scopes.size()-1), res.second );
+	}
+	std::pair< iterator, bool > insert( const Key &key, const Value &value ) { return insert( std::make_pair( key, value ) ); }
+
+	/// Marks the given element as erased from this scope inward; returns 1 for erased an element, 0 otherwise
+	size_type erase( const Key &key ) {
+		typename Scope::iterator val = scopes.back().find( key );
+		if ( val != scopes.back().end() ) {
+			val->second = erased;
+			return 1;
+		} else {
+			scopes.back().insert( val, std::make_pair( key, erased ) );
+			return 0;
+		}
+	}
+
+	Value& operator[] ( const Key &key ) {
+		iterator slot = find( key );
+		if ( slot != end() ) return slot->second;
+		return insert( key, Value() ).first->second;
+	}
+};
+
+template<typename Key, typename Value>
+class ErasableScopedMap<Key, Value>::iterator :
+		public std::iterator< std::bidirectional_iterator_tag, value_type > {
+	friend class ErasableScopedMap;
+	typedef typename std::map< Key, Value >::iterator wrapped_iterator;
+	typedef typename std::vector< std::map< Key, Value > > scope_list;
+	typedef typename scope_list::size_type size_type;
+
+	/// Checks if this iterator points to a valid item
+	bool is_valid() const {
+		return it != map->scopes[i].end() && it->second != map->erased;
+	}
+
+	/// Increments on invalid
+	iterator& next_valid() {
+		if ( ! is_valid() ) { ++(*this); }
+		return *this;
+	}
+
+	/// Decrements on invalid
+	iterator& prev_valid() {
+		if ( ! is_valid() ) { --(*this); }
+		return *this;
+	}
+
+	iterator(ErasableScopedMap< Key, Value > const &_map, const wrapped_iterator &_it, size_type _i)
+			: map(&_map), it(_it), i(_i) {}
+
+public:
+	iterator(const iterator &that) : map(that.map), it(that.it), i(that.i) {}
+	iterator& operator= (const iterator &that) {
+		map = that.map; i = that.i; it = that.it;
+		return *this;
+	}
+
+	reference operator* () { return *it; }
+	pointer operator-> () { return it.operator->(); }
+
+	iterator& operator++ () {
+		if ( it == map->scopes[i].end() ) {
+			if ( i == 0 ) return *this;
+			--i;
+			it = map->scopes[i].begin();
+		} else {
+			++it;
+		}
+		return next_valid();
+	}
+
+	iterator& operator++ (int) { iterator tmp = *this; ++(*this); return tmp; }
+
+	iterator& operator-- () {
+		// may fail if this is the begin iterator; allowed by STL spec
+		if ( it == map->scopes[i].begin() ) {
+			++i;
+			it = map->scopes[i].end();
+		}
+		--it;
+		return prev_valid();
+	}
+	iterator& operator-- (int) { iterator tmp = *this; --(*this); return tmp; }
+
+	bool operator== (const iterator &that) {
+		return map == that.map && i == that.i && it == that.it;
+	}
+	bool operator!= (const iterator &that) { return !( *this == that ); }
+
+private:
+	ErasableScopedMap< Key, Value > const *map;
+	wrapped_iterator it;
+	size_type i;
+};
+
+template<typename Key, typename Value>
+class ErasableScopedMap<Key, Value>::const_iterator :
+		public std::iterator< std::bidirectional_iterator_tag, value_type > {
+	friend class ErasableScopedMap;
+	typedef typename std::map< Key, Value >::iterator wrapped_iterator;
+	typedef typename std::map< Key, Value >::const_iterator wrapped_const_iterator;
+	typedef typename std::vector< std::map< Key, Value > > scope_list;
+	typedef typename scope_list::size_type size_type;
+
+	/// Checks if this iterator points to a valid item
+	bool is_valid() const {
+		return it != map->scopes[i].end() && it->second != map->erased;
+	}
+
+	/// Increments on invalid
+	const_iterator& next_valid() {
+		if ( ! is_valid() ) { ++(*this); }
+		return *this;
+	}
+
+	/// Decrements on invalid
+	const_iterator& prev_valid() {
+		if ( ! is_valid() ) { --(*this); }
+		return *this;
+	}
+
+	const_iterator(ErasableScopedMap< Key, Value > const &_map, const wrapped_const_iterator &_it, size_type _i)
+			: map(&_map), it(_it), i(_i) {}
+public:
+	const_iterator(const iterator &that) : map(that.map), it(that.it), i(that.i) {}
+	const_iterator(const const_iterator &that) : map(that.map), it(that.it), i(that.i) {}
+	const_iterator& operator= (const iterator &that) {
+		map = that.map; i = that.i; it = that.it;
+		return *this;
+	}
+	const_iterator& operator= (const const_iterator &that) {
+		map = that.map; i = that.i; it = that.it;
+		return *this;
+	}
+
+	const_reference operator* () { return *it; }
+	const_pointer operator-> () { return it.operator->(); }
+
+	const_iterator& operator++ () {
+		if ( it == map->scopes[i].end() ) {
+			if ( i == 0 ) return *this;
+			--i;
+			it = map->scopes[i].begin();
+		} else {
+			++it;
+		}
+		return next_valid();
+	}
+	const_iterator& operator++ (int) { const_iterator tmp = *this; ++(*this); return tmp; }
+
+	const_iterator& operator-- () {
+		// may fail if this is the begin iterator; allowed by STL spec
+		if ( it == map->scopes[i].begin() ) {
+			++i;
+			it = map->scopes[i].end();
+		}
+		--it;
+		return prev_valid();
+	}
+	const_iterator& operator-- (int) { const_iterator tmp = *this; --(*this); return tmp; }
+
+	bool operator== (const const_iterator &that) {
+		return map == that.map && i == that.i && it == that.it;
+	}
+	bool operator!= (const const_iterator &that) { return !( *this == that ); }
+
+private:
+	ErasableScopedMap< Key, Value > const *map;
+	wrapped_const_iterator it;
+	size_type i;
+};
+
 } // namespace GenPoly
 
Index: src/Validate/EnumAndPointerDecay.cpp
===================================================================
--- src/Validate/EnumAndPointerDecay.cpp	(revision e4d7c1c357a5b1b2a17a980a263be977539b988b)
+++ src/Validate/EnumAndPointerDecay.cpp	(revision db6cdc0f7e39fa424be65d849107ecd0c1e8e90b)
@@ -41,22 +41,25 @@
 	auto mut = ast::mutate( decl );
 	std::vector<ast::ptr<ast::Decl>> buffer;
-	for ( auto it = decl->members.begin(); it != decl->members.end(); ++it ) {
-		if ( ast::ObjectDecl const * object = (*it).as<ast::ObjectDecl>() ) {
-			buffer.push_back( ast::mutate_field( object, &ast::ObjectDecl::type, new ast::EnumInstType( decl, ast::CV::Const ) ) );
-		} else if ( ast::InlineMemberDecl const * value = (*it).as<ast::InlineMemberDecl>() ) {
+	for ( auto member : decl->members ) {
+		if ( ast::ObjectDecl const * object = member.as<ast::ObjectDecl>() ) {
+			buffer.push_back( ast::mutate_field( object,
+				&ast::ObjectDecl::type,
+				new ast::EnumInstType( decl, ast::CV::Const ) ) );
+		} else if ( auto value = member.as<ast::InlineMemberDecl>() ) {
 			if ( auto targetEnum = symtab.lookupEnum( value->name ) ) {
-				for ( auto singleMember : targetEnum->members ) {
-					auto copyingMember = singleMember.as<ast::ObjectDecl>();
+				for ( auto enumMember : targetEnum->members ) {
+					auto enumObject = enumMember.strict_as<ast::ObjectDecl>();
 					buffer.push_back( new ast::ObjectDecl(
-						value->location, // use the "inline" location
-						copyingMember->name,
+						// Get the location from the "inline" declaration.
+						value->location,
+						enumObject->name,
+						// Construct a new EnumInstType as the type.
 						new ast::EnumInstType( decl, ast::CV::Const ),
-						// Construct a new EnumInstType as the type
-						copyingMember->init,
-						copyingMember->storage,
-						copyingMember->linkage,
-						copyingMember->bitfieldWidth,
+						enumObject->init,
+						enumObject->storage,
+						enumObject->linkage,
+						enumObject->bitfieldWidth,
 						{},
-						copyingMember->funcSpec
+						enumObject->funcSpec
 					) );
 				}
