In C++ I have seen a functioning library with a function with this signature
DocumentReference::DocumentReference(model::ResourcePath path, std::shared_ptr<Firestore> firestore)
: firestore_{std::move(firestore)} {
// code here removed for https://stackoverflow.com/
}
But the library calls the function using {}
instead of ()
.
return DocumentReference{
ResourcePath::FromString(document_path),
shared_from_this()
};
What difference does calling a function with {}
instead of ()
make?