forked from boostorg/regex
Remove a lot of boost dependencies and workarounds.
This commit is contained in:
@ -15,7 +15,14 @@
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Test code for a generic object cache.
|
||||
*/
|
||||
#include <boost/regex/pending/object_cache.hpp>
|
||||
#include <boost/regex/config.hpp>
|
||||
#ifdef BOOST_REGEX_CXX03
|
||||
#include <boost/regex/v4/object_cache.hpp>
|
||||
#define SP_NS boost
|
||||
#else
|
||||
#include <boost/regex/v5/object_cache.hpp>
|
||||
#define SP_NS std
|
||||
#endif
|
||||
#include <boost/detail/lightweight_main.hpp>
|
||||
#include "../test_macros.hpp"
|
||||
|
||||
@ -49,7 +56,7 @@ int cpp_main(int /*argc*/, char * /*argv*/[])
|
||||
int i;
|
||||
for(i = 0; i < 20; ++i)
|
||||
{
|
||||
boost::shared_ptr<const test_object> p = boost::object_cache<int, test_object>::get(i, max_cache_size);
|
||||
SP_NS::shared_ptr<const test_object> p = boost::object_cache<int, test_object>::get(i, max_cache_size);
|
||||
BOOST_CHECK(p->value() == i);
|
||||
p = boost::object_cache<int, test_object>::get(i, max_cache_size);
|
||||
BOOST_CHECK(p->value() == i);
|
||||
@ -64,7 +71,7 @@ int cpp_main(int /*argc*/, char * /*argv*/[])
|
||||
{
|
||||
for(i = 20 - max_cache_size; i < 20; ++i)
|
||||
{
|
||||
boost::shared_ptr<const test_object> p = boost::object_cache<int, test_object>::get(i, max_cache_size);
|
||||
SP_NS::shared_ptr<const test_object> p = boost::object_cache<int, test_object>::get(i, max_cache_size);
|
||||
BOOST_CHECK(p->value() == i);
|
||||
p = boost::object_cache<int, test_object>::get(i, max_cache_size);
|
||||
BOOST_CHECK(p->value() == i);
|
||||
|
Reference in New Issue
Block a user