Re: [Boost-bugs] [Boost C++ Libraries] #1672: [foreach] compiler warnings from VC8/VC9

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1672: [foreach] compiler warnings from VC8/VC9
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-03-07 00:11:10


#1672: [foreach] compiler warnings from VC8/VC9
----------------------------------------------------------+-----------------
  Reporter: Richard Webb <richard.webb_at_[hidden]> | Owner: eric_niebler
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: foreach
   Version: Boost Development Trunk | Severity: Cosmetic
Resolution: | Keywords:
----------------------------------------------------------+-----------------
Comment (by Richard Webb <richard.webb_at_[hidden]>):

 I think that it's complaining about the use of references in the if
 statements in the BOOST_FOREACH macro.

 I get the same 'uninitialized memory' warning if i do things like:

 {{{
 struct foo
 {
         operator bool() const
         {
                 return false;
         }
 };

 int main(int, _TCHAR*)
 {
         foo afoo;
         if (const foo& f = afoo)
         {
                 f;
         }

         return 0;
 }
 }}}

 or even just:

 {{{
 int _tmain(int, _TCHAR*)
 {
         if (const int& i = 0)
         {

         }

         return 0;
 }
 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1672#comment:2>
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:49:57 UTC