2008-04-15
greta在vc express 2008下编译失败
支持vc6和vs.net。在2008下产生C2923。
似乎是原有hetero_stack::stack_node::header结构现在不能看作类型了。
将原有code
改为
并将引用:
改为:
编译通过。
似乎是原有hetero_stack::stack_node::header结构现在不能看作类型了。
将原有code
struct stack_node
{
struct header
{
stack_node * m_back;
stack_node * m_next;
byte_t * m_current; // ptr into m_mem. alloc from here
byte_t * m_end; // ptr to last+1 byte_t in m_mem
};
union
{
header m_head;
byte_t m_align[ aligned_sizeof<header>::no_rtti ];
};
// This is the buffer into which values will be pushed and popped.
// It is guaranteed to meet the AlignmentT requirements because of
// the union above.
byte_t m_mem[1];
size_t size() const // throw()
{
return static_cast<size_t>( m_head.m_end - m_mem );
}
};
改为
struct stack_node_header;
struct stack_node
{
union
{
stack_node_header m_head;
byte_t m_align[ aligned_sizeof<stack_node_header>::no_rtti ];
};
// This is the buffer into which values will be pushed and popped.
// It is guaranteed to meet the AlignmentT requirements because of
// the union above.
byte_t m_mem[1];
size_t size() const // throw()
{
return static_cast<size_t>( m_head.m_end - m_mem );
}
};
struct stack_node_header
{
stack_node * m_back;
stack_node * m_next;
byte_t * m_current; // ptr into m_mem. alloc from here
byte_t * m_end; // ptr to last+1 byte_t in m_mem
};
并将引用:
byte_t m_buf[ aligned_sizeof<stack_node::header>::no_rtti + StaticBlockSizeT ];
改为:
byte_t m_buf[ aligned_sizeof<stack_node_header>::no_rtti + StaticBlockSizeT ];
编译通过。
发表评论
- 浏览: 2392 次
- 性别:

- 来自: 北京

- 详细资料
搜索本博客
链接
- cplusplus.com - The C++ Resources Network
- Rootkit
- Free Soft Foundation directory
- Erlang在线文档
- Ruby
- MIT Scheme
- Securityfocus
- Haskell
- CodeGuru
- Code Project
- 京东购物
- 在线词典
- MS security center
- SANS Top 20
- 看雪
- 邪恶八进制
- ietf
- Attrition
- blackcode
- US-CERT Vulnerability Notes
- OSVDB
- xfocus
- CVE
- Secure Root
- Start Plaza
- 绿色软件联盟
- 棋圣道场
- 驱动开发网
- 虚拟机之家
- 共创联盟
- fresh meat
- Loki
- MinGW
- boost
- cygwin
- apache
- lcc
- Debugging Tools in Windows
- 灰狐
- 51Testing
- ReactOS
- java开源
- OpenSource C#
- ACE
- W3C
- SourceForge
- Enterprise Integration Patterns
- OWASP
- InfoQ






评论排行榜