This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15839] Requires definition of literal passed as const reference


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-06 04:44 -------
Invalid here is a reduced source:
struct t
{
 static const int t1 = 1;
};
int g(const int&){}
int main()
{
  g(t::t1);
}

The problem is that you do not define the static int any where(outside the class).  Read bug 13259 for 
more information as this is a dup of that bug.

Hint for the above testcase adding the following will work:
const int t::t1;

*** This bug has been marked as a duplicate of 13259 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15839


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]