Hi All,
I'm having some trouble getting John Torjo's Smart Assert library to work
with MSVC 7.0 and 7.1. Here's the error I get when compiling the example in
boost_root\libs\smart_assert\example\enforce.cpp on MSVC 7.0 (7.1 yields a
similar error):
--snip--
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\vector(95) : error
C2664: 'std::_Vector_val<_Ty,_Alloc>::_Vector_val(_Alloc)' : cannot convert
parameter 1 from 'const std::_Vector_val<_Ty,_Alloc>::_Alty' to
'boost::smart_assert::Private::smart_assert_alloc<type>'
with
[
_Ty=boost::smart_assert::assert_context::val_and_str,
_Alloc=boost::smart_assert::Private::smart_assert_alloc
]
and
[
_Ty=boost::smart_assert::assert_context::val_and_str,
_Alloc=boost::smart_assert::Private::smart_assert_alloc
]
and
[
type=boost::smart_assert::assert_context::val_and_str
]
No constructor could take the source type, or constructor overload
resolution was ambiguous
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\vector(93)
: while compiling class-template member function
'std::vector<_Ty,_Ax>::vector(const std::vector<_Ty,_Ax>::_Myt &)'
with
[
_Ty=boost::smart_assert::assert_context::val_and_str,
_Ax=boost::smart_assert::Private::smart_assert_alloc
]
c:\boost_1_30_0\boost\smart_assert\priv\fwd\smart_assert_context.hpp(155) :
see reference to class template instantiation 'std::vector<_Ty,_Ax>' being
compiled
with
[
_Ty=boost::smart_assert::assert_context::val_and_str,
_Ax=boost::smart_assert::Private::smart_assert_alloc
]
--snip--
I hand instantiated "const std::_Vector_val<_Ty,_Alloc>::_Alty" and I got
"boost::smart_assert::Private::smart_assert_alloc<type>" (where _Ty, _Alloc,
and type have been replaced by their actual parameter values) so why is MSVC
reporting an error? Has anyone else come across this problem? If so, how
did you solve it?
I tried searching the archive and came up with nothing, mostly because
clicking on a search result brings you to an altogether different message.
Any clues?
Jerry Ferentinos
------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New
Jersey, USA 08889), and/or its affiliates (which may be known outside the
United States as Merck Frosst, Merck Sharp & Dohme or MSD) that may be
confidential, proprietary copyrighted and/or legally privileged, and is
intended solely for the use of the individual or entity named on this message.
If you are not the intended recipient, and have received this message in
error, please immediately return this by e-mail and then delete it.
------------------------------------------------------------------------------