mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
added compile time assertion for _SECURE_SCL=0. It is very important that all libraries are compiled with the same _SECURE_SCL if you want to share STL functions between libraries.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@876 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -254,4 +254,24 @@ void Host_UpdateLogDisplay();
|
||||
#define _assert_(a)
|
||||
#define _assert_msg_(...)
|
||||
#endif
|
||||
|
||||
// compile time asserts
|
||||
namespace
|
||||
{
|
||||
|
||||
// it is very risky to mix _SECURE_SCL=0 and _SECURE_SCL=1 compiled libraries
|
||||
// it is possible that you overwrite memory if you do it
|
||||
|
||||
#ifndef _SECURE_SCL
|
||||
#error Please define _SECURE_SCL=0 in the project settings
|
||||
#else
|
||||
template <bool> struct CompileTimeAssert;
|
||||
template<> struct CompileTimeAssert<true> {};
|
||||
CompileTimeAssert<_SECURE_SCL==0> x;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif // #ifndef _COMMON_H
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user