Files
typeof/test/noncopyable.cpp
Arkadiy Vertleyb c357f29a5b added more tests
[SVN r31048]
2005-09-20 01:32:56 +00:00

33 lines
469 B
C++
Executable File

#include "test.hpp"
#include <boost/noncopyable.hpp>
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
struct x : boost::noncopyable
{
void foo() {}
void bar() const {}
};
BOOST_TYPEOF_REGISTER_TYPE(x)
x& make_ref()
{
static x result;
return result;
}
const x& make_const_ref()
{
static x result;
return result;
}
void foo()
{
BOOST_AUTO(& v1, make_ref());
v1.foo();
BOOST_AUTO(const& v2, make_const_ref());
v2.bar();
}