mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
tst-unique3.cc: Add explicit instantiation declaration for S<char>::i
Add explicit instantiation declaration of S<char>::i to silence Clang error: tst-unique3.cc:6:18: error: instantiation of variable 'S<char>::i' required here, but no definition is available [-Werror,-Wundefined-var-template] 6 | int t = S<char>::i; | ^ ./tst-unique3.h:5:14: note: forward declaration of template entity is here 5 | static int i; | ^ tst-unique3.cc:6:18: note: add an explicit instantiation declaration to suppress this warning if 'S<char>::i' is explicitly instantiated in another translation unit 6 | int t = S<char>::i; | ^ Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
This commit is contained in:
parent
54fe008ba6
commit
080a320914
1 changed files with 3 additions and 0 deletions
|
@ -3,6 +3,9 @@
|
|||
#include <cstdio>
|
||||
#include "../dlfcn/dlfcn.h"
|
||||
|
||||
template<>
|
||||
int S<char>::i;
|
||||
|
||||
int t = S<char>::i;
|
||||
|
||||
int
|
||||
|
|
Loading…
Add table
Reference in a new issue