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
2b23d3b1
Commit
2b23d3b1
authored
Sep 24, 1998
by
Benjamin Kosnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r22581
parent
9a469008
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
gcc/testsuite/g++.old-deja/g++.benjamin/tem05.C
+58
-0
No files found.
gcc/testsuite/g++.old-deja/g++.benjamin/tem05.C
0 → 100644
View file @
2b23d3b1
// 980924 bkoz
// just a quick test for export, to make sure we are warning for it.
// CHANGE ME when it's supported
// Build don't link:
// 14 Templates
//p 6
// A namespace-scope declaration or definintion of a non-line function
// template, a non-inline member function template, a non-inline
// member function of a class template or a static data member of a
// class template may be preceeded by the export keyword. If such a
// template is defined in the same translation unit in which it is
// declared as exported, the definition is considered to be
// exported. The first declaration of the template containing the
// export keyword must not follow the definition. (meaning that export
// can't beredeclared as non-export??)
// 1
// template definition
export
template
<
class
T
>
// WARNING -
bool
templ_one
(
T
a
)
{
if
(
a
>
0
)
return
true
;
else
return
false
;
}
// 2
// static data, mf, mf template
template
<
class
T
>
class
X_one
{
unsigned
short
id
;
T
type
;
public
:
static
const
bool
is_specialized
;
X_one
(
const
unsigned
short
&
us
=
5
)
:
id
(
us
),
type
(
T
(
0
))
{}
unsigned
short
ret_id
();
template
<
class
T2
>
bool
compare_ge
(
T2
test
);
};
export
template
<
class
T
>
// WARNING -
const
bool
X_one
<
T
>::
is_specialized
=
false
;
export
template
<
class
T
>
// WARNING -
unsigned
short
X_one
<
T
>::
ret_id
()
{
return
id
;
}
export
template
<
class
T
>
template
<
class
T2
>
// WARNING -
bool
compare_ge
(
T2
test
)
{
if
(
test
>
type
)
return
true
;
return
false
;
}
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