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
8afbe922
Commit
8afbe922
authored
Jun 17, 1999
by
Martin v. Löwis
Committed by
Martin v. Löwis
Jun 17, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* stl_queue.h: Rename _M_c to c, and _M_comp to comp.
From-SVN: r27581
parent
37b454bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
41 deletions
+45
-41
libstdc++/stl/ChangeLog
+4
-0
libstdc++/stl/stl_queue.h
+41
-41
No files found.
libstdc++/stl/ChangeLog
View file @
8afbe922
1999-06-18 Martin von Lwis <loewis@informatik.hu-berlin.de>
* stl_queue.h: Rename _M_c to c, and _M_comp to comp.
1999-05-17 Mark Kettenis <kettenis@gnu.org>
* stl_config.h: Only define __STL_PTHREADS with GLIBC >= 2 for
...
...
libstdc++/stl/stl_queue.h
View file @
8afbe922
...
...
@@ -49,33 +49,33 @@ public:
typedef
typename
_Sequence
::
reference
reference
;
typedef
typename
_Sequence
::
const_reference
const_reference
;
protected
:
_Sequence
_M_
c
;
_Sequence
c
;
public
:
queue
()
:
_M_
c
()
{}
explicit
queue
(
const
_Sequence
&
__c
)
:
_M_
c
(
__c
)
{}
bool
empty
()
const
{
return
_M_
c
.
empty
();
}
size_type
size
()
const
{
return
_M_
c
.
size
();
}
reference
front
()
{
return
_M_
c
.
front
();
}
const_reference
front
()
const
{
return
_M_
c
.
front
();
}
reference
back
()
{
return
_M_
c
.
back
();
}
const_reference
back
()
const
{
return
_M_
c
.
back
();
}
void
push
(
const
value_type
&
__x
)
{
_M_
c
.
push_back
(
__x
);
}
void
pop
()
{
_M_
c
.
pop_front
();
}
queue
()
:
c
()
{}
explicit
queue
(
const
_Sequence
&
__c
)
:
c
(
__c
)
{}
bool
empty
()
const
{
return
c
.
empty
();
}
size_type
size
()
const
{
return
c
.
size
();
}
reference
front
()
{
return
c
.
front
();
}
const_reference
front
()
const
{
return
c
.
front
();
}
reference
back
()
{
return
c
.
back
();
}
const_reference
back
()
const
{
return
c
.
back
();
}
void
push
(
const
value_type
&
__x
)
{
c
.
push_back
(
__x
);
}
void
pop
()
{
c
.
pop_front
();
}
};
template
<
class
_Tp
,
class
_Sequence
>
bool
operator
==
(
const
queue
<
_Tp
,
_Sequence
>&
__x
,
const
queue
<
_Tp
,
_Sequence
>&
__y
)
{
return
__x
.
_M_c
==
__y
.
_M_
c
;
return
__x
.
c
==
__y
.
c
;
}
template
<
class
_Tp
,
class
_Sequence
>
bool
operator
<
(
const
queue
<
_Tp
,
_Sequence
>&
__x
,
const
queue
<
_Tp
,
_Sequence
>&
__y
)
{
return
__x
.
_M_c
<
__y
.
_M_
c
;
return
__x
.
c
<
__y
.
c
;
}
#ifdef __STL_FUNCTION_TMPL_PARTIAL_ORDER
...
...
@@ -125,69 +125,69 @@ public:
typedef
typename
_Sequence
::
reference
reference
;
typedef
typename
_Sequence
::
const_reference
const_reference
;
protected
:
_Sequence
_M_
c
;
_Compare
_M_
comp
;
_Sequence
c
;
_Compare
comp
;
public
:
priority_queue
()
:
_M_
c
()
{}
explicit
priority_queue
(
const
_Compare
&
__x
)
:
_M_c
(),
_M_
comp
(
__x
)
{}
priority_queue
()
:
c
()
{}
explicit
priority_queue
(
const
_Compare
&
__x
)
:
c
(),
comp
(
__x
)
{}
priority_queue
(
const
_Compare
&
__x
,
const
_Sequence
&
__s
)
:
_M_c
(
__s
),
_M_
comp
(
__x
)
{
make_heap
(
_M_c
.
begin
(),
_M_c
.
end
(),
_M_
comp
);
}
:
c
(
__s
),
comp
(
__x
)
{
make_heap
(
c
.
begin
(),
c
.
end
(),
comp
);
}
#ifdef __STL_MEMBER_TEMPLATES
template
<
class
_InputIterator
>
priority_queue
(
_InputIterator
__first
,
_InputIterator
__last
)
:
_M_c
(
__first
,
__last
)
{
make_heap
(
_M_c
.
begin
(),
_M_c
.
end
(),
_M_
comp
);
}
:
c
(
__first
,
__last
)
{
make_heap
(
c
.
begin
(),
c
.
end
(),
comp
);
}
template
<
class
_InputIterator
>
priority_queue
(
_InputIterator
__first
,
_InputIterator
__last
,
const
_Compare
&
__x
)
:
_M_c
(
__first
,
__last
),
_M_
comp
(
__x
)
{
make_heap
(
_M_c
.
begin
(),
_M_c
.
end
(),
_M_
comp
);
}
:
c
(
__first
,
__last
),
comp
(
__x
)
{
make_heap
(
c
.
begin
(),
c
.
end
(),
comp
);
}
template
<
class
_InputIterator
>
priority_queue
(
_InputIterator
__first
,
_InputIterator
__last
,
const
_Compare
&
__x
,
const
_Sequence
&
__s
)
:
_M_c
(
__s
),
_M_
comp
(
__x
)
:
c
(
__s
),
comp
(
__x
)
{
_M_c
.
insert
(
_M_
c
.
end
(),
__first
,
__last
);
make_heap
(
_M_c
.
begin
(),
_M_c
.
end
(),
_M_
comp
);
c
.
insert
(
c
.
end
(),
__first
,
__last
);
make_heap
(
c
.
begin
(),
c
.
end
(),
comp
);
}
#else
/* __STL_MEMBER_TEMPLATES */
priority_queue
(
const
value_type
*
__first
,
const
value_type
*
__last
)
:
_M_c
(
__first
,
__last
)
{
make_heap
(
_M_c
.
begin
(),
_M_c
.
end
(),
_M_
comp
);
}
:
c
(
__first
,
__last
)
{
make_heap
(
c
.
begin
(),
c
.
end
(),
comp
);
}
priority_queue
(
const
value_type
*
__first
,
const
value_type
*
__last
,
const
_Compare
&
__x
)
:
_M_c
(
__first
,
__last
),
_M_
comp
(
__x
)
{
make_heap
(
_M_c
.
begin
(),
_M_c
.
end
(),
_M_
comp
);
}
:
c
(
__first
,
__last
),
comp
(
__x
)
{
make_heap
(
c
.
begin
(),
c
.
end
(),
comp
);
}
priority_queue
(
const
value_type
*
__first
,
const
value_type
*
__last
,
const
_Compare
&
__x
,
const
_Sequence
&
__c
)
:
_M_c
(
__c
),
_M_
comp
(
__x
)
:
c
(
__c
),
comp
(
__x
)
{
_M_c
.
insert
(
_M_
c
.
end
(),
__first
,
__last
);
make_heap
(
_M_c
.
begin
(),
_M_c
.
end
(),
_M_
comp
);
c
.
insert
(
c
.
end
(),
__first
,
__last
);
make_heap
(
c
.
begin
(),
c
.
end
(),
comp
);
}
#endif
/* __STL_MEMBER_TEMPLATES */
bool
empty
()
const
{
return
_M_
c
.
empty
();
}
size_type
size
()
const
{
return
_M_
c
.
size
();
}
const_reference
top
()
const
{
return
_M_
c
.
front
();
}
bool
empty
()
const
{
return
c
.
empty
();
}
size_type
size
()
const
{
return
c
.
size
();
}
const_reference
top
()
const
{
return
c
.
front
();
}
void
push
(
const
value_type
&
__x
)
{
__STL_TRY
{
_M_
c
.
push_back
(
__x
);
push_heap
(
_M_c
.
begin
(),
_M_c
.
end
(),
_M_
comp
);
c
.
push_back
(
__x
);
push_heap
(
c
.
begin
(),
c
.
end
(),
comp
);
}
__STL_UNWIND
(
_M_
c
.
clear
());
__STL_UNWIND
(
c
.
clear
());
}
void
pop
()
{
__STL_TRY
{
pop_heap
(
_M_c
.
begin
(),
_M_c
.
end
(),
_M_
comp
);
_M_
c
.
pop_back
();
pop_heap
(
c
.
begin
(),
c
.
end
(),
comp
);
c
.
pop_back
();
}
__STL_UNWIND
(
_M_
c
.
clear
());
__STL_UNWIND
(
c
.
clear
());
}
};
...
...
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