My project is very performance-sensitive, so Gavin's version is difficult to apply.
As you said, one proper way is making one of x/y/z value of a vertex of a triangle NaN value.
In my code, NaN value is specified with std::numeric_limits<float>::signaling_NaN() func.
This is cheap and easy.
Another way is making indices of a triangle (0,0,0) or something non-triangle vertex indices.
Both method are suit to me.