2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-21 05:02:17 +00:00
Files
python/pyste/example/basic.h
Bruno da Silva de Oliveira 44b2e1ef8b - Default policy for functions/methods that return const T& is now
return_value_policy<copy_const_reference>().


[SVN r18077]
2003-03-24 23:25:14 +00:00

32 lines
404 B
C++

#include <string>
namespace basic {
struct C
{
virtual int f(int x = 10)
{
return x*2;
}
int foo(int x=1){
return x+1;
}
const std::string& name() { return _name; }
void set_name(const std::string& name) { _name = name; }
std::string _name;
};
int call_f(C& c)
{
return c.f();
}
int call_f(C& c, int x)
{
return c.f(x);
}
}