test/headers/implicit_cast.h in rbplusplus-1.0 vs test/headers/implicit_cast.h in rbplusplus-1.0.1
- old
+ new
@@ -53,55 +53,8 @@
}
bool isRight(Degree* degree) {
return degree->valueDegrees() == 90;
}
-
- /**
- * Classes to show how to turn off the implicit casting
- */
- class Explicit
- {
- public:
- Explicit(float v) {
- value = v;
- }
-
- Explicit(const Degree &d) {
- value = d.valueDegrees();
- }
-
- Explicit(const Radian &r) {
- value = r.valueDegrees();
- }
-
- float value;
- };
-
- float explicitValue(Explicit e) {
- return e.value;
- }
-
- class NotImplicit
- {
- public:
- NotImplicit(float v, int a) {
- value = v * a;
- }
-
- NotImplicit(const Degree &d) {
- value = d.valueDegrees();
- }
-
- NotImplicit(const Radian &r) {
- value = r.valueDegrees();
- }
-
- float value;
- };
-
- float notImplicitValue(NotImplicit i) {
- return i.value;
- }
}
#endif