Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-09-24 13:57:39


Alexander Nasonov <alnsn-mycop_at_[hidden]> writes:

> Any interest in static_list class?

It's a nice idea to formalize this. I've used the idiom in the past.
The one *major* problem with it is that a translation unit's static
initialization is not required to happen until such time as some
function in that translation unit is invoked. The result is that you
can't simply link together TUs which contain some class description
and the associated registration object, and expect the registration to
happen.

Ultimately, to be reliable, you need explicit calls to initialization
functions :(, which makes this technique much less useful than it
could be.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk