General Allocator关于类型定义和void * specializedproblem [英] General Allocator Regarding type definitions and void * specializedproblem
本文介绍了General Allocator关于类型定义和void * specializedproblem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,所有C ++专家程序员,
i为我的容器编写了部分通用分配器。
阅读标准C ++库和代码大师文章,我有几个问题。
1.为什么分配器写前向声明然后分配为void *
而不是直接先写了分配器吗?
Hello all C++ expert programmer,
i have wrote partial general allocator for my container.
After reading standard C++ library and code guru article, i have
several questions.
1. Why allocator write forward declaration then allocation for void*
rather than directly wrote allocator first ?
展开 | 选择 | Wrap | 行号
推荐答案
这是当前的工作。
This is current work.
展开 | 选择 | 换行 | 行号
您无法更改或添加代码到std命名空间,因为它是
未定义的行为。
You can not change or add code to std namespace because it is
undefined behaviour.
我没有添加编写命名空间标准。
我使用自己的命名空间创建自定义分配器。
请在C ++ usenet社区中运行。
>
谢谢。
I didn''t add to code to namespace standard.
I create my custom allocator with my own namespace.
Please behave in C++ usenet community.
Thanks.
这篇关于General Allocator关于类型定义和void * specializedproblem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文