|
Boost : |
From: christopher diggins (cdiggins_at_[hidden])
Date: 2005-01-28 17:15:08
Hello all,
I just realized that an empty BIL interface,
BOOST_IDL_BEGIN(IAnything)
BOOST_IDL_EMPTY(IAnything)
has some common ground with:
boost::any
Where boost::any stores a copy of a value of practical any type for later
extraction, IAnything can point to just about anything.
void BoostAnyTest() {
int x = 5;
boost::any a = x;
TEST(any_cast<int>(a) == 5);
}
void AnythingTest() {
int x = 5;
IAnything a = x;
TEST(extract<int>(a) == 5);
}
void ObjectTests() {
BoostAnyTest();
AnythingTest();
}
I just thought this could lead to some kind of connection between the
libraries. It might be nice to see this in the boost::any namespace, i.e. a
boost::any::any_ref.
Christopher Diggins
Object Oriented Template Library (OOTL)
http://www.ootl.org
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk