Opened 15 years ago

Closed 15 years ago

#974 closed Bugs (fixed)

spurious warning suppression code useful in shared_ptr.hpp

Reported by: Paul A. Bristow Owned by: Peter Dimov
Milestone: Component: smart_ptr
Version: Boost 1.34.0 Severity: Cosmetic
Keywords: shared_ptr spurious warning Cc:

Description

#ifdef _MANAGED C4793) 'vararg' : causes native code generation for function 'void boost::detail::sp_enable_shared_from_this(const boost::detail::shared_count &,...)' Avoid using vararg ... with a dummy.

struct sp_any_pointer {

template<class T> sp_any_pointer( T* ) {}

};

inline void sp_enable_shared_from_this( shared_count const & /*pn*/, sp_any_pointer, sp_any_pointer ) { }

#else NOT managed.

#ifdef sgi Turn off: the last argument of the varargs function "sp_enable_shared_from_this" is unnamed # pragma set woff 3506 #endif

inline void sp_enable_shared_from_this( shared_count const & /*pn*/, ... ) { }

#ifdef sgi # pragma reset woff 3506 #endif

#endif _MANAGED

Attachments (1)

shared_ptr.hpp (13.6 KB ) - added by Paul A. Bristow 15 years ago.
shared_ptr including warning supression

Download all attachments as: .zip

Change History (5)

by Paul A. Bristow, 15 years ago

Attachment: shared_ptr.hpp added

shared_ptr including warning supression

comment:1 by René Rivera, 15 years ago

Component: Building Boostsmart_ptr

comment:2 by Paul A. Bristow, 15 years ago

Previous attached file was wrong. Blush :-(

Paul

comment:3 by Peter Dimov, 15 years ago

Owner: set to Peter Dimov
Status: newassigned

comment:4 by Peter Dimov, 15 years ago

Resolution: fixed
Status: assignedclosed

This is already fixed in CVS HEAD.

Note: See TracTickets for help on using tickets.