From 89bab3362b94fcc9bb90e0b46f05952265cf78cb Mon Sep 17 00:00:00 2001 From: q66 Date: Thu, 23 Apr 2015 21:05:09 +0100 Subject: [PATCH] add another condition on Function in-place optimization --- octa/functional.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/octa/functional.h b/octa/functional.h index 1d92682..ba0626f 100644 --- a/octa/functional.h +++ b/octa/functional.h @@ -200,7 +200,8 @@ namespace octa { template struct FunctorInPlace { static constexpr bool value = sizeof(T) <= sizeof(FunctorData) - && (alignof(FunctorData) % alignof(T)) == 0; + && (alignof(FunctorData) % alignof(T)) == 0 + && octa::IsNothrowMoveConstructible::value; }; template