Boost logo

Boost :

From: Paul A Bristow (pbristow_at_[hidden])
Date: 2007-11-30 06:21:31


I've seen similar and supressed with a bracket of

#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable: 4512) // "assignment operator could not be generated."
# pragma warning(disable: 4127) // "conditional expression is constant."
# pragma warning(disable: 4100) // "'boost_parameter_enabler_argument' : unreferenced formal parameter"
#endif

your includes

your code....

#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif

But it really would be nice if *All* Boost code could have warnings suppressed properly. The situation is imporoving, but we have
some way to go.

The impression a blizzard of pages and pages and pages of these warnings gives is really bad :-((

Paul

---
Paul A Bristow
Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
+44 1539561830 & SMS, Mobile +44 7714 330204 & SMS
pbristow_at_[hidden]
 
>-----Original Message-----
>From: boost-bounces_at_[hidden] 
>[mailto:boost-bounces_at_[hidden]] On Behalf Of Robert Dailey
>Sent: 29 November 2007 18:28
>To: boost-dev
>Subject: [boost] Lots of warnings
>
>The ptr_container header files seem to be causing a lot of 
>very verbose and
>annoying warning messages on Visual Studio 2008 at warning level 4
>(highest). I'm not sure if this is my fault or what, but I was 
>hoping you
>guys could verify if this is your issue or mine. Thanks. Below are the
>warnings I'm getting:
>
>1>c:\it\personal\collision\sdk\boost\boost\ptr_container\detail
>\move.hpp(23)
>: warning C4512: 
>'boost::ptr_container_detail::move_ptrs::move_source<Ptr>'
>: assignment operator could not be generated
>1>        with
>1>        [
>1>
>Ptr=boost::ptr_container_detail::static_move_ptr<Object,boost::
>ptr_container_detail::clone_deleter<boost::ptr_container_detail
>::reversible_ptr_container<boost::ptr_container_detail::sequenc
>e_config<Object,std::vector<void
>*,std::allocator<void
>*>>>,boost::heap_clone_allocator>::null_clone_allocator<false>>>
>1>        ]
>1>
>c:\it\personal\collision\sdk\boost\boost\ptr_container\ptr_sequ
ence_adapter.hpp(182)
>: see reference to class template instantiation
>'boost::ptr_container_detail::move_ptrs::move_source<Ptr>' 
>being compiled
>1>        with
>1>        [
>1>
>Ptr=boost::ptr_container_detail::static_move_ptr<Object,boost::
>ptr_container_detail::clone_deleter<boost::ptr_container_detail
>::reversible_ptr_container<boost::ptr_container_detail::sequenc
>e_config<Object,std::vector<void
>*,std::allocator<void
>*>>>,boost::heap_clone_allocator>::null_clone_allocator<false>>>
>1>        ]
>1>
>c:\it\personal\collision\sdk\boost\boost\ptr_container\ptr_sequ
ence_adapter.hpp(179)
>: while compiling class template member function 'void
>boost::ptr_sequence_adapter<T,VoidPtrSeq,CloneAllocator>::push_
>back(Object
>*)'
>1>        with
>1>        [
>1>            T=Object,
>1>            VoidPtrSeq=std::vector<void *,std::allocator<void *>>,
>1>            CloneAllocator=boost::heap_clone_allocator
>1>        ]
>1>
>c:\it\personal\collision\sdk\boost\boost\ptr_container\ptr_vect
>or.hpp(35) :
>see reference to class template instantiation
>'boost::ptr_sequence_adapter<T,VoidPtrSeq,CloneAllocator>' 
>being compiled
>1>        with
>1>        [
>1>            T=Object,
>1>            VoidPtrSeq=std::vector<void *,std::allocator<void *>>,
>1>            CloneAllocator=boost::heap_clone_allocator
>1>        ]
>1>        c:\it\personal\collision\source\world.h(20) : see 
>reference to
>class template instantiation 'boost::ptr_vector<T>' being compiled
>1>        with
>1>        [
>1>            T=Object
>1>        ]
>1>c:\it\personal\collision\sdk\boost\boost\ptr_container\detail
>\reversible_ptr_container.hpp(245)
>: warning C4127: conditional expression is constant
>1>
>c:\it\personal\collision\sdk\boost\boost\ptr_container\detail\r
eversible_ptr_container.hpp(244)
>: while compiling class template member function 'void
>boost::ptr_container_detail::reversible_ptr_container<Config,Cl
>oneAllocator>::enforce_null_policy(const
>Object *,const char *)'
>1>        with
>1>        [
>1>
>Config=boost::ptr_container_detail::sequence_config<Object,std:
>:vector<void
>*,std::allocator<void *>>>,
>1>            CloneAllocator=boost::heap_clone_allocator
>1>        ]
>1>
>c:\it\personal\collision\sdk\boost\boost\ptr_container\ptr_sequ
ence_adapter.hpp(132)
>: see reference to class template instantiation
>'boost::ptr_container_detail::reversible_ptr_container<Config,C
>loneAllocator>'
>being compiled
>1>        with
>1>        [
>1>
>Config=boost::ptr_container_detail::sequence_config<Object,std:
>:vector<void
>*,std::allocator<void *>>>,
>1>            CloneAllocator=boost::heap_clone_allocator
>1>        ]
>1>c:\it\personal\collision\sdk\boost\boost\ptr_container\detail
>\reversible_ptr_container.hpp(247)
>: warning C4127: conditional expression is constant
>1>c:\it\personal\collision\sdk\boost\boost\ptr_container\detail
>\reversible_ptr_container.hpp(110)
>: warning C4127: conditional expression is constant
>1>
>c:\it\personal\collision\sdk\boost\boost\ptr_container\detail\r
eversible_ptr_container.hpp(109)
>: while compiling class template member function 'void
>boost::ptr_container_detail::reversible_ptr_container<Config,Cl
>oneAllocator>::null_clone_allocator<allow_null_values>::dealloc
>ate_clone(const
>Object *)'
>1>        with
>1>        [
>1>
>Config=boost::ptr_container_detail::sequence_config<Object,std:
>:vector<void
>*,std::allocator<void *>>>,
>1>            CloneAllocator=boost::heap_clone_allocator,
>1>            allow_null_values=false
>1>        ]
>1>
>c:\it\personal\collision\sdk\boost\boost\ptr_container\detail\r
eversible_ptr_container.hpp(52)
>: see reference to class template instantiation
>'boost::ptr_container_detail::reversible_ptr_container<Config,C
>loneAllocator>::null_clone_allocator<allow_null_values>'
>being compiled
>1>        with
>1>        [
>1>
>Config=boost::ptr_container_detail::sequence_config<Object,std:
>:vector<void
>*,std::allocator<void *>>>,
>1>            CloneAllocator=boost::heap_clone_allocator,
>1>            allow_null_values=false
>1>        ]
>1>
>c:\it\personal\collision\sdk\boost\boost\ptr_container\detail\s
tatic_move_ptr.hpp(85)
>: see reference to function template instantiation 'void
>boost::ptr_container_detail::clone_deleter<CloneAllocator>::operator
>()<Object>(const T *) const' being compiled
>1>        with
>1>        [
>1>
>CloneAllocator=boost::ptr_container_detail::reversible_ptr_cont
>ainer<boost::ptr_container_detail::sequence_config<Object,std::
>vector<void
>*,std::allocator<void
>*>>>,boost::heap_clone_allocator>::null_clone_allocator<false>,
>1>            T=Object
>1>        ]
>1>
>c:\it\personal\collision\sdk\boost\boost\ptr_container\detail\s
tatic_move_ptr.hpp(85)
>: while compiling class template member function
>'boost::ptr_container_detail::static_move_ptr<T,Deleter>::~stat
>ic_move_ptr(void)'
>1>        with
>1>        [
>1>            T=Object,
>1>
>Deleter=boost::ptr_container_detail::clone_deleter<boost::ptr_c
>ontainer_detail::reversible_ptr_container<boost::ptr_container_
>detail::sequence_config<Object,std::vector<void
>*,std::allocator<void
>*>>>,boost::heap_clone_allocator>::null_clone_allocator<false>>
>1>        ]
>1>
>c:\it\personal\collision\sdk\boost\boost\ptr_container\ptr_sequ
ence_adapter.hpp(182)
>: see reference to class template instantiation
>'boost::ptr_container_detail::static_move_ptr<T,Deleter>' 
>being compiled
>1>        with
>1>        [
>1>            T=Object,
>1>
>Deleter=boost::ptr_container_detail::clone_deleter<boost::ptr_c
>ontainer_detail::reversible_ptr_container<boost::ptr_container_
>detail::sequence_config<Object,std::vector<void
>*,std::allocator<void
>*>>>,boost::heap_clone_allocator>::null_clone_allocator<false>>
>1>        ]
>1>
>c:\it\personal\collision\sdk\boost\boost\ptr_container\ptr_sequ
ence_adapter.hpp(179)
>: while compiling class template member function 'void
>boost::ptr_sequence_adapter<T,VoidPtrSeq,CloneAllocator>::push_
>back(Object
>*)'
>1>        with
>1>        [
>1>            T=Object,
>1>            VoidPtrSeq=std::vector<void *,std::allocator<void *>>,
>1>            CloneAllocator=boost::heap_clone_allocator
>1>        ]
>_______________________________________________
>Unsubscribe & other changes: 
>http://lists.boost.org/mailman/listinfo.cgi/boost
>

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk