MCPcopy Create free account
hub / github.com/SqliteModernCpp/sqlite_modern_cpp / variant_select

Function variant_select

hdr/sqlite_modern_cpp/utility/variant.h:177–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175
176 template<typename ...Options>
177 inline auto variant_select(int type) {
178 return [type](auto &&callback) {
179 using Callback = decltype(callback);
180 switch(type) {
181 case SQLITE_NULL:
182 variant_select_null<Callback, Options...>(std::forward<Callback>(callback));
183 break;
184 case SQLITE_INTEGER:
185 variant_select_integer<Callback, Options...>(std::forward<Callback>(callback));
186 break;
187 case SQLITE_FLOAT:
188 variant_select_float<Callback, Options...>(std::forward<Callback>(callback));
189 break;
190 case SQLITE_TEXT:
191 variant_select_text<Callback, Options...>(std::forward<Callback>(callback));
192 break;
193 case SQLITE_BLOB:
194 variant_select_blob<Callback, Options...>(std::forward<Callback>(callback));
195 break;
196 default:;
197 /* assert(false); */
198 }
199 };
200 }
201}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected