gnu.g++.help
[Top] [All Lists]

Re: attribute on a static member of a template class

Subject: Re: attribute on a static member of a template class
From: "jinxidoru"
Date: 8 May 2006 18:24:24 -0700
Newsgroups: gnu.g++.help
I figured out how to do this, so I figured I might as well post it here
in case anyone was wondering.  I added the following constructor:

myclass() { if ( false )  do_me_first(); }

This causes the compiler to create the function and place it in the
object file, but the constructor is optimized out by the linker.

I still figure there should be a better way to do this, but this will
work in the mean time.


<Prev in Thread] Current Thread [Next in Thread>