Two reasons not to use gets_s:
1. Although it is a C11 feature, it is optional and therefore not necessarily available in a particular C11 implementation.
2. It is usually preferable to use C++ functions when writing C++.
It should be noted that istream::getline() sets failbit if the delimiter was not encountered before the buffer is full (including the '\0' terminator, of course). It removes the delimiter (if encountered) from the stream but does not include it in the returned string.