PLCnext API Documentation
25.0.2.69
Arp
Base
Core
size_cast.hxx
1
2
//
3
// Copyright Phoenix Contact GmbH & Co. KG
4
//
6
#pragma once
7
#include "
Arp/Base/Core/Arp.hpp
"
8
#include <type_traits>
9
namespace
Arp
{
namespace
Base {
namespace
Core
10
{
11
22
template
<
class
T>
23
inline
T size_cast(
size_t
value)
24
{
25
static_assert
(std::is_integral<T>::value,
"size_t might only be casted to integral types"
);
26
return
static_cast<
T
>
(value);
27
}
28
29
}}}
// end of namespace Arp::Base::Core
30
31
namespace
Arp
{
33
using
Arp::Base::Core::size_cast;
34
}
Arp.hpp
Arp
Root namespace for the PLCnext API
Generated on Mon May 12 2025 14:03:44 for PLCnext API Documentation by
1.9.4