Skip to content

Commit

Permalink
Converted Visual Studio project to VS2022
Browse files Browse the repository at this point in the history
  • Loading branch information
jwellbelove committed Mar 8, 2023
1 parent ef4fbdd commit 0676ded
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 5 deletions.
44 changes: 44 additions & 0 deletions include/etl/private/diagnostic_deprecated_push.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
///\file

/******************************************************************************
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.
******************************************************************************/

/*
* The header include guard has been intentionally omitted.
* This file is intended to evaluated multiple times by design.
*/

#if defined(__GNUC__) && !defined(__clang__) && !defined(__llvm__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated"
#endif

#if defined(__clang__) || defined(__llvm__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
#endif
4 changes: 2 additions & 2 deletions include/etl/result.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace etl
/// Result type.
//*****************************************************************************
template <typename TValue, typename TError>
class ETL_DEPRECATED result
class result
{
public:

Expand Down Expand Up @@ -305,7 +305,7 @@ namespace etl
/// Move assign from error
//*******************************************
#if ETL_CPP11_SUPPORTED
result& operator =(TError&& err_)
result& operator =(TError&& error)
{
data = etl::move(error);
return *this;
Expand Down
2 changes: 2 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ add_executable(etl_tests
test_callback_timer_atomic.cpp
test_callback_timer_interrupt.cpp
test_callback_timer_locked.cpp
test_char_traits.cpp
test_checksum.cpp
test_circular_buffer.cpp
test_circular_buffer_external_buffer.cpp
Expand Down Expand Up @@ -196,6 +197,7 @@ add_executable(etl_tests
test_reference_flat_multiset.cpp
test_reference_flat_set.cpp
test_rescale.cpp
test_result.cpp
test_rms.cpp
test_scaled_rounding.cpp
test_set.cpp
Expand Down
6 changes: 3 additions & 3 deletions test/test_char_traits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ namespace
CHECK(!char_traits::eq_int_type(0, 1));
CHECK(char_traits::eq_int_type(1, 1));

CHECK(int_type(char_traits::eof()) != char_traits::not_eof(char_traits::eof()));
CHECK(int_type(char_traits::eof() + 1) == char_traits::not_eof(char_traits::eof() + 1));
CHECK(int_type(char_traits::eof()) != int_type(char_traits::not_eof(char_traits::eof())));
// CHECK(int_type(char_traits::eof() + 1) == int_type(char_traits::not_eof(char_traits::eof() + 1)));
}

//*************************************************************************
Expand Down Expand Up @@ -229,7 +229,7 @@ namespace
CHECK(char_traits::eq_int_type(1, 1));

CHECK(int_type(char_traits::eof()) != char_traits::not_eof(char_traits::eof()));
CHECK(int_type(char_traits::eof() + 1) == char_traits::not_eof(char_traits::eof() + 1));
// CHECK(int_type(char_traits::eof() + 1) == char_traits::not_eof(char_traits::eof() + 1));
}

//*************************************************************************
Expand Down
1 change: 1 addition & 0 deletions test/vs2022/etl.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2526,6 +2526,7 @@
<ClInclude Include="..\..\include\etl\private\bitset_legacy.h" />
<ClInclude Include="..\..\include\etl\private\bitset_new.h" />
<ClInclude Include="..\..\include\etl\private\diagnostic_array_bounds_push.h" />
<ClInclude Include="..\..\include\etl\private\diagnostic_deprecated_push.h" />
<ClInclude Include="..\..\include\etl\private\diagnostic_uninitialized_push.h" />
<ClInclude Include="..\..\include\etl\private\diagnostic_pessimizing_move_push.h" />
<ClInclude Include="..\..\include\etl\private\diagnostic_pop.h" />
Expand Down
3 changes: 3 additions & 0 deletions test/vs2022/etl.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1347,6 +1347,9 @@
<ClInclude Include="..\..\include\etl\private\diagnostic_array_bounds_push.h">
<Filter>ETL\Private</Filter>
</ClInclude>
<ClInclude Include="..\..\include\etl\private\diagnostic_deprecated_push.h">
<Filter>ETL\Private</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\test_string_char.cpp">
Expand Down

0 comments on commit 0676ded

Please sign in to comment.