|
YSTest
PreAlpha_b500_20140530
The YSLib Test Project
|
系统环境和公用类型和宏的基础定义。 更多...
#include <cstddef>#include <climits>#include <cassert>#include <cstdint>#include <cwchar>#include <utility>#include <type_traits>

类 | |
| class | ystdex::nullptr_t |
| 空指针类。 更多... | |
| struct | ystdex::empty_base<> |
| 空基类模板。 更多... | |
| class | ystdex::offsetof_check< _bMemObjPtr, _bNoExcept, _type > |
| 成员偏移计算静态类型检查。 更多... | |
命名空间 | |
| ystdex | |
宏定义 | |
| #define | YPP_Empty |
| 替换为空的预处理记号。 更多... | |
| #define | YPP_Comma , |
| 替换为逗号的预处理记号。 更多... | |
| #define | YPP_Join(x, y) YPP_Concat(x, y) |
| #define | YPP_Concat(x, y) x ## y |
| #define | yimpl(...) __VA_ARGS__ |
| 实现标签。 更多... | |
| #define | YB_HAS_ALIGNAS |
| 内建 alignas 支持。 更多... | |
| #define | YB_HAS_ALIGNOF (YB_IMPL_CPP >= 201103L || YB_IMPL_GNUCPP >= 40500) |
| 内建 alignof 支持。 更多... | |
| #define | YB_HAS_BUILTIN_NULLPTR |
| 内建 nullptr 支持。 更多... | |
| #define | YB_HAS_CONSTEXPR |
| constexpr 支持。 更多... | |
| #define | YB_HAS_NOEXCEPT |
| #define | YB_HAS_THREAD_LOCAL |
| thread_local 支持。 更多... | |
| #define | YB_ATTR(...) |
| 属性。 更多... | |
| #define | YB_ALLOCATOR |
| 指示修饰的是分配器,或返回分配器调用的函数或函数模板。 更多... | |
| #define | YB_EXPECT(expr, constant) (expr) |
| #define | YB_LIKELY(expr) (expr) |
| #define | YB_UNLIKELY(expr) (expr) |
| 分支预测提示。 更多... | |
| #define | YB_NORETURN |
| 指定无返回值函数。 更多... | |
| #define | YB_PURE |
| 指示函数或函数模板实例为纯函数。 更多... | |
| #define | YB_STATELESS |
| 指示函数或函数模板实例为无状态函数。 更多... | |
| #define | YB_API |
| YBase 应用程序编程接口:用于向库文件约定链接。 更多... | |
| #define | YB_Use_YAssert 1 |
| 使用断言。 更多... | |
| #define | YB_Use_YTrace 1 |
| 使用调试跟踪记录。 更多... | |
| #define | yalignof(_type) std::alignment_of<_type>::value |
| 指定特定类型的对齐。 更多... | |
| #define | yconstexpr const |
| 指定编译时常量表达式。 更多... | |
| #define | yconstfn inline |
| 指定编译时常量函数。 更多... | |
| #define | ythrow(...) |
| YSLib 动态异常规范:根据是否使用异常规范宏指定或忽略动态异常规范。 更多... | |
| #define | ynothrowv |
| YSLib 无异常抛出保证验证:有条件地使用无异常抛出规范。 更多... | |
| #define | ynothrow ythrow() |
| YSLib 无异常抛出保证:若支持 noexcept 关键字, 指定特定的 noexcept 异常规范。 更多... | |
| #define | ynoexcept(...) |
| YSLib 无异常抛出保证:指定特定的异常规范。 更多... | |
| #define | ythread static |
线程局部存储:若实现支持,指定为 thread_local 。 更多... | |
| #define | yunused(...) static_cast<void>(__VA_ARGS__) |
| 标记未使用的表达式。 更多... | |
| #define | yoffsetof(_type, _member) |
| 带有静态类型检查的成员偏移计算。 更多... | |
| #define | yforward(_expr) std::forward<decltype(_expr)>(_expr) |
| 根据参数类型使用 std::forward 传递对应参数。 更多... | |
| #define | yunseq ystdex::unsequenced |
| 无序列依赖表达式组求值。 更多... | |
| #define | __has_feature(...) 0 |
| 特性检测宏补充定义:若不可用则替换为预处理记号 0 。 更多... | |
| #define | __has_extension(...) 0 |
类型定义 | |
| using | ystdex::byte = unsigned char |
| 字节类型。 更多... | |
| using | ystdex::octet = void |
| using | ystdex::errno_t = int |
| using | ystdex::raw_tag = empty_base<> |
| 直接构造类型(直接构造重载用)。 更多... | |
函数 | |
| template<typename _type , typename... _tParams> | |
| auto | ystdex::unsequenced (_type &&arg, _tParams &&...) -> decltype(std::forward< decltype(arg)>(arg)) |
| 无序列依赖表达式组求值实现。 更多... | |
| template<typename _type > | |
| bool | ystdex::operator== (nullptr_t lhs, const _type &rhs) |
| template<typename _type > | |
| bool | ystdex::operator== (const _type &lhs, nullptr_t rhs) |
| template<typename _type > | |
| bool | ystdex::operator!= (nullptr_t lhs, const _type &rhs) |
| template<typename _type > | |
| bool | ystdex::operator!= (const _type &lhs, nullptr_t rhs) |
变量 | |
| const class ystdex::nullptr_t | ystdex::nullptr = {} |
系统环境和公用类型和宏的基础定义。
在文件 ydef.h 中定义.
| #define yimpl | ( | ... | ) | __VA_ARGS__ |
| #define yunused | ( | ... | ) | static_cast<void>(__VA_ARGS__) |
标记未使用的表达式。
参考自 platform_ex::Attach(), platform_ex::Windows::CheckWine(), platform::Logger::FetchDefaultSender(), YReader::ShlTextReader::OnClick(), YSLib::GHandlerRegisterBase< GWidgetInserterRegister< _tParams...>, string, GWidgetInserter< _tParams...> >::RegisterTail() , 以及 platform::DirectorySession::~DirectorySession().