Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Dominik Thoennes
cppTests
Commits
781e2b1e
Commit
781e2b1e
authored
Jun 24, 2020
by
Dominik Thoennes
Browse files
show usage of extern
parent
50d30f00
Changes
2
Hide whitespace changes
Inline
Side-by-side
explicit-templates/Hund.cpp
View file @
781e2b1e
...
...
@@ -6,12 +6,7 @@ void Hund<FOO>::bar(){
bellen
<
FOO
>
();
}
template
<
class
FOO
>
void
bellen
(){
std
::
cout
<<
"wuff"
<<
std
::
endl
;
}
template
class
Hund
<
double
>;
//
template void bellen<double>();
template
void
bellen
<
double
>();
explicit-templates/Hund.hpp
View file @
781e2b1e
#pragma once
#include <iostream>
template
<
class
FOO
>
class
Hund
{
...
...
@@ -6,7 +7,9 @@ class Hund {
void
bar
();
};
template
<
class
FOO
>
void
bellen
();
template
<
class
FOO
>
void
bellen
(){
std
::
cout
<<
"wuff"
<<
std
::
endl
;
}
//extern template void bellen<double>();
\ No newline at end of file
extern
template
void
bellen
<
double
>();
\ No newline at end of file
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