Modify

Ticket #6935 (closed Feature Requests: fixed)

Opened 2 years ago

Last modified 12 months ago

Noncopyable gives compiler warning when used in DLL interface

Reported by: Fredrik Orderud <forderud@…> Owned by: viboes
Milestone: Boost 1.54.0 Component: utility
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc: mateusz@…

Description

Inheritance from boost::noncopyable in a DLL interface class with the Microsoft Visual C++ 2010 compiler gives a warning C4275: non dll-interface class 'boost::noncopyable_::noncopyable' used as base for dll-interface class.

It would be great if there had been a straight-forward method for disabling this warning. One possibility could be to disable it in boost/config/user.hpp, but noncopyable.hpp does unfortunately not include this file.

Could it be possible for noncopyable.hpp to either include boost/config/user.hpp (through config.hpp) or provide another means for disabling this warning?

Thanks in advance, Fredrik Orderud

Attachments

Change History

comment:1 Changed 2 years ago by viboes

  • Owner set to no-maintainer
  • Component changed from None to utility

comment:2 Changed 19 months ago by mboard182@…

+1 - it is tough to get through the code review process with the #pragma warning disable ... I guess for now I will have to roll my own noncopyable

comment:3 Changed 14 months ago by mloskot

  • Cc mateusz@… added

comment:4 Changed 12 months ago by viboes

  • Owner changed from no-maintainer to viboes
  • Status changed from new to assigned

Please could you provide a patch?

comment:5 Changed 12 months ago by Fredrik Orderud <forderud@…>

As or r83833 boost::noncopyable now already include boost/config/user.hpp (via boost/config.hpp). This allows me to (globally) disable warning C4275 in boost/config/user.hpp, which is good enought for me.

It's ok for me to resolve the issue.

comment:6 Changed 12 months ago by viboes

  • Status changed from assigned to closed
  • Resolution set to fixed
  • Milestone changed from To Be Determined to Boost 1.54.0
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.