
Hi, Thanks for that answer, but I still don't think I understand. This sample test code builds with and without the -features=tmplrefstatic argument, so I guess I need a code example to clarify it, if you don't mind. Thank you, -Sid Sacek template< typename Ty > struct XYZ { static int si; static void foo( void ); XYZ( void ) { si = 555; foo(); } }; int XYZ< int >::si = 333; template<> void XYZ< int >::foo( void ) { return; } int main( void ) { XYZ< int > xyz; } -----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Simon Atanasyan Sent: Friday, September 28, 2007 1:24 PM To: boost@lists.boost.org Subject: Re: [boost] SUN Compiler option -features=tmplrefstatic The short answer is very simple. By default Sun C++ compiler does not allow to refer static symbols from templates. -features=tmplrefstatic turns on this ability. 2007/9/28, Sid Sacek <ssacek@appsecinc.com>:
To whom it may concern,
When compiling Boost code using the Sun compiler, the Boost documentation makes this statement.
Quote: When using this compiler on complex C++ code, such as the Boost C++
library,
it is recommended to specify the following options when intializing the sun module: -library=stlport4 -features=tmplife -features=tmplrefstatic End-Quote:
I don't understand the effect of the 'tmplrefstatic' argument on the compiled code. Why is that option recommended, ie. What does it do?
I searched the web for a couple of hours for an explanation and couldn't find an answer to my question. I'm hoping somebody on this list knows because Boost is recommending it.
Thanks in advance, -Sid Sacek
-- Simon Atanasyan _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost