@@ -733,22 +733,22 @@ class DLL_API TestParamToInterfacePassBaseOne
733733
734734class DLL_API TestParamToInterfacePassBaseTwo
735735{
736- int m;
736+ int m;
737737public:
738- int getM ();
739- void setM (int n);
740- const TestParamToInterfacePassBaseTwo& operator ++();
741- TestParamToInterfacePassBaseTwo ();
742- TestParamToInterfacePassBaseTwo (int n);
738+ int getM ();
739+ void setM (int n);
740+ const TestParamToInterfacePassBaseTwo& operator ++();
741+ TestParamToInterfacePassBaseTwo ();
742+ TestParamToInterfacePassBaseTwo (int n);
743743};
744744
745745class DLL_API TestParamToInterfacePass : public TestParamToInterfacePassBaseOne, public TestParamToInterfacePassBaseTwo
746746{
747747public:
748- TestParamToInterfacePassBaseTwo addM (TestParamToInterfacePassBaseTwo b);
749- TestParamToInterfacePassBaseTwo operator +(TestParamToInterfacePassBaseTwo b);
750- TestParamToInterfacePass (TestParamToInterfacePassBaseTwo b);
751- TestParamToInterfacePass ();
748+ TestParamToInterfacePassBaseTwo addM (TestParamToInterfacePassBaseTwo b);
749+ TestParamToInterfacePassBaseTwo operator +(TestParamToInterfacePassBaseTwo b);
750+ TestParamToInterfacePass (TestParamToInterfacePassBaseTwo b);
751+ TestParamToInterfacePass ();
752752};
753753
754754class DLL_API HasProtectedVirtual
@@ -973,18 +973,18 @@ class DLL_API ClassWithVirtualBase : public virtual Foo
973973
974974namespace NamespaceA
975975{
976- CS_VALUE_TYPE class DLL_API A
977- {
978- };
976+ CS_VALUE_TYPE class DLL_API A
977+ {
978+ };
979979}
980980
981981namespace NamespaceB
982982{
983- class DLL_API B
984- {
985- public:
986- void Function (CS_OUT NamespaceA::A &a);
987- };
983+ class DLL_API B
984+ {
985+ public:
986+ void Function (CS_OUT NamespaceA::A &a);
987+ };
988988}
989989
990990class DLL_API HasPrivateVirtualProperty
@@ -1607,6 +1607,37 @@ DLL_API extern PointerTester* PointerToClass;
16071607union DLL_API UnionTester {
16081608 float a;
16091609 int b;
1610+ inline bool operator ==(const UnionTester& other) const {
1611+ return b == other.b ;
1612+ }
16101613};
16111614
16121615int DLL_API ValueTypeOutParameter (CS_OUT UnionTester* testerA, CS_OUT UnionTester* testerB);
1616+
1617+ template <class T >
1618+ class Optional {
1619+ public:
1620+ T m_value;
1621+ bool m_hasValue;
1622+
1623+ Optional () {
1624+ m_hasValue = false ;
1625+ }
1626+
1627+ Optional (T value) {
1628+ m_value = std::move (value);
1629+ m_hasValue = true ;
1630+ }
1631+
1632+ inline bool operator ==(const Optional<T>& rhs) const {
1633+ return (m_hasValue == rhs.m_hasValue && (!m_hasValue || m_value == rhs.m_value ));
1634+ }
1635+
1636+ inline bool operator ==(const T& rhs) const {
1637+ return (m_hasValue && m_value == rhs);
1638+ }
1639+ };
1640+
1641+ // We just need a method that uses various instantiations of Optional.
1642+ inline void DLL_API InstantiateOptionalTemplate (Optional<unsigned int >, Optional<std::string>,
1643+ Optional<TestComparison>, Optional<char *>, Optional<UnionTester>) { }
0 commit comments