/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Alignment/Geners/interface/IOIsPOD.hh
38 строк
1 KB
Ivan Razumov
Remove references to deprecated std::is_pod
08 апр 2024, 10:10
08 апр 2024, 10:10
d86b146
Код
Авторство
О чём код?
#ifndef GENERS_IOISPOD_HH_ #define GENERS_IOISPOD_HH_ #include "Alignment/Geners/interface/CPP11_type_traits.hh" namespace gs { // In the following template, enum "IsPOD" is evaluated to 1 // at compile time if T belongs to one of the known POD types. template <typename T> struct IOIsPOD { enum { value = std::is_standard_layout<T>::value && std::is_trivial<T>::value }; }; } // namespace gs // Use the following macro (outside of any namespace) // to declare some struct as POD for I/O purposes // #define gs_declare_type_as_pod(T) /**/ \ namespace gs { \ template <> \ struct IOIsPOD<T> { \ enum { value = 1 }; \ }; \ template <> \ struct IOIsPOD<T const> { \ enum { value = 1 }; \ }; \ template <> \ struct IOIsPOD<T volatile> { \ enum { value = 1 }; \ }; \ template <> \ struct IOIsPOD<T const volatile> { \ enum { value = 1 }; \ }; \ } #endif // GENERS_IOISPOD_HH_