[1.53.0 beta] [type_traits] is_POD

Hi, all! I found out that Boost.TypeTraits defines a metafunction called is_POD that is essentially a template alias of is_pod, but it isn't documented. In particular, the documentation needs to mention that is_POD must be overridden in the same cases that is_pod must be overridden. Cromwell D. Enage

on Sun Jan 27 2013, Cromwell Enage <sponage-AT-yahoo.com> wrote:
Hi, all!
I found out that Boost.TypeTraits defines a metafunction called is_POD that is essentially a template alias of is_pod, but it isn't documented. In particular, the documentation needs to mention that is_POD must be overridden in the same cases that is_pod must be overridden.
? If is_POD isn't documented, it doesn't need to be overridden. And if its default implementation dispatches to is_pod, it wouldn't matter anyway. -- Dave Abrahams BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost

I found out that Boost.TypeTraits defines a metafunction called is_POD that is essentially a template alias of is_pod, but it isn't documented. In particular, the documentation needs to mention that is_POD must be overridden in the same cases that is_pod must be overridden.
It's depricated, it shouldn't be used in new code, and isn't documented for a reason. There may just possibly be some (very) old code still using it, but I'll add a note to the header to mention that it's depricated. John.

John Maddock wrote:
I found out that Boost.TypeTraits defines a metafunction called is_POD that is essentially a template alias of is_pod, but it isn't documented. In particular, the documentation needs to mention that is_POD must be overridden in the same cases that is_pod must be overridden. It's depricated, it shouldn't be used in new code, and isn't documented for a reason. There may just
Cromwell Enage wrote: possibly be some (very) old code still using it, but I'll add a note to the header to mention that it's depricated.
In <boost/iterator/iterator_facade.hpp>, the boost::detail::use_operator_brackets_proxy metafunction is defined in terms of boost::is_POD. I don't know if the concern that the associated comment mentions can be addressed by replacing with boost::has_trivial_copy and/or boost::has_nothrow_copy. Cromwell D. Enage

On Sun, Jan 27, 2013 at 3:38 PM, Cromwell Enage <sponage@yahoo.com> wrote:
John Maddock wrote:
I found out that Boost.TypeTraits defines a metafunction called is_POD
Cromwell Enage wrote: that is essentially a
template alias of is_pod, but it isn't documented. In particular, the documentation needs to mention that is_POD must be overridden in the same cases that is_pod must be overridden.
It's depricated, it shouldn't be used in new code, and isn't documented for a reason. There may just possibly be some (very) old code still using it, but I'll add a note to the header to mention that it's depricated.
In <boost/iterator/iterator_facade.hpp>, the boost::detail::use_operator_brackets_proxy metafunction is defined in terms of boost::is_POD. I don't know if the concern that the associated comment mentions can be addressed by replacing with boost::has_trivial_copy and/or boost::has_nothrow_copy.
Sounds like something I can take a pass at, both replacing is_POD with is_pod and determining whether has_trivial_copy is sufficient (I'm guessing has_nothrow_copy is probably not desirable; without looking at the code, I seem to remember the point was to try to detect if the value_type was cheap enough to copy). - Jeff
participants (4)
-
Cromwell Enage
-
Dave Abrahams
-
Jeffrey Lee Hellrung, Jr.
-
John Maddock