From 9e29d95f363b654f8b89770f8291f663039d9d02 Mon Sep 17 00:00:00 2001 From: Francois Pichet Date: Thu, 14 Feb 2013 03:24:14 +0000 Subject: [PATCH] Add missing typename to unbreak the MSVC 2012 build. llvm-svn: 175129 --- include/llvm/ADT/ImmutableMap.h | 10 +++++----- include/llvm/ADT/ImmutableSet.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/llvm/ADT/ImmutableMap.h b/include/llvm/ADT/ImmutableMap.h index 81ac9cc31d7..a667479a4d1 100644 --- a/include/llvm/ADT/ImmutableMap.h +++ b/include/llvm/ADT/ImmutableMap.h @@ -211,13 +211,13 @@ public: friend class ImmutableMap; public: - typedef ImmutableMap::value_type value_type; - typedef ImmutableMap::value_type_ref reference; - typedef iterator::value_type *pointer; + typedef typename ImmutableMap::value_type value_type; + typedef typename ImmutableMap::value_type_ref reference; + typedef typename iterator::value_type *pointer; typedef std::bidirectional_iterator_tag iterator_category; - iterator::reference operator*() const { return itr->getValue(); } - iterator::pointer operator->() const { return &itr->getValue(); } + typename iterator::reference operator*() const { return itr->getValue(); } + typename iterator::pointer operator->() const { return &itr->getValue(); } key_type_ref getKey() const { return itr->getValue().first; } data_type_ref getData() const { return itr->getValue().second; } diff --git a/include/llvm/ADT/ImmutableSet.h b/include/llvm/ADT/ImmutableSet.h index 4c3c3a0d6df..fbdf066e61a 100644 --- a/include/llvm/ADT/ImmutableSet.h +++ b/include/llvm/ADT/ImmutableSet.h @@ -1060,13 +1060,13 @@ public: friend class ImmutableSet; public: - typedef ImmutableSet::value_type value_type; - typedef ImmutableSet::value_type_ref reference; - typedef iterator::value_type *pointer; + typedef typename ImmutableSet::value_type value_type; + typedef typename ImmutableSet::value_type_ref reference; + typedef typename iterator::value_type *pointer; typedef std::bidirectional_iterator_tag iterator_category; - iterator::reference operator*() const { return itr->getValue(); } - iterator::pointer operator->() const { return &(operator*()); } + typename iterator::reference operator*() const { return itr->getValue(); } + typename iterator::pointer operator->() const { return &(operator*()); } iterator& operator++() { ++itr; return *this; } iterator operator++(int) { iterator tmp(*this); ++itr; return tmp; }