Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf5e485e

Browse files
Move to C++14: Move to std::get<type>(..) instead of xsimd::detail::get
1 parentd0f96dc commitf5e485e

File tree

3 files changed

+6
-33
lines changed

3 files changed

+6
-33
lines changed

‎include/xsimd/arch/xsimd_neon.hpp‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ namespace xsimd
169169
return_type<U>apply(U rhs)constnoexcept
170170
{
171171
using func_type = return_type<U> (*)(U);
172-
auto func =xsimd::detail::get<func_type>(m_func);
172+
auto func =std::get<func_type>(m_func);
173173
returnfunc(rhs);
174174
}
175175
};
@@ -183,7 +183,7 @@ namespace xsimd
183183
return_type<U>apply(U lhs, U rhs)constnoexcept
184184
{
185185
using func_type = return_type<U> (*)(U, U);
186-
auto func =xsimd::detail::get<func_type>(m_func);
186+
auto func =std::get<func_type>(m_func);
187187
returnfunc(lhs, rhs);
188188
}
189189
};
@@ -1866,7 +1866,7 @@ namespace xsimd
18661866
Uapply(comp_return_type<U> cond, U lhs, U rhs)constnoexcept
18671867
{
18681868
using func_type =U (*)(comp_return_type<U>, U, U);
1869-
auto func =xsimd::detail::get<func_type>(m_func);
1869+
auto func =std::get<func_type>(m_func);
18701870
returnfunc(cond, lhs, rhs);
18711871
}
18721872
};
@@ -2886,7 +2886,7 @@ namespace xsimd
28862886
Rapply(U rhs)constnoexcept
28872887
{
28882888
using func_type =R (*)(U);
2889-
auto func =xsimd::detail::get<func_type>(m_func);
2889+
auto func =std::get<func_type>(m_func);
28902890
returnfunc(rhs);
28912891
}
28922892
};
@@ -2915,7 +2915,7 @@ namespace xsimd
29152915
Vapply(U rhs)constnoexcept
29162916
{
29172917
using caster_type = bitwise_caster_impl<V, T...>;
2918-
auto caster =xsimd::detail::get<caster_type>(m_caster);
2918+
auto caster =std::get<caster_type>(m_caster);
29192919
return caster.apply(rhs);
29202920
}
29212921
};

‎include/xsimd/arch/xsimd_neon64.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ namespace xsimd
12411241
Vapply(float64x2_t rhs)const
12421242
{
12431243
using func_type =V (*)(float64x2_t);
1244-
auto func =xsimd::detail::get<func_type>(m_func);
1244+
auto func =std::get<func_type>(m_func);
12451245
returnfunc(rhs);
12461246
}
12471247
};

‎include/xsimd/types/xsimd_utils.hpp‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -280,33 +280,6 @@ namespace xsimd
280280
}
281281
}
282282

283-
/***********************************
284-
* Backport of std::get from C++14 *
285-
***********************************/
286-
287-
namespacedetail
288-
{
289-
template<classT,class... Types,size_t I,size_t... Is>
290-
inlineconst T&get_impl(const std::tuple<Types...>& t, std::is_same<T, T>, std::index_sequence<I, Is...>)noexcept
291-
{
292-
return std::get<I>(t);
293-
}
294-
295-
template<classT,classU,class... Types,size_t I,size_t... Is>
296-
inlineconst T&get_impl(const std::tuple<Types...>& t, std::is_same<T, U>, std::index_sequence<I, Is...>)noexcept
297-
{
298-
using tuple_elem =typename std::tuple_element<I +1, std::tuple<Types...>>::type;
299-
return get_impl<T>(t, std::is_same<T, tuple_elem>(), std::index_sequence<Is...>());
300-
}
301-
302-
template<classT,class... Types>
303-
inlineconst T&get(const std::tuple<Types...>& t)noexcept
304-
{
305-
using tuple_elem =typename std::tuple_element<0, std::tuple<Types...>>::type;
306-
return get_impl<T>(t, std::is_same<T, tuple_elem>(), std::make_index_sequence<sizeof...(Types)>());
307-
}
308-
}
309-
310283
/*********************************
311284
* Backport of void_t from C++17 *
312285
*********************************/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp