Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
noncopyable.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Roc Streaming authors
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
8 
9 //! @file roc_core/noncopyable.h
10 //! @brief Non-copyable object.
11 
12 #ifndef ROC_CORE_NONCOPYABLE_H_
13 #define ROC_CORE_NONCOPYABLE_H_
14 
15 namespace roc {
16 namespace core {
17 
18 //! Base class for non-copyable objects.
19 //! @note
20 //! Template allows instantiate distinct non-copyable bases when
21 //! they are inherited by multiple paths. We need this to
22 //! eliminate compiler warnings "inaccessible direct base...".
23 template <class T = void> class NonCopyable {
24 protected:
25  NonCopyable() {
26  }
27 
28 private:
29  NonCopyable(const NonCopyable&);
30  NonCopyable& operator=(const NonCopyable&);
31 };
32 
33 } // namespace core
34 } // namespace roc
35 
36 #endif // ROC_CORE_NONCOPYABLE_H_
Base class for non-copyable objects.
Definition: noncopyable.h:23
Root namespace.