From f2a32741c07c24d253e94d607e4e1e922072fd20 Mon Sep 17 00:00:00 2001 From: Alexander Ryabykin Date: Sat, 2 Jul 2016 17:21:34 +0300 Subject: [PATCH] compilation test fix --- include/gsl.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/gsl.h b/include/gsl.h index 8db781b..c9fb2d2 100644 --- a/include/gsl.h +++ b/include/gsl.h @@ -113,6 +113,18 @@ public: operator T() const { return get(); } T operator->() const { return get(); } + template ::value>> + bool operator==(const not_null& rhs) const + { + return ptr_ == rhs.get(); + } + + template ::value>> + bool operator != (const not_null& rhs) const + { + return !(*this == rhs.get()); + } + bool operator==(const T& rhs) const { return ptr_ == rhs; } bool operator!=(const T& rhs) const { return !(*this == rhs); }