LIBEUNOMIA
読み取り中…
検索中…
一致する文字列を見つけられません
noncopyable.h
[詳解]
1/*
2 * Copyright 2019-2021 oZ/acy (名賀月晃嗣)
3 *
4 * Redistribution and use in source and binary forms,
5 * with or without modification,
6 * are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 *
11 * 2. Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
17 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
19 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 */
40#ifndef INCLUDE_GUARD_EUNOMIA_NONCOPYABLE_H
41#define INCLUDE_GUARD_EUNOMIA_NONCOPYABLE_H
42
43namespace eunomia
44{
45
58template<class T>
60{
61protected:
62 constexpr Noncopyable() = default;
63 ~Noncopyable() = default;
64
65 // コピー禁止
66 Noncopyable(const Noncopyable&) = delete;
68};
69
70
71}//end of namespace eunomia
72
73
74#endif // INCLUDE_GUARD_EUNOMIA_NONCOPYABLE_H
コピー禁止クラステンプレート
Definition noncopyable.h:60
Noncopyable(const Noncopyable &)=delete
Noncopyable & operator=(const Noncopyable &)=delete
constexpr Noncopyable()=default
Definition colour.h:49