Hi,
I eagerly want to try boost 1.49, but the compiler error stuck me.
managed_unique_ptr cannot be used inside template if I use Visual Studio
2008:
There is a very simple example:
#include <iostream>
#include
#include
#include
#include
#include
#include
#include
struct Request
{
int a;
};
template
class Channel
{
public:
/// Value pointer in queue.
typedef typename boost::interprocess::managed_unique_ptr::type
ValuePtr;
};
int main(int argc, char* argv[])
{
Channel::ValuePtr v;
std::cout << "Test" << std::endl;
return 0;
}
I got this error in Visual Studio 2008:
T.cpp
C:\Program
Files\boost\boost_1_49_0\boost/interprocess/detail/pointer_type.hpp(64) :
error C2039: 'remove_reference' : is not a member of
'boost::interprocess::ipcdetail::ipcdetail'
C:\Program
Files\boost\boost_1_49_0\boost/interprocess/smart_ptr/unique_ptr.hpp(94) :
see reference to class template instantiation
'boost::interprocess::ipcdetail::pointer_type' being compiled
with
[
T=Request,
D=boost::interprocess::deleter,boost::interprocess::iset_index>>
]
T.cpp(34) : see reference to class template instantiation
'boost::interprocess::unique_ptr' being compiled
with
[
T=Request,
D=boost::interprocess::deleter,boost::interprocess::iset_index>>
]
C:\Program
Files\boost\boost_1_49_0\boost/interprocess/detail/pointer_type.hpp(64) :
error C2947: expecting '>' to terminate template-argument-list, found '<'
C:\Program
Files\boost\boost_1_49_0\boost/interprocess/detail/pointer_type.hpp(64) :
error C3203: 'remove_reference' : unspecialized class template can't be used
as a template argument for template parameter 'D', expected a real type
C:\Program
Files\boost\boost_1_49_0\boost/interprocess/detail/pointer_type.hpp(64) :
error C2955: 'boost::interprocess::ipcdetail::remove_reference' : use of
class template requires template argument list
C:\Program
Files\boost\boost_1_49_0\boost/interprocess/detail/type_traits.hpp(30) : see
declaration of 'boost::interprocess::ipcdetail::remove_reference'
C:\Program
Files\boost\boost_1_49_0\boost/interprocess/detail/pointer_type.hpp(64) :
error C2143: syntax error : missing ';' before '>'
C:\Program
Files\boost\boost_1_49_0\boost/interprocess/detail/pointer_type.hpp(64) :
error C2039: 'type' : is not a member of '`global namespace''
C:\Program
Files\boost\boost_1_49_0\boost/interprocess/detail/pointer_type.hpp(64) :
error C2039: 'type' : is not a member of '`global namespace''
C:\Program
Files\boost\boost_1_49_0\boost/interprocess/detail/pointer_type.hpp(64) :
error C2238: unexpected token(s) preceding ';'
C:\Program
Files\boost\boost_1_49_0\boost/interprocess/smart_ptr/unique_ptr.hpp(94) :
error C2039: 'type' : is not a member of
'boost::interprocess::ipcdetail::pointer_type'
................
This example works fine in boost 1.48.0
I submit a ticket ( https://svn.boost.org/trac/boost/ticket/6648 #6648 ) to
boost::interprocess, but no any reply since 3 weeks ago,
So I just ask how to solve this problem or any direction?
Thanks.
--
View this message in context: http://boost.2283326.n4.nabble.com/boost-interprocess-managed-unique-ptr-can...
Sent from the Boost - Users mailing list archive at Nabble.com.