forked from boostorg/function
Initial Boost.Function commit
[SVN r10372]
This commit is contained in:
25
test/mixin_test.cpp
Normal file
25
test/mixin_test.cpp
Normal file
@ -0,0 +1,25 @@
|
||||
#define BOOST_INCLUDE_MAIN
|
||||
#include <boost/test/test_tools.hpp>
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
#include <boost/function.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
|
||||
struct id_mixin
|
||||
{
|
||||
int id;
|
||||
};
|
||||
|
||||
int
|
||||
test_main(int, char*[])
|
||||
{
|
||||
function<int, int, int>::mixin<id_mixin>::type f;
|
||||
f = plus<int>();
|
||||
f.id = 7;
|
||||
f.clear();
|
||||
BOOST_TEST(f.id == 7);
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user