Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/ETLCPP/etl into deve…
Browse files Browse the repository at this point in the history
…lopment
  • Loading branch information
John Wellbelove committed Oct 11, 2023
2 parents 79bfc6f + 5437b4b commit 822e244
Show file tree
Hide file tree
Showing 21 changed files with 4,234 additions and 10,079 deletions.
523 changes: 523 additions & 0 deletions include/etl/base64.h

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions include/etl/basic_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ namespace etl
/// Gets the current size of the string.
///\return The current size of the string.
//*************************************************************************
size_type size() const
ETL_CONSTEXPR size_type size() const
{
return current_size;
}
Expand Down Expand Up @@ -502,6 +502,16 @@ namespace etl
p_buffer[new_size] = 0;
}

//*********************************************************************
/// Fills the string with the specified character.
/// Does not change the string length.
///\param value The character used to fill the string.
//*********************************************************************
void fill(T value)
{
etl::fill(begin(), end(), value);
}

//*********************************************************************
/// Returns a reference to the value at index 'i'
///\param i The index.
Expand Down Expand Up @@ -595,7 +605,7 @@ namespace etl
/// Returns a const pointer to the beginning of the string data.
///\return A const pointer to the beginning of the string data.
//*********************************************************************
const_pointer data() const
ETL_CONSTEXPR const_pointer data() const
{
return p_buffer;
}
Expand Down
1 change: 1 addition & 0 deletions include/etl/file_error_numbers.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,6 @@ SOFTWARE.
#define ETL_TO_ARITHMETIC_FILE_ID "69"
#define ETL_EXPECTED_FILE_ID "70"
#define ETL_ALIGNMENT_FILE_ID "71"
#define ETL_BASE64_FILE_ID "72"

#endif
4 changes: 2 additions & 2 deletions include/etl/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ namespace etl
/// Returns a const pointer to the beginning of the vector data.
///\return A const pointer to the beginning of the vector data.
//*********************************************************************
const_pointer data() const
ETL_CONSTEXPR const_pointer data() const
{
return p_buffer;
}
Expand Down Expand Up @@ -974,7 +974,7 @@ namespace etl
/// Gets the current size of the vector.
///\return The current size of the vector.
//*************************************************************************
size_type size() const
ETL_CONSTEXPR size_type size() const
{
return size_t(p_end - p_buffer);
}
Expand Down
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ add_executable(etl_tests
test_array_view.cpp
test_array_wrapper.cpp
test_atomic.cpp
test_base64.cpp
test_binary.cpp
test_bip_buffer_spsc_atomic.cpp
test_bit.cpp
Expand Down
29 changes: 29 additions & 0 deletions test/syntax_check/base64.h.t.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/******************************************************************************
The MIT License(MIT)
Embedded Template Library.
https://github.com/ETLCPP/etl
https://www.etlcpp.com
Copyright(c) 2023 John Wellbelove
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions :
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
******************************************************************************/

#include <etl/base64.h>
1 change: 1 addition & 0 deletions test/syntax_check/c++03/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ target_sources(t98 PRIVATE etl_profile.h
../array_view.h.t.cpp
../array_wrapper.h.t.cpp
../atomic.h.t.cpp
../base64.h.t.cpp
../basic_format_spec.h.t.cpp
../basic_string.h.t.cpp
../basic_string_stream.h.t.cpp
Expand Down
1 change: 1 addition & 0 deletions test/syntax_check/c++11/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ target_sources(t11 PRIVATE etl_profile.h
../array_view.h.t.cpp
../array_wrapper.h.t.cpp
../atomic.h.t.cpp
../base64.h.t.cpp
../basic_format_spec.h.t.cpp
../basic_string.h.t.cpp
../basic_string_stream.h.t.cpp
Expand Down
1 change: 1 addition & 0 deletions test/syntax_check/c++14/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ target_sources(t14 PRIVATE etl_profile.h
../array_view.h.t.cpp
../array_wrapper.h.t.cpp
../atomic.h.t.cpp
../base64.h.t.cpp
../basic_format_spec.h.t.cpp
../basic_string.h.t.cpp
../basic_string_stream.h.t.cpp
Expand Down
1 change: 1 addition & 0 deletions test/syntax_check/c++17/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ target_sources(t17 PRIVATE etl_profile.h
../array_view.h.t.cpp
../array_wrapper.h.t.cpp
../atomic.h.t.cpp
../base64.h.t.cpp
../basic_format_spec.h.t.cpp
../basic_string.h.t.cpp
../basic_string_stream.h.t.cpp
Expand Down
1 change: 1 addition & 0 deletions test/syntax_check/c++20/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ target_sources(t20 PRIVATE etl_profile.h
../array_view.h.t.cpp
../array_wrapper.h.t.cpp
../atomic.h.t.cpp
../base64.h.t.cpp
../basic_format_spec.h.t.cpp
../basic_string.h.t.cpp
../basic_string_stream.h.t.cpp
Expand Down
Loading

0 comments on commit 822e244

Please sign in to comment.