Cleanup: correct comment

This commit is contained in:
Jacques Lucke
2024-02-06 14:52:09 +01:00
parent 30f2db21d7
commit 0baee63b85
+1 -1
View File
@@ -307,7 +307,7 @@ class Any {
return buffer_.ptr();
}
else {
/* Using #malloc so that the #unique_ptr can free the memory. */
/* Using raw allocation here. The caller is responsible for constructing the value. */
T *value = static_cast<T *>(::operator new(sizeof(T)));
new (&buffer_) std::unique_ptr<T>(value);
return value;