[llvm-commits] [llvm] r126256 - in /llvm/trunk/include/llvm/ADT: ImmutableIntervalMap.h ImmutableMap.h
Nick Lewycky
nicholas at mxc.ca
Tue Feb 22 14:48:47 PST 2011
Author: nicholas
Date: Tue Feb 22 16:48:47 2011
New Revision: 126256
URL: http://llvm.org/viewvc/llvm-project?rev=126256&view=rev
Log:
Fix C++0x incompatibility. The signature of std::make_pair<> changes from:
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!
Modified:
llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h
llvm/trunk/include/llvm/ADT/ImmutableMap.h
Modified: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h?rev=126256&r1=126255&r2=126256&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h (original)
+++ llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Tue Feb 22 16:48:47 2011
@@ -215,7 +215,7 @@
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));
}
Modified: llvm/trunk/include/llvm/ADT/ImmutableMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableMap.h?rev=126256&r1=126255&r2=126256&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/ImmutableMap.h (original)
+++ llvm/trunk/include/llvm/ADT/ImmutableMap.h Tue Feb 22 16:48:47 2011
@@ -108,7 +108,7 @@
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);
}
More information about the llvm-commits
mailing list