Skip to content

Commit 08a4008

Browse files
rudybearmeta-codesync[bot]
authored andcommitted
igl | Add static_assert for ShaderVersion and BackendVersion
Reviewed By: corporateshark Differential Revision: D112594241 fbshipit-source-id: 2bb9150901bf33e2ab93af60173e748be696e552
1 parent 1ca71fd commit 08a4008

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/igl/DeviceFeatures.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#pragma once
99

1010
#include <cstdint>
11+
#include <type_traits>
1112
#include <igl/ColorSpace.h> // IWYU pragma: export
1213
#include <igl/Macros.h>
1314
#include <igl/Texture.h>
@@ -244,6 +245,8 @@ struct ShaderVersion {
244245
}
245246
};
246247

248+
static_assert(std::is_trivially_copyable_v<ShaderVersion>);
249+
247250
/**
248251
* @brief BackendVersion provides information on the backend flavor and version
249252
*/
@@ -262,6 +265,8 @@ struct BackendVersion {
262265
}
263266
};
264267

268+
static_assert(std::is_trivially_copyable_v<BackendVersion>);
269+
265270
/**
266271
* @brief ICapabilities defines the capabilities interface. Currently, it is IDevice
267272
* which implements this interface.

0 commit comments

Comments
 (0)