COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
MsgSizeLayerConstNullPtrCastHelper.h
1//
2// Copyright 2014 - 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
12namespace comms
13{
14
15namespace frame
16{
17
18namespace details
19{
20
21template <bool TValidPtr>
22struct MsgSizeLayerConstNullPtrCastHelper
23{
24 template <typename TPtr>
25 using Type = const typename TPtr::element_type*;
26};
27
28template <>
29struct MsgSizeLayerConstNullPtrCastHelper<false>
30{
31 template <typename TPtr>
32 using Type = const void*;
33};
34
35} // namespace details
36
37} // namespace frame
38
39} // namespace comms
Main namespace for all classes / functions of COMMS library.