From: Kefu Chai Date: Mon, 14 Sep 2020 02:14:01 +0000 (+0800) Subject: crimson/common: add comment to explain the partial specialization X-Git-Tag: v16.1.0~1105^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F37127%2Fhead;p=ceph.git crimson/common: add comment to explain the partial specialization it might be confusing why we don't use explicit specialization for defining errorator::futurize::stored_to_future. quote from item 16, ยง 17.7.3, n4659: In an explicit specialization declaration for a member of a class template or a member template that appears in namespace scope, the member template and some of its enclosing class templates may remain unspecialized, except that the declaration shall not explicitly specialize a class member template if its enclosing class templates are not explicitly specialized as well. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/common/errorator.h b/src/crimson/common/errorator.h index e2c992fad1f42..16335380192c9 100644 --- a/src/crimson/common/errorator.h +++ b/src/crimson/common/errorator.h @@ -835,6 +835,9 @@ private: class futurize { using vanilla_futurize = seastar::futurize; + // explicit specializations for nested type is not allowed unless both + // the member template and the enclosing template are specialized. see + // section temp.expl.spec, N4659 template struct stored_to_future { using type = future;