Re: [Boost-bugs] [Boost C++ Libraries] #10911: boost/iostreams/filter/zlib.hpp gives C4275 warning with visual studio

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10911: boost/iostreams/filter/zlib.hpp gives C4275 warning with visual studio
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-06-30 07:40:27


#10911: boost/iostreams/filter/zlib.hpp gives C4275 warning with visual studio
------------------------------------------+-----------------------
  Reporter: Joseph Southwell <joseph@…> | Owner: turkanis
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: iostreams
   Version: Boost 1.57.0 | Severity: Cosmetic
Resolution: | Keywords:
------------------------------------------+-----------------------

Comment (by peter.klotz@…):

 We see the same kind of compiler warnings (in Boost 1.58.0) but emitted
 from several locations:

 {{{
 I:\Boost\1.58.0\include\boost/iostreams/filter/bzip2.hpp(112) : warning
 C4275: non dll-interface class
   'std::ios_base::failure' used as base for dll-interface class
 'boost::iostreams::bzip2_error'
         xiosbase(221) : see declaration of 'std::ios_base::failure'
         I:\Boost\1.58.0\include\boost/iostreams/filter/bzip2.hpp(112) :
 see declaration of 'boost::iostreams::bzip2_error'
 I:\Boost\1.58.0\include\boost/iostreams/filter/zlib.hpp(138) : warning
 C4275: non dll-interface class
   'std::ios_base::failure' used as base for dll-interface class
 'boost::iostreams::zlib_error'
         xiosbase(221) : see declaration of 'std::ios_base::failure'
         I:\Boost\1.58.0\include\boost/iostreams/filter/zlib.hpp(138) : see
 declaration of 'boost::iostreams::zlib_error'
 I:\Boost\1.58.0\include\boost/iostreams/filter/gzip.hpp(356) : warning
 C4251:
 'boost::iostreams::detail::gzip_header::file_name_' : class
 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
   needs to have dll-interface to be used by clients of class
 'boost::iostreams::detail::gzip_header'
 I:\Boost\1.58.0\include\boost/iostreams/filter/gzip.hpp(357) : warning
 C4251:
 'boost::iostreams::detail::gzip_header::comment_' : class
 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
   needs to have dll-interface to be used by clients of class
 'boost::iostreams::detail::gzip_header'
 }}}

 According to the MSDN C4275 and C4251 are non critical when deriving from
 or using STL types.

 C4275: [https://msdn.microsoft.com/en-us/library/3tdb471s.aspx][[BR]]
 C4251: [https://msdn.microsoft.com/en-us/library/esew7y1w.aspx]

 Since both std::ios_base::failure and std::string are STL types there
 should be no side effects from suppressing these warnings.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10911#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC