source:
liblaziness/assert.h
@
26
| Last change on this file since 26 was 4, checked in by artyom, 13 years ago | |
|---|---|
| File size: 310 bytes | |
| Line | |
|---|---|
| 1 | #ifndef __ASSERT_H__ |
| 2 | #define __ASSERT_H__ |
| 3 | #include <type_traits> |
| 4 | |
| 5 | template <bool> class _assert; |
| 6 | |
| 7 | template <> class _assert<true> { }; |
| 8 | |
| 9 | template<typename T, typename U, bool suppress = false> |
| 10 | class _assert_subclass |
| 11 | : _assert<suppress || std::is_base_of<U, T>::value || std::is_same<U, T>::value> |
| 12 | { |
| 13 | }; |
| 14 | |
| 15 | #endif |
Note: See TracBrowser
for help on using the repository browser.
![(please configure the [header_logo] section in trac.ini)](/trac/tamop/chrome/site/your_project_logo.png)