From eb50c2d17b5a7ce8eccea635d0bfa14328065a25 Mon Sep 17 00:00:00 2001 From: Benjamin Lorenz Date: Fri, 8 Feb 2019 11:10:59 +0100 Subject: [PATCH] llvm7: pair.h: remove reference specializations to fix some confusion coming from elements in hash_maps: /tools/llvm-7.0.1/bin/../include/c++/v1/unordered_map:652:17: error: no viable overloaded '=' __ref() = __v.__get_value(); ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ /tools/llvm-7.0.1/bin/../include/c++/v1/__hash_table:1770:47: note: in instantiation of member function 'std::__1::__hash_value_type::operator=' requested here __cache->__upcast()->__value_ = *__first; ... ../../include/core/polymake/pair.h:107:8: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'const pair::key_type, std::__1::__hash_value_type::mapped_type>' to 'const pair' for 1st argument struct pair { --- lib/core/include/pair.h | 51 ----------------------------------------- 1 file changed, 51 deletions(-) diff --git a/lib/core/include/pair.h b/lib/core/include/pair.h index 3c325e62db..526b1ed748 100644 --- a/lib/core/include/pair.h +++ b/lib/core/include/pair.h @@ -69,57 +69,6 @@ struct isomorphic_to_second< Data, pair > : isomorphic_types -struct pair { - typedef T1& first_type; - typedef T2 second_type; - /// data types referred to by the components - typedef T1 first_data_type; - typedef T2 second_data_type; - - first_type first; - second_type second; - - pair(T1& first_arg, const T2& second_arg) : first(first_arg), second(second_arg) {} - - template - explicit pair(const pair& p) : first(p.first), second(p.second) {} -}; - -template -struct pair { - typedef T1 first_type; - typedef T2& second_type; - - typedef T1 first_data_type; - typedef T2 second_data_type; - - first_type first; - second_type second; - - pair(const T1& first_arg, T2& second_arg) : first(first_arg), second(second_arg) {} - - template - explicit pair(const pair& p) : first(p.first), second(p.second) {} -}; - -template -struct pair { - typedef T1& first_type; - typedef T2& second_type; - - typedef T1 first_data_type; - typedef T2 second_data_type; - - first_type first; - second_type second; - - pair(T1& first_arg, T2& second_arg) : first(first_arg), second(second_arg) {} - - template - explicit pair(const pair& p) : first(p.first), second(p.second) {} -}; - template struct pair { typedef T1 first_type; -- 2.21.0