Skip to content

Template with explicit instantiation causes constructor precondition to fail #6

Open
@PeterBindels-TomTom

Description

@PeterBindels-TomTom
template <size_t bits>
class t {
  explicit t(std::span<const uint8_t> f) pre(f.size() == bits/8);
};

template <>
t<128>::t(std::span<const uint8_t> f) {}

Does not want to reduce much further than this. It turns out that the explicit instantiation is required for this to trigger, but I have no idea why.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions