Skip to content

Commit d460249

Browse files
authored
Merge pull request #4460 from tautschnig/constructor-fix
Ensure typet constructor is always compatible with GCC 5's STL [blocks: #4458]
2 parents 18da0b1 + ca155d3 commit d460249

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/util/type.h

+7
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,17 @@ class typet:public irept
3232

3333
explicit typet(const irep_idt &_id):irept(_id) { }
3434

35+
#if defined(__clang__) || !defined(__GNUC__) || __GNUC__ >= 6
3536
typet(irep_idt _id, typet _subtype)
3637
: irept(std::move(_id), {}, {std::move(_subtype)})
3738
{
3839
}
40+
#else
41+
typet(irep_idt _id, typet _subtype) : irept(std::move(_id))
42+
{
43+
subtype() = std::move(_subtype);
44+
}
45+
#endif
3946

4047
const typet &subtype() const
4148
{

0 commit comments

Comments
 (0)