COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
include
comms
field
adapter
InvalidByDefault.h
1
//
2
// Copyright 2017 - 2026 (C). Alex Robenko. All rights reserved.
3
//
4
// SPDX-License-Identifier: MPL-2.0
5
//
6
// This Source Code Form is subject to the terms of the Mozilla Public
7
// License, v. 2.0. If a copy of the MPL was not distributed with this
8
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
10
#pragma once
11
12
namespace
comms
13
{
14
15
namespace
field
16
{
17
18
namespace
adapter
19
{
20
21
template
<
typename
TBase>
22
class
InvalidByDefault
:
public
TBase
23
{
24
using
BaseImpl = TBase;
25
public
:
26
27
using
ValueType =
typename
BaseImpl::ValueType;
28
29
InvalidByDefault
() =
default
;
30
31
explicit
InvalidByDefault
(
const
ValueType& val)
32
: BaseImpl(val)
33
{
34
}
35
36
explicit
InvalidByDefault
(ValueType&& val)
37
: BaseImpl(
std
::move(val))
38
{
39
}
40
41
InvalidByDefault
(
const
InvalidByDefault&) =
default
;
42
InvalidByDefault
(InvalidByDefault&&) =
default
;
43
InvalidByDefault
& operator=(
const
InvalidByDefault&) =
default
;
44
InvalidByDefault
& operator=(InvalidByDefault&&) =
default
;
45
46
static
constexpr
bool
valid()
47
{
48
return
false
;
49
}
50
};
51
52
}
// namespace adapter
53
54
}
// namespace field
55
56
}
// namespace comms
57
comms::option::InvalidByDefault
comms::option::def::InvalidByDefault InvalidByDefault
Same as comms::option::def::InvalidByDefault.
Definition
options.h:1953
comms
Main namespace for all classes / functions of COMMS library.
std
STL namespace.
Generated by
1.9.8