mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 14:49:53 +08:00
Fixes to byte_stream_reader for const data
This commit is contained in:
parent
05f17e1d74
commit
f987d2a287
@ -374,6 +374,18 @@ namespace etl
|
||||
{
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
/// Construct from const array.
|
||||
//***************************************************************************
|
||||
template <typename T, size_t Size>
|
||||
byte_stream_reader(const T(&begin_)[Size], etl::endian buffer_endianness_ = etl::endian::big)
|
||||
: pdata(begin_)
|
||||
, pcurrent(begin_)
|
||||
, length(begin_ + (Size * sizeof(T)))
|
||||
, buffer_endianness(buffer_endianness_)
|
||||
{
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
/// Read a value from the stream.
|
||||
//***************************************************************************
|
||||
|
||||
@ -41,10 +41,9 @@ SOFTWARE.
|
||||
#include "array.h"
|
||||
|
||||
///\defgroup span span
|
||||
/// A wrapper for arrays
|
||||
///\ingroup containers
|
||||
|
||||
#if ETL_USING_STL
|
||||
#if ETL_CPP11_SUPPORTED && ETL_USING_STL
|
||||
#include <array>
|
||||
#endif
|
||||
|
||||
@ -93,7 +92,7 @@ namespace etl
|
||||
{
|
||||
}
|
||||
|
||||
#if ETL_USING_STL
|
||||
#if ETL_CPP11_SUPPORTED && ETL_USING_STL
|
||||
//*************************************************************************
|
||||
/// Construct from std::array.
|
||||
//*************************************************************************
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user