LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
requiresinit.h
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#pragma once
10
11
namespace
LC::Util
12
{
13
template
<
typename
T>
14
struct
RequiresInit
15
{
16
T
Val_
;
17
18
RequiresInit
() =
delete
;
19
20
constexpr
RequiresInit
(
const
RequiresInit
&) =
default
;
21
constexpr
RequiresInit
(
RequiresInit
&&) =
default
;
22
23
constexpr
RequiresInit
&
operator=
(
const
RequiresInit
&) =
default
;
24
constexpr
RequiresInit
&
operator=
(
RequiresInit
&&) =
default
;
25
26
constexpr
RequiresInit
(T&& val)
27
:
Val_
{ std::forward<T> (val) }
28
{
29
}
30
31
template
<
typename
... Args>
32
constexpr
RequiresInit
(Args&&... args)
33
:
Val_
{ std::forward<Args> (args)... }
34
{
35
}
36
37
constexpr
operator
T ()
const
38
{
39
return
Val_
;
40
}
41
};
42
}
LC::Util
Definition:
icoreproxy.h:33
LC::Util::RequiresInit::operator=
constexpr RequiresInit & operator=(const RequiresInit &)=default
LC::Util::RequiresInit::RequiresInit
RequiresInit()=delete
LC::Util::RequiresInit::Val_
T Val_
Definition:
requiresinit.h:28
LC::Util::RequiresInit
Definition:
requiresinit.h:20
src
util
sll
requiresinit.h
Generated by
1.8.17