[Trilinos-Users] [EXTERNAL] Can not allocate Teuchos::RCP with new

Joachim Wuttke j.wuttke at fz-juelich.de
Fri Jul 28 12:10:15 EDT 2017

> There is no implicit conversion from a raw pointer to a smart pointer
> (that would be a very bad idea).
> Please use Teuchos::rcp():

With C++11 initializers, implicit conversion works:

Teuchos::RCP<MyClass> myInstance { new MyClass(..) };

- Joachim

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5110 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20170728/b3561fbf/attachment.p7s>

More information about the Trilinos-Users mailing list