Fast CDR  Version 2.2.4
Fast CDR
Loading...
Searching...
No Matches
container_recursive_inspector.hpp
1// Copyright 2023 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef _FASTCDR_DETAIL_CONTAINERRECURSIVEINSPECTOR_HPP_
16#define _FASTCDR_DETAIL_CONTAINERRECURSIVEINSPECTOR_HPP_
17
18#include <array>
19#include <cstddef>
20#include <type_traits>
21
22namespace eprosima {
23namespace fastcdr {
24
25// Helpers to deduce multi-array of primitives.
28 ...)
29{
30 return false;
31}
32
34template <typename _T,
35 typename std::enable_if<std::is_enum<_T>::value ||
36 std::is_arithmetic<_T>::value>::type* = nullptr>
38 _T const*)
39{
40 return true;
41}
42
43template <typename _T, size_t _N>
45 std::array<_T, _N> const*)
46{
47 return is_multi_array_primitive(static_cast<_T const*>(nullptr));
48}
49
50} // namespace fastcdr
51} // namespace eprosima
52
53#endif // _FASTCDR_DETAIL_CONTAINERRECURSIVEINSPECTOR_HPP_
constexpr bool is_multi_array_primitive(...)
Basis.
Definition container_recursive_inspector.hpp:27
Definition Cdr.h:48