mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
alignof() should operate on a type-id
This commit is contained in:
parent
fafcc83520
commit
fe475cc069
@ -327,14 +327,14 @@ template<typename T>
|
|||||||
static
|
static
|
||||||
u32 add_to_engine_blob(build_context &bc, const T &a) {
|
u32 add_to_engine_blob(build_context &bc, const T &a) {
|
||||||
static_assert(is_pod<T>::value, "should be pod");
|
static_assert(is_pod<T>::value, "should be pod");
|
||||||
return add_to_engine_blob(bc, &a, sizeof(a), alignof(a));
|
return add_to_engine_blob(bc, &a, sizeof(a), alignof(T));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static
|
static
|
||||||
u32 add_to_engine_blob(build_context &bc, const T &a, const size_t len) {
|
u32 add_to_engine_blob(build_context &bc, const T &a, const size_t len) {
|
||||||
static_assert(is_pod<T>::value, "should be pod");
|
static_assert(is_pod<T>::value, "should be pod");
|
||||||
return add_to_engine_blob(bc, &a, len, alignof(a));
|
return add_to_engine_blob(bc, &a, len, alignof(T));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Iter>
|
template<typename Iter>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user