summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-08-20 13:45:41 +0200
committerMax Kellermann <max@musicpd.org>2018-08-20 13:45:41 +0200
commitec373eba5d404347ac71ead391c8dcf10e73db91 (patch)
treea273e6f8e77794161774c1366cf0950e5e07fecb
parent0dfb27b7e541cb27583c7d98560aad7e65a3480d (diff)
util/BindMethod: add "noexcept"
-rw-r--r--src/util/BindMethod.hxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/util/BindMethod.hxx b/src/util/BindMethod.hxx
index f02e36d52..f6928877a 100644
--- a/src/util/BindMethod.hxx
+++ b/src/util/BindMethod.hxx
@@ -57,19 +57,19 @@ public:
BoundMethod() = default;
constexpr
- BoundMethod(void *_instance, function_pointer _function)
+ BoundMethod(void *_instance, function_pointer _function) noexcept
:instance_(_instance), function(_function) {}
/**
* Construct an "undefined" object. It must not be called,
* and its "bool" operator returns false.
*/
- BoundMethod(std::nullptr_t):function(nullptr) {}
+ BoundMethod(std::nullptr_t) noexcept:function(nullptr) {}
/**
* Was this object initialized with a valid function pointer?
*/
- operator bool() const {
+ operator bool() const noexcept {
return function != nullptr;
}
@@ -167,7 +167,7 @@ struct BindMethodWrapperGenerator<T, M, method, R(Args...)>
template<typename T, typename S,
typename MethodWithSignature<T, S>::method_pointer method>
typename MethodWrapperWithSignature<S>::function_pointer
-MakeBindMethodWrapper()
+MakeBindMethodWrapper() noexcept
{
return BindMethodWrapperGenerator<T, typename MethodWithSignature<T, S>::method_pointer, method, S>::Invoke;
}
@@ -229,7 +229,7 @@ struct BindFunctionWrapperGenerator<R(Args...), P, function>
template<typename T, typename T::pointer_type function>
typename MethodWrapperWithSignature<typename T::function_type>::function_pointer
-MakeBindFunctionWrapper()
+MakeBindFunctionWrapper() noexcept
{
return BindFunctionWrapperGenerator<typename T::function_type,
typename T::pointer_type,
@@ -249,7 +249,7 @@ MakeBindFunctionWrapper()
template<typename T, typename S,
typename BindMethodDetail::MethodWithSignature<T, S>::method_pointer method>
constexpr BoundMethod<S>
-BindMethod(T &_instance)
+BindMethod(T &_instance) noexcept
{
return BoundMethod<S>(&_instance,
BindMethodDetail::MakeBindMethodWrapper<T, S, method>());
@@ -278,7 +278,7 @@ BindMethod(T &_instance)
*/
template<typename T, typename T::pointer_type function>
constexpr BoundMethod<typename T::function_type>
-BindFunction()
+BindFunction() noexcept
{
return BoundMethod<typename T::function_type>(nullptr,
BindMethodDetail::MakeBindFunctionWrapper<T, function>());