Skip to content

Commit

Permalink
Refs #18687. Fix after rebasing
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
  • Loading branch information
richiware committed Jul 4, 2023
1 parent 00f20d0 commit 6b92d2c
Showing 1 changed file with 0 additions and 62 deletions.
62 changes: 0 additions & 62 deletions include/fastcdr/Cdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,68 +282,6 @@ class Cdr_DllAPI Cdr
origin_ = offset_;
}

/*!
* @brief This operator template is used to serialize any other non-basic type.
* @param type_t A reference to the object that will be serialized in the buffer.
* @return Reference to the eprosima::fastcdr::Cdr object.
* @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
*/
template<class _T, typename std::enable_if<!std::is_enum<_T>::value>::type* = nullptr>
inline Cdr& operator <<(
const _T& type_t)
{
type_t.serialize(*this);
return *this;
}

template<class _T, typename std::enable_if<std::is_enum<_T>::value &&
std::is_same<typename std::underlying_type<_T>::type, int32_t>::value>::type* = nullptr>
inline Cdr& operator <<(
const _T& enum_t)
{
return serialize(static_cast<int32_t>(enum_t));
}

template<class _T, typename std::enable_if<std::is_enum<_T>::value &&
std::is_same<typename std::underlying_type<_T>::type, uint32_t>::value>::type* = nullptr>
inline Cdr& operator <<(
const _T& enum_t)
{
return serialize(static_cast<uint32_t>(enum_t));
}

template<class _T, typename std::enable_if<std::is_enum<_T>::value &&
std::is_same<typename std::underlying_type<_T>::type, int16_t>::value>::type* = nullptr>
inline Cdr& operator <<(
const _T& enum_t)
{
return serialize(static_cast<int16_t>(enum_t));
}

template<class _T, typename std::enable_if<std::is_enum<_T>::value &&
std::is_same<typename std::underlying_type<_T>::type, uint16_t>::value>::type* = nullptr>
inline Cdr& operator <<(
const _T& enum_t)
{
return serialize(static_cast<uint16_t>(enum_t));
}

template<class _T, typename std::enable_if<std::is_enum<_T>::value &&
std::is_same<typename std::underlying_type<_T>::type, int8_t>::value>::type* = nullptr>
inline Cdr& operator <<(
const _T& enum_t)
{
return serialize(static_cast<int8_t>(enum_t));
}

template<class _T, typename std::enable_if<std::is_enum<_T>::value &&
std::is_same<typename std::underlying_type<_T>::type, uint8_t>::value>::type* = nullptr>
inline Cdr& operator <<(
const _T& enum_t)
{
return serialize(static_cast<uint8_t>(enum_t));
}

/*!
* @brief This operator template is used to serialize any other non-basic type.
* @param type_t A reference to the object that will be serialized in the buffer.
Expand Down

0 comments on commit 6b92d2c

Please sign in to comment.