diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-17 13:14:20 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-17 13:16:52 +0200 |
commit | a3525585f10ff39b9aae14d7506e94cf77542c14 (patch) | |
tree | 2219d91c5da071598ab773f43216bf4febc955ce /include/vcl/vclptr.hxx | |
parent | 0a497cb52a2ffecd94178eed296ba8ae7f526358 (diff) |
sw: convert new to ::Create.
Change-Id: I937aa67ee4a3b07bd180daaaa3c665245ea08b92
Diffstat (limited to 'include/vcl/vclptr.hxx')
-rw-r--r-- | include/vcl/vclptr.hxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/vcl/vclptr.hxx b/include/vcl/vclptr.hxx index d97124d92d65..5ad0bdabfd2d 100644 --- a/include/vcl/vclptr.hxx +++ b/include/vcl/vclptr.hxx @@ -23,6 +23,7 @@ #include <rtl/ref.hxx> #include <cstddef> #include <utility> +#include <type_traits> /// @cond INTERNAL namespace vcl { namespace detail { @@ -165,7 +166,16 @@ public: m_rInnerRef.set(pBody); } - inline VclPtr<reference_type>& SAL_CALL operator= (reference_type * pBody) + /** Up-casting conversion constructor: Copies interface reference. + + Does not work for up-casts to ambiguous bases. For the special case of + up-casting to Reference< XInterface >, see the corresponding conversion + operator. + + @param rRef another reference + */ + template< class derived_type, class = typename std::enable_if< ::vcl::detail::UpCast< reference_type, derived_type >::t >::type > + inline VclPtr<reference_type>& SAL_CALL operator= (derived_type * pBody) { m_rInnerRef.set(pBody); return *this; |