[llvm-bugs] [Bug 36353] New: Can not derive from time_get_byname
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Feb 12 08:06:46 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=36353
Bug ID: 36353
Summary: Can not derive from time_get_byname
Product: libc++
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: jasonliu.development at gmail.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
I think this is a valid use case:
#include <locale>
typedef std::char_traits<wchar_t> It;
typedef std::istreambuf_iterator<wchar_t, It> Isit;
struct Mytime : public std::time_get_byname<wchar_t, Isit> {
Mytime(const char *name, size_t refs)
: std::time_get_byname<wchar_t, Isit>(name, refs) {}
};
int main(){
const Mytime t("A",1);
}
When I compile this, I get a bunch of undefined symbols:
"std::__1::time_get_byname<wchar_t, std::__1::istreambuf_iterator<wchar_t,
std::__1::char_traits<wchar_t> > >::do_date_order() const", referenced from:
vtable for Mytime in bb-639bbe.o
"std::__1::time_get_byname<wchar_t, std::__1::istreambuf_iterator<wchar_t,
std::__1::char_traits<wchar_t> > >::__X() const", referenced from:
vtable for Mytime in bb-639bbe.o
"std::__1::time_get_byname<wchar_t, std::__1::istreambuf_iterator<wchar_t,
std::__1::char_traits<wchar_t> > >::__c() const", referenced from:
vtable for Mytime in bb-639bbe.o
"std::__1::time_get_byname<wchar_t, std::__1::istreambuf_iterator<wchar_t,
std::__1::char_traits<wchar_t> > >::__r() const", referenced from:
vtable for Mytime in bb-639bbe.o
"std::__1::time_get_byname<wchar_t, std::__1::istreambuf_iterator<wchar_t,
std::__1::char_traits<wchar_t> > >::__x() const", referenced from:
vtable for Mytime in bb-639bbe.o
"std::__1::time_get_byname<wchar_t, std::__1::istreambuf_iterator<wchar_t,
std::__1::char_traits<wchar_t> > >::__am_pm() const", referenced from:
vtable for Mytime in bb-639bbe.o
"std::__1::time_get_byname<wchar_t, std::__1::istreambuf_iterator<wchar_t,
std::__1::char_traits<wchar_t> > >::__weeks() const", referenced from:
vtable for Mytime in bb-639bbe.o
"std::__1::time_get_byname<wchar_t, std::__1::istreambuf_iterator<wchar_t,
std::__1::char_traits<wchar_t> > >::__months() const", referenced from:
vtable for Mytime in bb-639bbe.o
"non-virtual thunk to std::__1::time_get_byname<wchar_t,
std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >
>::__X() const", referenced from:
vtable for Mytime in bb-639bbe.o
"non-virtual thunk to std::__1::time_get_byname<wchar_t,
std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >
>::__c() const", referenced from:
vtable for Mytime in bb-639bbe.o
"non-virtual thunk to std::__1::time_get_byname<wchar_t,
std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >
>::__r() const", referenced from:
vtable for Mytime in bb-639bbe.o
"non-virtual thunk to std::__1::time_get_byname<wchar_t,
std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >
>::__x() const", referenced from:
vtable for Mytime in bb-639bbe.o
"non-virtual thunk to std::__1::time_get_byname<wchar_t,
std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >
>::__am_pm() const", referenced from:
vtable for Mytime in bb-639bbe.o
"non-virtual thunk to std::__1::time_get_byname<wchar_t,
std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >
>::__weeks() const", referenced from:
vtable for Mytime in bb-639bbe.o
"non-virtual thunk to std::__1::time_get_byname<wchar_t,
std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >
>::__months() const", referenced from:
vtable for Mytime in bb-639bbe.o
When I look at the header and I saw those functions are marked as "always
inline" and "hidden", any reason why those functions are marked as hidden in
the library?
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180212/98db5b0d/attachment.html>
More information about the llvm-bugs
mailing list