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
eee9d6bb
Commit
eee9d6bb
authored
Dec 10, 2002
by
Gabriel Dos Reis
Committed by
Gabriel Dos Reis
Dec 10, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* include/bits/slice_array.h (slice_array<>::operator=): Fix typo.
From-SVN: r59983
parent
dcba9b0f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
libstdc++-v3/ChangeLog
+4
-0
libstdc++-v3/include/bits/slice_array.h
+2
-1
libstdc++-v3/testsuite/26_numerics/slice_array_assignment.cc
+11
-5
No files found.
libstdc++-v3/ChangeLog
View file @
eee9d6bb
2002-12-09 Gabriel Dos Reis
<gdr
@
integrable-solutions
.
net
>
* include/bits/slice_array.h (slice_array
<>
::operator=): Fix typo.
2002-12-09 Mark Mitchell
<mark
@
codesourcery
.
com
>
* libsupc++/cxxabi.h (__cxa_pure_virtual): Declare it.
...
...
libstdc++-v3/include/bits/slice_array.h
View file @
eee9d6bb
...
...
@@ -157,7 +157,8 @@ namespace std
inline
slice_array
<
_Tp
>&
slice_array
<
_Tp
>::
operator
=
(
const
slice_array
<
_Tp
>&
__a
)
{
__valarray_copy
(
_M_array
,
_M_sz
,
_M_stride
,
__a
.
_M_array
,
__a
.
_M_stride
);
__valarray_copy
(
__a
.
_M_array
,
__a
.
_M_sz
,
__a
.
_M_stride
,
_M_array
,
_M_stride
);
return
*
this
;
}
...
...
libstdc++-v3/testsuite/26_numerics/slice_array_assignment.cc
View file @
eee9d6bb
// 20010613 gdr
// Copyright (C) 2001 Free Software Foundation, Inc.
// Copyright (C) 2001
, 2002
Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
...
...
@@ -30,15 +30,21 @@
// This is DR-253. Test for accessible assignment-operators.
#include <valarray>
#include <testsuite_hooks.h>
int
main
()
{
std
::
valarray
<
double
>
v
(
10
),
w
(
10
);
std
::
slice
s
(
0
,
0
,
0
);
using
std
::
valarray
;
using
std
::
slice
;
valarray
<
int
>
v
(
1
,
10
),
w
(
2
,
10
);
v
[
s
]
=
w
[
s
];
// dg-do compile
w
[
slice
(
0
,
3
,
3
)]
=
v
[
slice
(
2
,
3
,
3
)];
std
::
slice_array
<
double
>
t
=
v
[
s
];
VERIFY
(
v
[
0
]
==
1
&&
w
[
0
]
==
1
);
VERIFY
(
v
[
3
]
==
1
&&
w
[
3
]
==
1
);
VERIFY
(
v
[
6
]
==
1
&&
w
[
6
]
==
1
);
std
::
slice_array
<
int
>
t
=
v
[
slice
(
0
,
10
,
1
)];
return
0
;
}
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