I want to write data from an std::vector to a socket, using the write function, which has this prototype:
std::vector
write
ssize_t write
my_vec.empty() ? 0 : &my_vec.front()
If you would like an std::out_of_range to be thrown if vector is empty, you could use
std::out_of_range
&my_vec.at(0)