Subject: [Boost-bugs] [Boost C++ Libraries] #13307: multi_index_container can't work with _com_ptr_t
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-11-21 14:23:54
#13307: multi_index_container can't work with _com_ptr_t
------------------------------+---------------------
Reporter: andrewaa59@⦠| Owner: (none)
Type: Bugs | Status: new
Milestone: To Be Determined | Component: None
Version: Boost 1.60.0 | Severity: Problem
Keywords: |
------------------------------+---------------------
I try to use multi_index_container with _com_ptr_t objects.
I can compile code with no errors, but program crashes in runtime.
Standard containers (std::map, std::set, std::vector) work perfectly with
_com_ptr_t.
The sample code:
{{{
#include "stdafx.h"
#include <boost\multi_index_container.hpp>
#include <boost\multi_index\random_access_index.hpp>
#include <boost\multi_index\global_fun.hpp>
#include <boost\multi_index\ordered_index.hpp>
#import "C:\Windows\SysWOW64\msxml6.dll" exclude("ISequentialStream",
"_FILETIME")
using CTest =
boost::multi_index_container<MSXML2::IXMLDOMDocument2Ptr,
boost::multi_index::indexed_by<boost::multi_index::random_access<>>>;
int main()
{
::CoInitialize(nullptr);
CTest tst;
MSXML2::IXMLDOMDocumentPtr doc;
doc.CreateInstance(CLSID_DOMDocument);
**tst.push_back(std::move(doc));** <-- crash here
::CoUninitialize();
return 0;
}
}}}
-- Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13307> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-11-21 14:30:40 UTC