From 2c618bb6d410ede3bb13aed5cd02cbbd9550694e Mon Sep 17 00:00:00 2001 From: Shane Grant Date: Tue, 11 Feb 2014 16:38:29 -0800 Subject: [PATCH] adding comments see #47 --- include/cereal/details/traits.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/cereal/details/traits.hpp b/include/cereal/details/traits.hpp index ff16db38..ec1c1984 100644 --- a/include/cereal/details/traits.hpp +++ b/include/cereal/details/traits.hpp @@ -558,10 +558,12 @@ namespace cereal }; } + //! Determine if T or any base class of T has inherited from std::enable_shared_from_this template struct has_shared_from_this : decltype(detail::shared_from_this_wrapper::check(std::declval>())) { }; + //! Get the type of the base class of T which inherited from std::enable_shared_from_this template struct get_shared_from_this_base { @@ -569,6 +571,7 @@ namespace cereal using sftw = detail::shared_from_this_wrapper; using PtrType = decltype(sftw::get(std::declval())); public: + //! The type of the base of T that inherited from std::enable_shared_from_this using type = typename std::decay::type; }; @@ -621,8 +624,6 @@ namespace cereal } }; } // namespace detail - - } // namespace cereal #endif // CEREAL_DETAILS_TRAITS_HPP_