summaryrefslogtreecommitdiff
path: root/libcxx/include/__functional/function.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/__functional/function.h')
-rw-r--r--libcxx/include/__functional/function.h34
1 files changed, 13 insertions, 21 deletions
diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h
index 83fd7c12de2f..8336d85adf2e 100644
--- a/libcxx/include/__functional/function.h
+++ b/libcxx/include/__functional/function.h
@@ -946,7 +946,7 @@ public:
#endif // _LIBCPP_HAS_EXTENSION_BLOCKS && !_LIBCPP_HAS_OBJC_ARC
-} // __function
+} // namespace __function
template<class _Rp, class ..._ArgTypes>
class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)>
@@ -1717,13 +1717,11 @@ public:
// 20.7.16.2.3, function capacity:
_LIBCPP_INLINE_VISIBILITY explicit operator bool() const {return __f_;}
-private:
- // deleted overloads close possible hole in the type system
template<class _R2>
- bool operator==(const function<_R2()>&) const;// = delete;
+ bool operator==(const function<_R2()>&) const = delete;
template<class _R2>
- bool operator!=(const function<_R2()>&) const;// = delete;
-public:
+ bool operator!=(const function<_R2()>&) const = delete;
+
// 20.7.16.2.4, function invocation:
_Rp operator()() const;
@@ -1997,13 +1995,11 @@ public:
// 20.7.16.2.3, function capacity:
_LIBCPP_INLINE_VISIBILITY explicit operator bool() const {return __f_;}
-private:
- // deleted overloads close possible hole in the type system
template<class _R2, class _B0>
- bool operator==(const function<_R2(_B0)>&) const;// = delete;
+ bool operator==(const function<_R2(_B0)>&) const = delete;
template<class _R2, class _B0>
- bool operator!=(const function<_R2(_B0)>&) const;// = delete;
-public:
+ bool operator!=(const function<_R2(_B0)>&) const = delete;
+
// 20.7.16.2.4, function invocation:
_Rp operator()(_A0) const;
@@ -2277,13 +2273,11 @@ public:
// 20.7.16.2.3, function capacity:
_LIBCPP_INLINE_VISIBILITY explicit operator bool() const {return __f_;}
-private:
- // deleted overloads close possible hole in the type system
template<class _R2, class _B0, class _B1>
- bool operator==(const function<_R2(_B0, _B1)>&) const;// = delete;
+ bool operator==(const function<_R2(_B0, _B1)>&) const = delete;
template<class _R2, class _B0, class _B1>
- bool operator!=(const function<_R2(_B0, _B1)>&) const;// = delete;
-public:
+ bool operator!=(const function<_R2(_B0, _B1)>&) const = delete;
+
// 20.7.16.2.4, function invocation:
_Rp operator()(_A0, _A1) const;
@@ -2556,13 +2550,11 @@ public:
// 20.7.16.2.3, function capacity:
_LIBCPP_INLINE_VISIBILITY explicit operator bool() const {return __f_;}
-private:
- // deleted overloads close possible hole in the type system
template<class _R2, class _B0, class _B1, class _B2>
- bool operator==(const function<_R2(_B0, _B1, _B2)>&) const;// = delete;
+ bool operator==(const function<_R2(_B0, _B1, _B2)>&) const = delete;
template<class _R2, class _B0, class _B1, class _B2>
- bool operator!=(const function<_R2(_B0, _B1, _B2)>&) const;// = delete;
-public:
+ bool operator!=(const function<_R2(_B0, _B1, _B2)>&) const = delete;
+
// 20.7.16.2.4, function invocation:
_Rp operator()(_A0, _A1, _A2) const;