COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
MsgSizeLayerConstNullPtrCastHelper.h
1//
2// Copyright 2014 - 2025 (C). Alex Robenko. All rights reserved.
3//
4// This Source Code Form is subject to the terms of the Mozilla Public
5// License, v. 2.0. If a copy of the MPL was not distributed with this
6// file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
8#pragma once
9
10namespace comms
11{
12
13namespace frame
14{
15
16namespace details
17{
18
19template <bool TValidPtr>
20struct MsgSizeLayerConstNullPtrCastHelper
21{
22 template <typename TPtr>
23 using Type = const typename TPtr::element_type*;
24};
25
26template <>
27struct MsgSizeLayerConstNullPtrCastHelper<false>
28{
29 template <typename TPtr>
30 using Type = const void*;
31};
32
33} // namespace details
34
35} // namespace frame
36
37} // namespace comms
Main namespace for all classes / functions of COMMS library.