help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: attribute on a static member of a template class


From: jinxidoru
Subject: Re: attribute on a static member of a template class
Date: 8 May 2006 18:24:24 -0700
User-agent: G2/0.2

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]