1 | // Licensed to the .NET Foundation under one or more agreements. |
2 | // The .NET Foundation licenses this file to you under the MIT license. |
3 | // See the LICENSE file in the project root for more information. |
4 | // --------------------------------------------------------------------------- |
5 | // static_assert.h |
6 | // |
7 | // Static assertion infrastructure |
8 | // --------------------------------------------------------------------------- |
9 | |
10 | //-------------------------------------------------------------------------------- |
11 | // static_assert represents a check which should be made at compile time. It |
12 | // can only be done on a constant expression. |
13 | //-------------------------------------------------------------------------------- |
14 | |
15 | #ifndef __STATIC_ASSERT_H__ |
16 | #define __STATIC_ASSERT_H__ |
17 | |
18 | // static_assert( cond, msg ) is now a compiler-supported intrinsic in Dev10 C++ compiler. |
19 | // Replaces previous uses of STATIC_ASSERT_MSG and COMPILE_TIME_ASSERT_MSG. |
20 | |
21 | // Replaces previous uses of CPP_ASSERT |
22 | #define static_assert_n( n, cond ) static_assert( cond, #cond ) |
23 | |
24 | // Replaces previous uses of C_ASSERT and COMPILE_TIME_ASSERT |
25 | #define static_assert_no_msg( cond ) static_assert( cond, #cond ) |
26 | |
27 | #endif // __STATIC_ASSERT_H__ |
28 | |
29 | |