|
Boost Users : |
From: John Harris (john.harris_at_[hidden])
Date: 2003-04-22 09:19:00
Using Boost 1.30.0. MSVC6
Tow problems: (1) I have to #define __WIN32__, and (2) Doesn't compile
Am I doing something wrong, here?
#include "afxwin.h"
#include <map>
#define __WIN32__ // why do I have to define this???
#include "boost/pool/pool_alloc.hpp"
int main()
{
std::map<int,int,std::less<int>, boost::pool_allocator<int> >
return 0;
}
:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xtree(587) :
error C2664: 'deallocate' : cannot convert parameter 1 from 'struct
std::_Tree<int,struct std::pair<int const ,int>,struct
std::map<int,int,struct std::less<int>,class boost::pool_al
locator<int,struct boost::default_user_allocator_new_delete,class
boost::details::pool::win32_mutex,32> >::_Kfn,struct
std::less<int>,class boost::pool_allocator<int,struct
boost::default_user_allocator_new_delete,class
boost::details::pool::win32_m
utex,32> >::_Node *' to 'int *const '
Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xtree
(587) : while compiling class-template member function 'void
__thiscall std::_Tree<int,struct std::pair<int const ,int>,struct
std::map<int,int,struct std::less<int>,class boost::poo
l_allocator<int,struct boost::default_user_allocator_new_delete,class
boost::details::pool::win32_mutex,32> >::_Kfn,struct
std::less<int>,class boost::pool_allocator<int,struct
boost::default_user_allocator_new_delete,class
boost::details::pool::win
32_mutex,32> >::_Freenode(struct std::_Tree<int,struct std::pair<int
const ,int>,struct std::map<int,int,struct std::less<int>,class
boost::pool_allocator<int,struct
boost::default_user_allocator_new_delete,class
boost::details::pool::win32_mutex,32
> >::_Kfn,struct std::less<int>,class
boost::pool_allocator<int,struct
boost::default_user_allocator_new_delete,class
boost::details::pool::win32_mutex,32> >::_Node *)'
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net