Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/util/type.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,22 @@ inline type_with_subtypet &to_type_with_subtype(typet &type)
class type_with_subtypest:public typet
{
public:
typedef std::vector<typet> subtypest;

type_with_subtypest() { }

explicit type_with_subtypest(const irep_idt &_id):typet(_id) { }

typedef std::vector<typet> subtypest;
type_with_subtypest(const irep_idt &_id, const subtypest &_subtypes)
: typet(_id)
{
subtypes() = _subtypes;
}

type_with_subtypest(const irep_idt &_id, subtypest &&_subtypes) : typet(_id)
{
subtypes() = std::move(_subtypes);
}

subtypest &subtypes()
{
Expand Down