summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-03-24 19:10:58 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-03-24 19:10:58 +0000
commitc74ebd0ef95debc7c99ff641582565716185b758 (patch)
treef3a4d587c2d3964cc33ab640722319ea56f95572
parentc0c59fe14ea324d69a09d12bf2de2f543b990ac2 (diff)
downloadbcm5719-llvm-c74ebd0ef95debc7c99ff641582565716185b758.tar.gz
bcm5719-llvm-c74ebd0ef95debc7c99ff641582565716185b758.zip
Stop relying on mapped_iterator's function having a result_type. That facility
is deprecated in modern C++ and unnecessary since decltype can be used to query the relevant type. llvm-svn: 264321
-rw-r--r--llvm/include/llvm/ADT/STLExtras.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h
index 28f75949373..06a1756e26f 100644
--- a/llvm/include/llvm/ADT/STLExtras.h
+++ b/llvm/include/llvm/ADT/STLExtras.h
@@ -117,7 +117,9 @@ public:
iterator_category;
typedef typename std::iterator_traits<RootIt>::difference_type
difference_type;
- typedef typename UnaryFunc::result_type value_type;
+ typedef typename std::result_of<
+ UnaryFunc(decltype(*std::declval<RootIt>()))>
+ ::type value_type;
typedef void pointer;
//typedef typename UnaryFunc::result_type *pointer;
OpenPOWER on IntegriCloud