forked from boostorg/function
Don't test new syntax if partial specialization is unavailable
[SVN r14536]
This commit is contained in:
@ -84,6 +84,7 @@ test_main(int, char*[])
|
|||||||
fv = &do_nothing;
|
fv = &do_nothing;
|
||||||
fv.clear();
|
fv.clear();
|
||||||
|
|
||||||
|
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
typedef int Ftype(int, int);
|
typedef int Ftype(int, int);
|
||||||
function<Ftype, empty_function_policy, empty_function_mixin,
|
function<Ftype, empty_function_policy, empty_function_mixin,
|
||||||
counting_allocator<int> > f2;
|
counting_allocator<int> > f2;
|
||||||
@ -93,6 +94,7 @@ test_main(int, char*[])
|
|||||||
f2.clear();
|
f2.clear();
|
||||||
BOOST_TEST(alloc_count == 1);
|
BOOST_TEST(alloc_count == 1);
|
||||||
BOOST_TEST(dealloc_count == 1);
|
BOOST_TEST(dealloc_count == 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -635,6 +635,7 @@ test_ref()
|
|||||||
static void
|
static void
|
||||||
test_new_syntax()
|
test_new_syntax()
|
||||||
{
|
{
|
||||||
|
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
write_five_obj five;
|
write_five_obj five;
|
||||||
function<void()> v2;
|
function<void()> v2;
|
||||||
|
|
||||||
@ -654,6 +655,7 @@ test_new_syntax()
|
|||||||
typedef int Fsum(short lhs, short rhs);
|
typedef int Fsum(short lhs, short rhs);
|
||||||
function<Fsum> sum(&sum_ints);
|
function<Fsum> sum(&sum_ints);
|
||||||
BOOST_TEST(sum(2, 3) == 5);
|
BOOST_TEST(sum(2, 3) == 5);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int test_main(int, char* [])
|
int test_main(int, char* [])
|
||||||
|
Reference in New Issue
Block a user