Skip to content

Commit

Permalink
Change std::is_pod to std::is_trivially_destructible in flatbuffer_co…
Browse files Browse the repository at this point in the history
…nversions.h

PiperOrigin-RevId: 696150747
  • Loading branch information
ai-edge-bot authored and copybara-github committed Dec 20, 2024
1 parent dbebe58 commit eef8713
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tflite/core/api/flatbuffer_conversions.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ class BuiltinDataAllocator {
// deallocation.
template <typename T>
T* AllocatePOD() {
// TODO(b/154346074): Change this to is_trivially_destructible when all
// platform targets support that properly.
static_assert(std::is_pod<T>::value, "Builtin data structure must be POD.");
static_assert(std::is_trivially_destructible<T>::value,
"Builtin data structure must be POD.");
void* allocated_memory = this->Allocate(sizeof(T), alignof(T));
return new (allocated_memory) T();
}
Expand Down

0 comments on commit eef8713

Please sign in to comment.