]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/mode.h
Add no-throw destructors to exception classes that were lacking one
[libs/core.git] / source / io / mode.h
index 5e103f278907be65a1f7f91da38ac34c5d113301..706609f03f4bb7c5c8b40c111b1da11f02d4581d 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef MSP_IO_MODE_H_
 #define MSP_IO_MODE_H_
 
+#include <stdexcept>
+
 namespace Msp {
 namespace IO {
 
@@ -23,6 +25,14 @@ inline Mode operator&(Mode m, Mode n)
 inline Mode operator~(Mode m)
 { return Mode(~static_cast<int>(m)); }
 
+
+class invalid_access: public std::logic_error
+{
+public:
+       invalid_access(Mode);
+       ~invalid_access() throw() { }
+};
+
 } // namespace IO
 } // namespace Msp