Add trivially copyable invariant for ID types
Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
6a9ad61051
commit
5013392841
@ -23,8 +23,15 @@
|
|||||||
|
|
||||||
#include "nextpnr_namespaces.h"
|
#include "nextpnr_namespaces.h"
|
||||||
|
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
NEXTPNR_NAMESPACE_BEGIN
|
NEXTPNR_NAMESPACE_BEGIN
|
||||||
|
|
||||||
|
// Invariant: architecture ID types must all be trivially copyable
|
||||||
|
static_assert(std::is_trivially_copyable<BelId>::value == true);
|
||||||
|
static_assert(std::is_trivially_copyable<WireId>::value == true);
|
||||||
|
static_assert(std::is_trivially_copyable<PipId>::value == true);
|
||||||
|
|
||||||
void CellInfo::addInput(IdString name)
|
void CellInfo::addInput(IdString name)
|
||||||
{
|
{
|
||||||
ports[name].name = name;
|
ports[name].name = name;
|
||||||
|
Loading…
Reference in New Issue
Block a user