J
John
I'm having a major problem trying to use value types like
System:
rawing::Rectangle with std::vector. Is it possible to use STL
containers with these type of objects, or am I just doing something wrong?
Thanks!
[ -- code snippet -- ]
using namespace System:
rawing;
#include <vector>
public ref class Base
{
static void GetQuads( Base^ root )
{
std::vector<Rectangle> q;
}
};
gives this error
C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(1290) :
error C4439: 'std::_Ptr_cat' : function definition with a managed type
in the signature must have a __clrcall calling convention
2> C:\Program Files\Microsoft Visual Studio
8\VC\include\xmemory(226) : see reference to function template
instantiation 'std::_Nonscalar_ptr_iterator_tag
std::_Ptr_cat<_Ty*,_Ty*>(_T1 &,_T2 &)' being compiled
2> with
2> [
2> _Ty=System:
rawing::Rectangle,
2> _T1=System:
rawing::Rectangle *,
2> _T2=System:
rawing::Rectangle *
2> ]
2> C:\Program Files\Microsoft Visual Studio
8\VC\include\vector(1083) : see reference to function template
instantiation 'void
std::_Destroy_range<System:
rawing::Rectangle,std::allocator<_Ty>>(_Ty
*,_Ty *,_Alloc &)' being compiled
2> with
2> [
2> _Ty=System:
rawing::Rectangle,
2> _Alloc=std::allocator<System:
rawing::Rectangle>
2> ]
2> C:\Program Files\Microsoft Visual Studio
8\VC\include\vector(1082) : while compiling class template member
function 'void std::vector<_Ty>::_Destroy(System:
rawing::Rectangle
*,System:
rawing::Rectangle *)'
2> with
2> [
2> _Ty=System:
rawing::Rectangle
2> ]
2> c:\depot-jmatzen-mouse\depot\game14\src\engine\ui\Base.h(145)
: see reference to class template instantiation 'std::vector<_Ty>' being
compiled
2> with
2> [
2> _Ty=System:
rawing::Rectangle
2> ]
System:

containers with these type of objects, or am I just doing something wrong?
Thanks!
[ -- code snippet -- ]
using namespace System:

#include <vector>
public ref class Base
{
static void GetQuads( Base^ root )
{
std::vector<Rectangle> q;
}
};
gives this error
C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(1290) :
error C4439: 'std::_Ptr_cat' : function definition with a managed type
in the signature must have a __clrcall calling convention
2> C:\Program Files\Microsoft Visual Studio
8\VC\include\xmemory(226) : see reference to function template
instantiation 'std::_Nonscalar_ptr_iterator_tag
std::_Ptr_cat<_Ty*,_Ty*>(_T1 &,_T2 &)' being compiled
2> with
2> [
2> _Ty=System:

2> _T1=System:

2> _T2=System:

2> ]
2> C:\Program Files\Microsoft Visual Studio
8\VC\include\vector(1083) : see reference to function template
instantiation 'void
std::_Destroy_range<System:

*,_Ty *,_Alloc &)' being compiled
2> with
2> [
2> _Ty=System:

2> _Alloc=std::allocator<System:

2> ]
2> C:\Program Files\Microsoft Visual Studio
8\VC\include\vector(1082) : while compiling class template member
function 'void std::vector<_Ty>::_Destroy(System:

*,System:

2> with
2> [
2> _Ty=System:

2> ]
2> c:\depot-jmatzen-mouse\depot\game14\src\engine\ui\Base.h(145)
: see reference to class template instantiation 'std::vector<_Ty>' being
compiled
2> with
2> [
2> _Ty=System:

2> ]