Exemple #1
0
namespace platform
{

//! \since build 441
static_assert(sizeof(Pixel) == sizeof(Pixel::Trait::IntegerType),
	"Wrong size of pixel type found.");
static_assert(yalignof(Pixel) == yalignof(Pixel::Trait::IntegerType),
	"Wrong alignment of pixel type found.");

bool
InitVideo()
{
#if YCL_DS
	platform_ex::ResetVideo();
	::lcdMainOnTop();
#endif
	return true;
}

} // namespace platform;
Exemple #2
0
//! \since build 630
//@{
/*!
\ingroup metafunctions
\brief 选择和特定类型可替换字符类类型的特定重载以避免冲突。
*/
template<typename _tSrc, typename _tDst, typename _type = void>
using enable_if_replaceable_t
	= enable_if_t<is_trivially_replaceable<_tSrc, _tDst>::value, _type>;


/*!
\ingroup transformation_traits
\brief 用于显式转换的替代对齐存储 POD 类型。
*/
template<typename _type, size_t _vAlign = yalignof(_type)>
using pun_storage_t = aligned_storage_t<sizeof(_type), _vAlign>;


/*!
\ingroup cast
\pre 目标类型是对象指针或引用。
\note 使用 \c reinterpret_cast 且保证目标类型的对齐要求不比源类型更严格以保证可逆。
*/
//@{
/*!
\brief 保证对齐兼容的显式转换。
\note 用于替代针对满足 is_aligned_compatible 要求对象的 \c reinterpret_cast 。
*/
//@{
template<typename _pDst, typename _tSrc>