#1414 closed Feature Requests (fixed)
Warning suppression desirable for ios_state
Reported by: | Paul A. Bristow | Owned by: | Daryle Walker |
---|---|---|---|
Milestone: | Boost 1.36.0 | Component: | io |
Version: | Boost 1.34.1 | Severity: | Cosmetic |
Keywords: | warning ios_state | Cc: |
Description
It is most desirable for this warning to be suppressed to allow use at MSVC level 4 without several warnings - that I am confident are not helpful.
#ifndef BOOST_IO_IOS_STATE_HPP #define BOOST_IO_IOS_STATE_HPP
#if defined (_MSC_VER) # pragma warning (push) # pragma warning(disable : 4512) assignment operator could not be generated #endif
and at the end
#if defined (_MSC_VER) # pragma warning (pop) #endif
Attachments (1)
Change History (5)
comment:1 by , 15 years ago
by , 15 years ago
comment:3 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [53425]) Add private assignment operators.
Patch from Richard Webb. This fixes #1414, where msvc complained that default assignment operator could not be generated. This can be fixed either by pragmas, or by declaring (but not defining), private assignment operator. The latter approach seems better, since it's likely to help on other compilers.
Running the ios tests on VC9 with warning level 4 results in the warnings:
Some of the classes in ios_state.hpp already have private assignment operators, which avoids this warning. The attached patch adds them to the other classes, and silences the rest of the warnings.