forked from boostorg/core
work-around for Borland addressof(array) bug and associated tests
[SVN r27656]
This commit is contained in:
committed by
Peter Dimov
parent
f9eab708f1
commit
109d1d8c8d
@@ -36,6 +36,14 @@ int test_main(int, char*[])
|
||||
|
||||
const volatile nonaddressable& cvx = *px;
|
||||
BOOST_CHECK(boost::addressof(cvx) == static_cast<const volatile nonaddressable*>(px));
|
||||
|
||||
|
||||
int nrg[3] = {1,2,3};
|
||||
int (*pnrg)[3] = &nrg;
|
||||
BOOST_CHECK(boost::addressof(nrg) == pnrg);
|
||||
|
||||
int const cnrg[3] = {1,2,3};
|
||||
int const (*pcnrg)[3] = &cnrg;
|
||||
BOOST_CHECK(boost::addressof(cnrg) == pcnrg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user