I'm trying to use the c++17 [[fallthrough]] attribute in visual studio 2017:
Qt::ItemFlags flags = Qt::ItemIsSelectable;
switch (index.column())
{
case 0:
flags |= Qt::ItemIsUserCheckable;
break;
case 2:
[[fallthrough]]
case 3:
[[fallthrough]]
case 4:
flags |= Qt::ItemIsEditable;
break;
}
return flags;
but I get the compiler error:
attribute 'fallthrough' cannot be applied in this context
This seems like the only context where you can use [[fallthrough]]... what am I doing wrong?