Re: [Boost-bugs] [Boost C++ Libraries] #6502: Many warnings when using Intel compiler

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6502: Many warnings when using Intel compiler
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-03-19 22:17:24


#6502: Many warnings when using Intel compiler
--------------------------------------+-------------------------------------
  Reporter: anonymous | Owner: eric_niebler
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: proto
   Version: Boost Development Trunk | Severity: Cosmetic
Resolution: invalid | Keywords:
--------------------------------------+-------------------------------------
Changes (by eric_niebler):

  * status: new => closed
  * resolution: => invalid

Comment:

 Warning 2536 is certainly wrong. By const-qualifying temporary
 expressions, I guarantee that they can be bound to arguments of function
 templates that are non-const references; that is, in the code below, the
 type {{{T}}} is deduced to be {{{S const}}}.

 {{{
 struct S {};
 S const make_S() { return S(); }
 template<typename T> void fun(T & t) {}
 int main() {
   fun(make_S());
 }
 }}}

 Had {{{make_S}}} not returned a const-qualified value, it could not have
 been passed to {{{fun}}}. Proto uses this trick to eliminate superflous
 overloads.

 As for warning 411, there is no problem I know of with putting references
 in structs and initializing them with aggregate initialization instead of
 with constructors. In fact, adding a constructor to Proto's expression
 types would make them non-POD, voiding any guarantees about static
 construction.

 If you can tell me how to push/pop/disable warnings (like msvc), I can see
 about cleaning up the spew. Otherwise, we're just going to have to live
 with it. :-(

 Closing as invalid for now.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6502#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:50:09 UTC