Boost logo

Boost :

From: Tom Brinkman (reportbase_at_[hidden])
Date: 2005-05-05 12:26:01


In the singleton documentation it states that "singletons" could/should
replace all global variables in an application. Does this comment
apply to global vectors as well.

I have a vector of boost::any which I've declared
static in a resource class.

<code below>

struct resource
{
        static std::vector<boost::any> resources;
        ...<more>...
};

std::vector<boost::any> resource::resouces;

How would one incorporate this global vector into
the singleton library to take advantage of its facilities.


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