/
UCS
/
sqlite_orm
Обзор
Документация
Войти
/
UCS
/
sqlite_orm
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
1.5
dev/index.h
34 строки
934 B
Doozy
format all files using clang format
14 окт 2019, 23:30
Не верифицирован
14 окт 2019, 23:30
e8a2cda
Код
Авторство
О чём код?
#pragma once #include <tuple> // std::tuple, std::make_tuple #include <string> // std::string #include <utility> // std::forward namespace sqlite_orm { namespace internal { template<class... Cols> struct index_t { using columns_type = std::tuple<Cols...>; using object_type = void; std::string name; bool unique; columns_type columns; template<class L> void for_each_column_with_constraints(const L &) {} }; } template<class... Cols> internal::index_t<Cols...> make_index(const std::string &name, Cols... cols) { return {name, false, std::make_tuple(std::forward<Cols>(cols)...)}; } template<class... Cols> internal::index_t<Cols...> make_unique_index(const std::string &name, Cols... cols) { return {name, true, std::make_tuple(std::forward<Cols>(cols)...)}; } }