test/headers/default_arguments.h in rbplusplus-1.0.1 vs test/headers/default_arguments.h in rbplusplus-1.0.3
- old
+ new
@@ -74,9 +74,21 @@
// Seen in Ogre3D
int modify2(int value, Ops* by = 0) {
return value;
}
+ class CustomType {
+ public:
+ CustomType(int value) { theValue = value; };
+ int theValue;
+
+ // Function calls
+ static CustomType someValue() { return CustomType(3); }
+ };
+
+ int defaultWithFunction(CustomType x = CustomType::someValue()) {
+ return x.theValue;
+ }
}
#endif // __DEFAULT_ARGS_H__