• R/O
  • SSH

libcpptools: Commit

This library contains code that extends and simplifies different operations
for C++ language based programs


Commit MetaInfo

Revisionc2f9fc911bf0f38b107eb071de60575dd2b4429a (tree)
Zeit2015-07-20 02:01:01
Autors.gusarov
Commiters.gusarov

Log Message

Saved exception_ptr wrapper for history

Ändern Zusammenfassung

Diff

diff -r a8f48d817aef -r c2f9fc911bf0 include/cpptools/std/exception
--- a/include/cpptools/std/exception Sun Jul 19 19:46:50 2015 +0300
+++ b/include/cpptools/std/exception Sun Jul 19 20:01:01 2015 +0300
@@ -100,4 +100,21 @@
100100 } // namespace std
101101 /* *INDENT-ON* */
102102
103+/*
104+ * TODO: Consider creating of std::exception_ptr wrapper.
105+ * Before MS VC++2013 it doesn't meet NullablePointer requirements
106+ */
107+
108+// TODO: Check whether this function is available on Windows XP
109+_CRTIMP_PURE bool __CLRCALL_PURE_OR_CDECL __ExceptionPtrToBool(_In_ const void*);
110+
111+class exception_ptr : public std::exception_ptr
112+{
113+public:
114+ operator bool() const CT_NOEXCEPT
115+ {
116+ return __ExceptionPtrToBool(this);
117+ }
118+};
119+
103120 #endif
Show on old repository browser