diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-21 06:21:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-21 06:21:31 +0000 |
commit | c30a38f34bdfecb99ce49e3ffa479039c9bf0209 (patch) | |
tree | b67b287ea26fb1e9ec63d50cfc1ad665ab506414 /include/llvm/ADT/STLExtras.h | |
parent | dbd4fe2b0ada8014c2c8e042651de5799a1d4c5d (diff) | |
download | external_llvm-c30a38f34bdfecb99ce49e3ffa479039c9bf0209.zip external_llvm-c30a38f34bdfecb99ce49e3ffa479039c9bf0209.tar.gz external_llvm-c30a38f34bdfecb99ce49e3ffa479039c9bf0209.tar.bz2 |
move tier out of an anonymous namespace, it doesn't make sense
to for it to be an an anon namespace and be in a header.
Eliminate some extraenous uses of tie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135669 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/STLExtras.h')
-rw-r--r-- | include/llvm/ADT/STLExtras.h | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h index 0b0346b..5da906d 100644 --- a/include/llvm/ADT/STLExtras.h +++ b/include/llvm/ADT/STLExtras.h @@ -186,25 +186,21 @@ inline ItTy prior(ItTy it) // // do stuff // else // // do other stuff - -namespace -{ - template <typename T1, typename T2> - struct tier { - typedef T1 &first_type; - typedef T2 &second_type; - - first_type first; - second_type second; - - tier(first_type f, second_type s) : first(f), second(s) { } - tier& operator=(const std::pair<T1, T2>& p) { - first = p.first; - second = p.second; - return *this; - } - }; -} +template <typename T1, typename T2> +struct tier { + typedef T1 &first_type; + typedef T2 &second_type; + + first_type first; + second_type second; + + tier(first_type f, second_type s) : first(f), second(s) { } + tier& operator=(const std::pair<T1, T2>& p) { + first = p.first; + second = p.second; + return *this; + } +}; template <typename T1, typename T2> inline tier<T1, T2> tie(T1& f, T2& s) { |