Opened 10 years ago
Closed 10 years ago
#6935 closed Feature Requests (fixed)
Noncopyable gives compiler warning when used in DLL interface
Reported by: | 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
Change History (6)
comment:1 by , 10 years ago
Component: | None → utility |
---|---|
Owner: | set to |
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Cc: | added |
---|
comment:4 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Please could you provide a patch?
comment:5 by , 10 years ago
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 by , 10 years ago
Milestone: | To Be Determined → Boost 1.54.0 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
+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