is_stateless.qbk

来自「Boost provides free peer-reviewed portab」· QBK 代码 · 共 41 行

QBK
41
字号
[/   Copyright 2007 John Maddock.  Distributed under the Boost Software License, Version 1.0.  (See accompanying file LICENSE_1_0.txt or copy at  http://www.boost.org/LICENSE_1_0.txt).][section:is_stateless is_stateless]   template <class T>   struct is_stateless : public __tof {};  __inherit Ff T is a stateless type then inherits from __true_type, otherwisefrom __false_type.Type T must be a complete type.A stateless type is a type that has no storage and whose constructors and destructors are trivial. That means that `is_stateless` only inherits from __true_type if the following expression is `true`:   ::boost::has_trivial_constructor<T>::value   && ::boost::has_trivial_copy<T>::value   && ::boost::has_trivial_destructor<T>::value   && ::boost::is_class<T>::value   && ::boost::is_empty<T>::value__std_ref 3.9p10.__header ` #include <boost/type_traits/is_stateless.hpp>` or ` #include <boost/type_traits.hpp>`__compat If the compiler does not support partial-specialization of class templates, then this template can not be used with function types.Without some (as yet unspecified) help from the compiler, is_stateless will never report that a class or struct is stateless; this is always safe, if possibly sub-optimal.  Currently (May 2005) only MWCW 9 and Visual C++ 8 have the necessary compiler __intrinsics to make this template work automatically.[endsect]

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?