Disable is_integral check because it fails for strong-type-def
This commit is contained in:
committed by
Patrick Niklaus
parent
609801ae99
commit
e96545be2e
@@ -3,9 +3,9 @@
|
||||
|
||||
#include "extractor/external_memory_node.hpp"
|
||||
#include "extractor/node_based_edge.hpp"
|
||||
#include "extractor/packed_osm_ids.hpp"
|
||||
#include "extractor/query_node.hpp"
|
||||
#include "extractor/restriction.hpp"
|
||||
#include "extractor/packed_osm_ids.hpp"
|
||||
#include "storage/io.hpp"
|
||||
#include "util/exception.hpp"
|
||||
#include "util/fingerprint.hpp"
|
||||
|
||||
@@ -33,7 +33,8 @@ namespace detail
|
||||
{
|
||||
template <typename T, std::size_t Bits, storage::Ownership Ownership> class PackedVector
|
||||
{
|
||||
static_assert(std::is_integral<T>, "T must be an integral type.");
|
||||
// This fails for all strong typedef types
|
||||
// static_assert(std::is_integral<T>::value, "T must be an integral type.");
|
||||
static_assert(sizeof(T) <= sizeof(std::uint64_t), "Maximum size of type T is 8 bytes");
|
||||
static_assert(Bits > 0, "Minimum number of bits is 0.");
|
||||
static_assert(Bits <= sizeof(std::uint64_t) * CHAR_BIT, "Maximum number of bits is 64.");
|
||||
|
||||
@@ -22,7 +22,8 @@ inline void read(storage::io::FileReader &reader, detail::PackedVector<T, Bits,
|
||||
}
|
||||
|
||||
template <typename T, std::size_t Bits, storage::Ownership Ownership>
|
||||
inline void write(storage::io::FileWriter &writer, const detail::PackedVector<T, Bits, Ownership> &vec)
|
||||
inline void write(storage::io::FileWriter &writer,
|
||||
const detail::PackedVector<T, Bits, Ownership> &vec)
|
||||
{
|
||||
writer.WriteOne(vec.num_elements);
|
||||
storage::serialization::write(writer, vec.vec);
|
||||
|
||||
Reference in New Issue
Block a user