mirror of
https://github.com/boostorg/parameter.git
synced 2026-01-29 19:52:12 +00:00
41 lines
826 B
C++
41 lines
826 B
C++
|
|
#line 35 "/home/daniel/dev/boost/trunk/libs/parameter/doc/index.rst"
|
|
#include <boost/parameter.hpp>
|
|
|
|
namespace test
|
|
{
|
|
BOOST_PARAMETER_NAME(title)
|
|
BOOST_PARAMETER_NAME(width)
|
|
BOOST_PARAMETER_NAME(titlebar)
|
|
|
|
BOOST_PARAMETER_FUNCTION(
|
|
(int), new_window, tag, (required (title,*)(width,*)(titlebar,*)))
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
BOOST_PARAMETER_TEMPLATE_KEYWORD(deleter)
|
|
BOOST_PARAMETER_TEMPLATE_KEYWORD(copy_policy)
|
|
|
|
template <class T> struct Deallocate {};
|
|
struct DeepCopy {};
|
|
|
|
namespace parameter = boost::parameter;
|
|
|
|
struct Foo {};
|
|
template <class T, class A0, class A1>
|
|
struct smart_ptr
|
|
{
|
|
smart_ptr(Foo*);
|
|
};
|
|
}
|
|
using namespace test;
|
|
int x =
|
|
#line 19
|
|
new_window("alert", _width=10, _titlebar=false);
|
|
|
|
smart_ptr<
|
|
Foo
|
|
, deleter<Deallocate<Foo> >
|
|
, copy_policy<DeepCopy> > p(new Foo);
|