YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
ydef.h 文件参考

系统环境和公用类型和宏的基础定义。 更多...

#include <cstddef>
#include <climits>
#include <cassert>
#include <cstdint>
#include <cwchar>
#include <utility>
#include <type_traits>
ydef.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

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 = {}
 

详细描述

系统环境和公用类型和宏的基础定义。

版本
r2490
作者
FrankHB frank.nosp@m.hb19.nosp@m.89@gm.nosp@m.ail..nosp@m.com
自从
早于 build 132
创建时间:
2009-12-02 21:42:44 +0800
修改时间:
2014-05-24 17:01 +0800
文本编码:
UTF-8
模块名称:
YDefinition

在文件 ydef.h 中定义.

宏定义说明

#define __has_extension (   ...)    0

在文件 ydef.h122 行定义.

#define __has_feature (   ...)    0

特性检测宏补充定义:若不可用则替换为预处理记号 0 。

自从
build 484

在文件 ydef.h118 行定义.

#define yimpl (   ...)    __VA_ARGS__

实现标签。

自从
build 474
待办事项:
检查语言实现的必要支持:可变参数宏。

接口代码中标注不作为公开接口实现而不应被用户依赖具体内容的部分的宏。 类似于 ISO C++ 中的 unspecified 或标识为 exposition only 部分的代码。 保证记号被原样替换。 以 yimpl() 的形式使用时可用于表示实现可选扩展的接口,用于序列末尾等。

在文件 ydef.h177 行定义.

参考自 ystdex::mixin< _tBases >::mixin().

#define yunused (   ...)    static_cast<void>(__VA_ARGS__)

标记未使用的表达式。

注解
显式转换为 void 类型以标记表达式未被作为子表达式使用,可避免某些实现的警告。
自从
build 435

在文件 ydef.h697 行定义.

参考自 platform_ex::Attach(), platform_ex::Windows::CheckWine(), platform::Logger::FetchDefaultSender(), YReader::ShlTextReader::OnClick(), YSLib::GHandlerRegisterBase< GWidgetInserterRegister< _tParams...>, string, GWidgetInserter< _tParams...> >::RegisterTail() , 以及 platform::DirectorySession::~DirectorySession().