Author: faridz
Date: Thu Mar  1 09:01:07 2007
New Revision: 513406

URL: http://svn.apache.org/viewvc?view=rev&rev=513406
Log:
2007-03-01  Farid Zaripov <[EMAIL PROTECTED]>

        * 18.limits.traps.cpp (test_trap): New function to avoid MSVC error 
C2712:
        Cannot use __try in functions that require object unwinding;
        (test_traps) Used test_trap() function.

Modified:
    incubator/stdcxx/trunk/tests/support/18.limits.traps.cpp

Modified: incubator/stdcxx/trunk/tests/support/18.limits.traps.cpp
URL: 
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/support/18.limits.traps.cpp?view=diff&rev=513406&r1=513405&r2=513406
==============================================================================
--- incubator/stdcxx/trunk/tests/support/18.limits.traps.cpp (original)
+++ incubator/stdcxx/trunk/tests/support/18.limits.traps.cpp Thu Mar  1 
09:01:07 2007
@@ -83,6 +83,20 @@
 
 
 template <class numT>
+static inline void
+test_trap (const volatile numT &one, const volatile numT &zero,
+           numT &result, bool &trapped)
+{
+    TRY {
+        result = one / zero;
+    }
+    EXCEPT (1) {
+        // Windows SEH hackery
+        trapped = true;
+    }
+}
+
+template <class numT>
 numT test_traps (numT, int lineno, bool)
 {
     static const char* const tname = rw_any_t (numT ()).type_name ();
@@ -138,6 +152,7 @@
             // Windows SEH hackery
             trapped = true;
         }
+//        test_trap (one, zero, result, trapped);
     }
 
     rw_assert (trapped == traps, 0, lineno,


Reply via email to