C++ young 程序库——y_define.hpp

此博客展示了C++ young库头文件y_define.hpp的内容,包含版权声明、命名空间定义、类型定义等,如定义了NULL_POINTER、def_nullptr_t等,还设置了对齐字节数等参数。

文件位置:young/y_define.hpp

/*
The young Library
Copyright (c) 2005 by 杨桓

Permission to use, copy, modify, distribute and sell this software for any
purpose is hereby granted without fee, provided that the above copyright
notice appear in all copies and that both that copyright notice and this
permission notice appear in supporting documentation.
The author make no representations about the suitability of this software
for any purpose. It is provided "as is" without express or implied warranty.
*/

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
#ifndef __MACRO_CPLUSPLUS_YOUNG_LIBRARY_DEFINE_HEADER_FILE__
#define __MACRO_CPLUSPLUS_YOUNG_LIBRARY_DEFINE_HEADER_FILE__
//-----------------------------------------------------------------------------
#include <cstddef>
//-----------------------------------------------------------------------------
#define  __MACRO_CPLUSPLUS_YOUNG_LIBRARY_BEGIN_NAMESPACE__  namespace young{
#define  __MACRO_CPLUSPLUS_YOUNG_LIBRARY_END_NAMESPACE__    }
//-----------------------------------------------------------------------------
__MACRO_CPLUSPLUS_YOUNG_LIBRARY_BEGIN_NAMESPACE__
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------

#define  NULL_POINTER  0

typedef  int  def_nullptr_t;
typedef  std::size_t     def_size_t;
typedef  std::ptrdiff_t  def_ptrdiff_t;

static const def_size_t size_t_max = static_cast<def_size_t>( -1 );

static const unsigned int alignment_bytes = 24;
static const unsigned int string_alignment_bytes = 64;

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
__MACRO_CPLUSPLUS_YOUNG_LIBRARY_END_NAMESPACE__
#endif
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值