CTRE Phoenix Pro C++ 23.0.12
CopyMoveMutex.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) Cross The Road Electronics.  All rights reserved.
3 * License information can be found in CTRE_LICENSE.txt
4 * For support and suggestions contact support@ctr-electronics.com or file
5 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases
6 */
7#pragma once
8
9#include <mutex>
10
11namespace ctre {
12namespace phoenix {
13namespace threading {
14
15 /**
16 * \brief An extension of mutex that defines empty copy and
17 * move constructors and assignment operators.
18 *
19 * \details This allows classes using a #CopyMoveMutex to have copy and move semantics.
20 */
21 template <class MutexType>
22 class CopyMoveMutex : public MutexType {
23 public:
24 CopyMoveMutex() = default;
27 CopyMoveMutex &operator=(CopyMoveMutex const &) { return *this; }
28 CopyMoveMutex &operator=(CopyMoveMutex &&) { return *this; }
29 };
30
31}
32}
33}
An extension of mutex that defines empty copy and move constructors and assignment operators.
Definition: CopyMoveMutex.hpp:22
CopyMoveMutex(CopyMoveMutex const &)
Definition: CopyMoveMutex.hpp:25
CopyMoveMutex & operator=(CopyMoveMutex &&)
Definition: CopyMoveMutex.hpp:28
CopyMoveMutex & operator=(CopyMoveMutex const &)
Definition: CopyMoveMutex.hpp:27
CopyMoveMutex(CopyMoveMutex &&)
Definition: CopyMoveMutex.hpp:26
Definition: string_util.hpp:14