summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/snippets/code/src_corelib_tools_qshareddata.cpp
blob: 2c8ca411f7b7b14d1345d41f959b7611492ecfca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

//! [0]
    class EmployeeData;
//! [0]

//! [1]
    template<>
    EmployeeData *QSharedDataPointer<EmployeeData>::clone()
    {
        return d->clone();
    }
//! [1]

//! [2]
    QExplicitlySharedDataPointer<Base> base(new Base);
    QExplicitlySharedDataPointer<Derived> derived(base); // !!! DANGER !!!
//! [2]