@@ -574,86 +574,6 @@ namespace etl
574574
575575 return value;
576576 }
577-
578- // *******************************************
579- // / at_address
580- // /\brief Helps to reinterprete memory as unaligned_type. Overload for write access.
581- // /\param address Pointer to memory to be reinterpreted.
582- // /\return Reference to unaligned_type object at location specified by address
583- // *******************************************
584- static unaligned_type<T, Endian_>& at_address (void * address)
585- {
586- return *reinterpret_cast <unaligned_type<T, Endian_>*>(address);
587- }
588-
589- // *******************************************
590- // / at_address
591- // /\brief Helps to reinterprete memory as unaligned_type. Overload for read only access to const memory.
592- // /\param address Pointer to memory to be reinterpreted.
593- // /\return Reference to unaligned_type object at location specified by address
594- // *******************************************
595- static const unaligned_type<T, Endian_>& at_address (const void * address)
596- {
597- return *reinterpret_cast <const unaligned_type<T, Endian_>*>(address);
598- }
599-
600- // *******************************************
601- // / at_address
602- // /\brief Helps to reinterprete memory as unaligned_type. Overload for write access.
603- // /\param address Pointer to memory to be reinterpreted.
604- // /\param buffer_size Size in bytes for run time size check
605- // /\return Reference to unaligned_type object at location specified by address
606- // *******************************************
607- static unaligned_type<T, Endian_>& at_address (void * address, size_t buffer_size)
608- {
609- ETL_ASSERT (sizeof (T) <= buffer_size, ETL_ERROR (etl::unaligned_type_buffer_size));
610-
611- return *reinterpret_cast <unaligned_type<T, Endian_>*>(address);
612- }
613-
614- // *******************************************
615- // / at_address
616- // /\brief Helps to reinterprete memory as unaligned_type. Overload for read only access to const memory.
617- // /\param address Pointer to memory to be reinterpreted.
618- // /\param buffer_size Size in bytes for runtime size check
619- // /\return Reference to unaligned_type object at location specified by address
620- // *******************************************
621- static const unaligned_type<T, Endian_>& at_address (const void * address, size_t buffer_size)
622- {
623- ETL_ASSERT (sizeof (T) <= buffer_size, ETL_ERROR (etl::unaligned_type_buffer_size));
624-
625- return *reinterpret_cast <const unaligned_type<T, Endian_>*>(address);
626- }
627-
628- // *******************************************
629- // / at_address
630- // /\brief Helps to reinterprete memory as unaligned_type. Overload for write access.
631- // /\tparam BufferSize Size in bytes for compile time size check
632- // /\param address Pointer to memory to be reinterpreted.
633- // /\return Reference to unaligned_type object at location specified by address
634- // *******************************************
635- template <size_t BufferSize>
636- static unaligned_type<T, Endian_>& at_address (void * address)
637- {
638- ETL_STATIC_ASSERT (sizeof (T) <= BufferSize, " Buffer size to small for type" );
639-
640- return *reinterpret_cast <unaligned_type<T, Endian_>*>(address);
641- }
642-
643- // *******************************************
644- // / at_address
645- // /\brief Helps to reinterprete memory as unaligned_type. Overload for read only access to const memory.
646- // /\tparam BufferSize Size in bytes for compile time size check
647- // /\param address Pointer to memory to be reinterpreted.
648- // /\return Reference to unaligned_type object at location specified by address
649- // *******************************************
650- template <size_t BufferSize>
651- static const unaligned_type<T, Endian_>& at_address (const void * address)
652- {
653- ETL_STATIC_ASSERT (sizeof (T) <= BufferSize, " Buffer size to small for type" );
654-
655- return *reinterpret_cast <const unaligned_type<T, Endian_>*>(address);
656- }
657577 }; ETL_END_PACKED
658578
659579 template <typename T, int Endian_>
0 commit comments