/
UCS
/
sqlite_orm
Обзор
Документация
Войти
/
UCS
/
sqlite_orm
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
dev/optional_container.h
33 строки
706 B
fnc12
changed PointerAlignment from Right to Left
21 ноя 2020, 20:38
21 ноя 2020, 20:38
1eaff43
Код
Авторство
О чём код?
#pragma once namespace sqlite_orm { namespace internal { /** * This is a cute class which allows storing something or nothing * depending on template argument. Useful for optional class members */ template<class T> struct optional_container { using type = T; type field; template<class L> void apply(const L& l) const { l(this->field); } }; template<> struct optional_container<void> { using type = void; template<class L> void apply(const L&) const { //.. } }; } }