Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
4d023b5b
Commit
4d023b5b
authored
Jul 06, 2018
by
Jonathan Wakely
Committed by
Jonathan Wakely
Jul 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* include/std/variant (__accepted_index): Use void_t.
From-SVN: r262471
parent
f9ccb8c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
libstdc++-v3/ChangeLog
+4
-0
libstdc++-v3/include/std/variant
+3
-3
No files found.
libstdc++-v3/ChangeLog
View file @
4d023b5b
2018-07-06 Jonathan Wakely <jwakely@redhat.com>
* include/std/variant (__accepted_index): Use void_t.
2018-07-05 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/85831
...
...
libstdc++-v3/include/std/variant
View file @
4d023b5b
...
...
@@ -710,7 +710,8 @@ namespace __variant
};
// Helper for variant(_Tp&&) and variant::operator=(_Tp&&).
// __accepted_index maps the arbitrary _Tp to an alternative type in _Variant.
// __accepted_index maps an arbitrary _Tp to an alternative type in _Variant
// (or to variant_npos).
template<typename _Tp, typename _Variant, typename = void>
struct __accepted_index
{ static constexpr size_t value = variant_npos; };
...
...
@@ -718,8 +719,7 @@ namespace __variant
template<typename _Tp, typename... _Types>
struct __accepted_index<
_Tp, variant<_Types...>,
decltype(__overload_set<_Types...>::_S_fun(std::declval<_Tp>()),
std::declval<void>())>
void_t<decltype(__overload_set<_Types...>::_S_fun(std::declval<_Tp>()))>>
{
static constexpr size_t value = sizeof...(_Types) - 1
- decltype(__overload_set<_Types...>::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment