use unique_ptr instead of raw pointer

This is not correct. The internal type should be `char[]`, not `char`. That way, `std::unique_ptr` will use the proper deleter when destroying dynamic arrays. 

Also I wonder whether the whole seek&buffer dance is actually necessary. You could read the contents of the file to a temporary `std::string` (with `std::istream_iterator` via its constructor taking iterators) and, if successful, move-assign the temporary to the `content` out variable.