Fix C++0x incompatibility. The signature of std::make_pair<> changes from:
authorNick Lewycky <nicholas@mxc.ca>
Tue, 22 Feb 2011 22:48:47 +0000 (22:48 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Tue, 22 Feb 2011 22:48:47 +0000 (22:48 +0000)
  template <class T1, class T2> pair<T1,T2> make_pair(const T1&, const T2&);
to
  template <class T1, class T2> pair<V1, V2> make_pair(T1&&, T2&&);
so explicitly specifying the template arguments to make_pair<> is going to break
when C++0x rolls through. Replace them with equivalent std::pair<>. Patch by
James Dennett!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126256 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/ImmutableIntervalMap.h
include/llvm/ADT/ImmutableMap.h

index d3196ca23df90289663acefe9af054a9eeb30ba5..0d8fcf3433855762cb160fce6e519875f4893608 100644 (file)
@@ -215,7 +215,7 @@ public:
 
     ImmutableIntervalMap add(ImmutableIntervalMap Old, 
                              key_type_ref K, data_type_ref D) {
-      TreeTy *T = F.add(Old.Root, std::make_pair<key_type, data_type>(K, D));
+      TreeTy *T = F.add(Old.Root, std::pair<key_type, data_type>(K, D));
       return ImmutableIntervalMap(F.getCanonicalTree(T));
     }
 
index e439a099482196cbd79e042d428e4b8509a9cbbd..d6cce7ccfa05f30e5485612c28858bdd8b2cbb55 100644 (file)
@@ -108,7 +108,7 @@ public:
     ImmutableMap getEmptyMap() { return ImmutableMap(F.getEmptyTree()); }
 
     ImmutableMap add(ImmutableMap Old, key_type_ref K, data_type_ref D) {
-      TreeTy *T = F.add(Old.Root, std::make_pair<key_type,data_type>(K,D));
+      TreeTy *T = F.add(Old.Root, std::pair<key_type,data_type>(K,D));
       return ImmutableMap(Canonicalize ? F.getCanonicalTree(T): T);
     }