From f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 21 Nov 2013 22:16:57 +0100 Subject: Boost/C++11 shared pointers. --- examples/example2.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'examples/example2.cpp') diff --git a/examples/example2.cpp b/examples/example2.cpp index d09a597c..56f01b03 100644 --- a/examples/example2.cpp +++ b/examples/example2.cpp @@ -52,24 +52,24 @@ int main() mb.setExpeditor(vmime::mailbox("me@somewhere.com")); vmime::addressList to; - to.appendAddress(vmime::create ("you@elsewhere.com")); + to.appendAddress(vmime::make_shared ("you@elsewhere.com")); mb.setRecipients(to); vmime::addressList bcc; - bcc.appendAddress(vmime::create ("you-bcc@nowhere.com")); + bcc.appendAddress(vmime::make_shared ("you-bcc@nowhere.com")); mb.setBlindCopyRecipients(bcc); mb.setSubject(vmime::text("My first message generated with vmime::messageBuilder")); // Message body - mb.getTextPart()->setText(vmime::create ( + mb.getTextPart()->setText(vmime::make_shared ( "I'm writing this short text to test message construction " \ "with attachment, using the vmime::messageBuilder component.")); // Adding an attachment - vmime::ref a = vmime::create + vmime::shared_ptr a = vmime::make_shared ( "./example2.cpp", // full path to file vmime::mediaType("application/octet-stream"), // content type @@ -82,7 +82,7 @@ int main() mb.attach(a); // Construction - vmime::ref msg = mb.construct(); + vmime::shared_ptr msg = mb.construct(); // Raw text generation vmime::string dataToSend = msg->generate(); -- cgit v1.2.3