Opened 12 years ago
Closed 12 years ago
#611 closed defect (fixed)
Error in template usage when compiling with Sun Studio 12 and stlport4
Reported by: | Dagobert Michelsen | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | 1.2.14 |
Component: | Other | Version: | 1.2.13 |
Severity: | blocker | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | Solaris |
Description
Hi,
when I try to compile xapian-core 1.2.13 on Solaris 10 Sparc with Sun Studio 12 I get the following template compilation error:
gmake[2]: Entering directory `/home/dam/mgar/pkg/xapian-core/trunk/work/solaris10-sparc/build-isa-sparcv8plus/xapian-core-1.2.13' source='examples/quest.cc' object='examples/quest.o' libtool=no \ DEPDIR=.deps depmode=none /bin/bash ./depcomp \ /opt/SUNWspro/bin/CC -DHAVE_CONFIG_H -I. -I./common -I./include -I/opt/csw/include -library=stlport4 -features=tmplife -xO3 -m32 -xarch=sparc -c -o examples/quest.o examples/quest.cc "/opt/SUNWspro/prod/include/CC/stlport4/stl/_algobase.c", line 375: Error: Formal argument __x of type const char*const& in call to std::less<const char*>::operator()(const char*const&, const char*const&) const is being passed qp_flag. "/opt/SUNWspro/prod/include/CC/stlport4/stl/_algo.h", line 491: Where: While instantiating "std::__lower_bound<qp_flag*, const char*, std::less<const char*>, int>(qp_flag*, qp_flag*, const char*const&, std::less<const char*>, int*)". "/opt/SUNWspro/prod/include/CC/stlport4/stl/_algo.h", line 491: Where: Instantiated from non-template code. 1 Error(s) detected. gmake[2]: *** [examples/quest.o] Error 1
Attachments (1)
Change History (6)
comment:1 by , 12 years ago
Status: | new → assigned |
---|
comment:3 by , 12 years ago
I can confirm that the test works. Now I have several failing tests. I will open another ticket for that. Thanks again for the patch!
comment:4 by , 12 years ago
I meant "I can confirm that the patch works". The source now compiles cleanly on Sun Studio 12.
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
I guess we'll have to construct a temporary qp_flag instead of just overloading operator< here.