Boost logo

Boost Users :

Subject: Re: [Boost-users] [ptr_container] ptr_map and MinGW: "a declaration of assert must be available", even with cassert included
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2009-06-18 07:48:45


philipp_muenzel_at_[hidden] skrev:
> Hi,
>
> the error originates from various headers that ptr_map includes.
> This is the whole output from gcc, perhaps it helps:
>
>
> g++ -c -g -Wall -fno-exceptions -fno-rtti -I"c:\boost_1_39_0" -
> I"." -o release\datacontainer.o datacontainer.
> cpp
> In file included from c:/boost_1_39_0/boost/scoped_array.hpp:14,
> from c:/boost_1_39_0/boost/ptr_container/detail/scoped_deleter.
> hpp:21,
> from c:/boost_1_39_0/boost/ptr_container/detail/reversible_ptr_
> container.hpp:21,
> from c:/boost_1_39_0/boost/ptr_container/detail/associative_ptr
> _container.hpp:20,
> from c:/boost_1_39_0/boost/ptr_container/ptr_map_adapter.hpp:20
> ,
> from c:/boost_1_39_0/boost/ptr_container/ptr_map.hpp:20,
> from datacontainer.h:29,
> from datacontainer.cpp:21:
> c:/boost_1_39_0/boost/smart_ptr/scoped_array.hpp: In member function `T& boost::
> scoped_array<T>::operator[](ptrdiff_t) const':
> c:/boost_1_39_0/boost/smart_ptr/scoped_array.hpp:80: error: there are no argumen
> ts to `assert' that depend on a template parameter, so a declaration of `assert'
> must be available

Well, the is in scoped_array then. But I looked there too, and it uses
BOOST_ASSERT just fine. If you look into <assert.h> on your system, then
it should contain the assert() macro. Could it be that your include path
is wrong or garbled?

-Thorsten


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