| 230 | |
| 231 | template <typename T, typename std::enable_if<is_contiguous_container<T>::value && !is_contiguous_container<typename T::value_type>::value, int>::type = 0> |
| 232 | bool deserialize(IfcParse::impl::rocks_db_file_storage*, const std::string& val, T& t, bool prefixed = true) { |
| 233 | if (prefixed && val[0] != TypeEncoder::encode_type<T>()) { |
| 234 | return false; |
| 235 | } |
| 236 | auto s = (val.size() - (prefixed ? 1 : 0)) / sizeof(typename T::value_type); |
| 237 | t.resize(s); |
| 238 | memcpy(t.data(), val.data() + (prefixed ? 1 : 0), s * sizeof(typename T::value_type)); |
| 239 | return true; |
| 240 | } |
| 241 | |
| 242 | template <typename T, typename std::enable_if<is_contiguous_container<T>::value && is_contiguous_container<typename T::value_type>::value, int>::type = 0> |
| 243 | bool deserialize(IfcParse::impl::rocks_db_file_storage* storage, const std::string& val, T& t) { |
no test coverage detected