Skip to content
Snippets Groups Projects

Relax the SourceLink req. to copy constructible

Merged Paul Gessinger requested to merge relax-sourcelink-copyable-requirement into master
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
  • 231e5db7
    Previously, the `SourceLinkConcept` required that the type was
    `is_trivially_copyable` (i.e. a type can be copied by `memcpy`). This
    makes the frameworks SimIdentifier fail the concept requirements,
    because it's not. This changes the requirement to simply say
    `is_copy_construcible`, a much less stringent criterion.
@@ -40,8 +40,8 @@ namespace concept {
surface_method_exists,
"Source link does not have compliant referenceSurface method");
constexpr static bool copyable = std::is_trivially_copyable_v<T>;
static_assert(copyable, "Source link must be trivially copyable");
constexpr static bool copyable = std::is_copy_constructible_v<T>;
static_assert(copyable, "Source link must be copy constructible");
constexpr static bool value =
concept ::require<comparison_works, surface_method_exists, copyable>;
Loading