summaryrefslogtreecommitdiffstats
path: root/libcxx/test/support
diff options
context:
space:
mode:
authorBilly Robert O'Neal III <bion@microsoft.com>2018-01-05 01:32:00 +0000
committerBilly Robert O'Neal III <bion@microsoft.com>2018-01-05 01:32:00 +0000
commit3770e403eec750087cd564f2701e9474d955fa9a (patch)
tree7c8d62a5249a5248cae901675d697fbae377a419 /libcxx/test/support
parent4958692ad9d0834b6ba94dbeaffc88e5159debeb (diff)
downloadbcm5719-llvm-3770e403eec750087cd564f2701e9474d955fa9a.tar.gz
bcm5719-llvm-3770e403eec750087cd564f2701e9474d955fa9a.zip
Move + and * operators of MoveOnly into MoveOnly.h.
llvm-svn: 321852
Diffstat (limited to 'libcxx/test/support')
-rw-r--r--libcxx/test/support/MoveOnly.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/test/support/MoveOnly.h b/libcxx/test/support/MoveOnly.h
index 4afa8aef710..2eba8e7428a 100644
--- a/libcxx/test/support/MoveOnly.h
+++ b/libcxx/test/support/MoveOnly.h
@@ -19,7 +19,6 @@
class MoveOnly
{
- friend class MoveOnly2;
MoveOnly(const MoveOnly&);
MoveOnly& operator=(const MoveOnly&);
@@ -35,6 +34,8 @@ public:
bool operator==(const MoveOnly& x) const {return data_ == x.data_;}
bool operator< (const MoveOnly& x) const {return data_ < x.data_;}
+ MoveOnly operator+(const MoveOnly& x) const { return MoveOnly{data_ + x.data_}; }
+ MoveOnly operator*(const MoveOnly& x) const { return MoveOnly{data_ * x.data_}; }
};
namespace std {
OpenPOWER on IntegriCloud