Skip to content

Commit

Permalink
Delete type_traits.h (dotnet#98553)
Browse files Browse the repository at this point in the history
Bunch of template metaprogramming that is not actually used.
  • Loading branch information
MichalStrehovsky authored Feb 17, 2024
1 parent 50c0153 commit a940313
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 312 deletions.
1 change: 0 additions & 1 deletion src/coreclr/nativeaot/Runtime/inc/daccess.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#include "type_traits.hpp"
#include "CommonTypes.h"

#include "../../inc/daccess.h"
311 changes: 0 additions & 311 deletions src/coreclr/nativeaot/Runtime/inc/type_traits.hpp

This file was deleted.

21 changes: 21 additions & 0 deletions src/coreclr/nativeaot/Runtime/slist.inl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@ MSVC_DISABLE_WARNING(4127) // conditional expression is constant --
//-------------------------------------------------------------------------------------------------
namespace rh { namespace std
{
template<class _InIt, class _Ty>
inline
uintptr_t count(_InIt _First, _InIt _Last, const _Ty& _Val)
{
uintptr_t _Ret = 0;
for (; _First != _Last; _First++)
if (*_First == _Val)
++_Ret;
return _Ret;
}

template<class _InIt, class _Ty>
inline
_InIt find(_InIt _First, _InIt _Last, const _Ty& _Val)
{ // find first matching _Val
for (; _First != _Last; ++_First)
if (*_First == _Val)
break;
return (_First);
}

// Specialize rh::std::find for SList iterators so that it will use _Traits::Equals.
template<class _Tx, class _Traits, class _Ty>
inline
Expand Down

0 comments on commit a940313

Please sign in to comment.