Line data Source code
1 : #ifndef AA87CB1E_24B7_405C_96A5_3305B5FF7DB9
2 : #define AA87CB1E_24B7_405C_96A5_3305B5FF7DB9
3 :
4 : #include <type_traits>
5 :
6 : namespace tracking
7 : {
8 : namespace base
9 : {
10 : namespace contract
11 : {
12 :
13 : template <typename ImplType>
14 : class RequireAbstractIntf
15 : {
16 : public:
17 24 : RequireAbstractIntf()
18 : {
19 : static_assert(std::is_abstract<ImplType>::value, "class is not pure virtual");
20 : static_assert(std::has_virtual_destructor<ImplType>::value, "destructor has to be virtual");
21 : }
22 : };
23 :
24 : } // namespace contract
25 : } // namespace base
26 : } // namespace tracking
27 :
28 : #endif // AA87CB1E_24B7_405C_96A5_3305B5FF7DB9
|