Git Product home page Git Product logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
Thanks for the report!  I don't have access to a sun C compiler, so that's 
helpful.

I've taken the awk script (with slight modifications) to replace fgrep -- even 
though
we could probably figure out how to make solaris grep emulate fgrep, I'm using 
enough
obscure grep flags that awk is probably safer.  (Though I don't know how 
portable
stuff like ARGIND is!)

As for debugging the second problem: the issue is that sun's STL has a 
different type
for its hashtable iterators than gcc's STL.  I'll see if I can use a typename 
to work
around this.

Original comment by [email protected] on 7 Aug 2007 at 7:47

  • Changed state: Started

from sparsehash.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
I looked into this more, and I was mistaken in my original diagnosis: all the 
code is
sparsehash code, not the compiler's STL code at all.

I'm mystified by the error.  I'll summarize the important part of it:
   line 724: Error: Could not find a match for write_item needed in
test_string<google::dense_hashtable<std::string, std::string,
(There's an identical error message for read_item).

When test_string calls write_item, the write_item argument has the type of the
hashtable key, in this case std::string.  But we do have a write_item that 
matches
std::string:
   static void write_item(FILE *fp, const string &val) {

I don't know why that doesn't match.  Note the compiler doesn't complain about a
similar call to "test<google::sparse_hashtable<std::string, std::string, ...>", 
which
should have identical type information.

If you can find out what's going on, I'll fix it.  But otherwise, I don't 
really know
what to do.

Original comment by [email protected] on 7 Aug 2007 at 9:38

from sparsehash.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
It seems to be connected to static linkage of 
read_item()/write_item()/free_item()
functions. A friend of mine, Sun Micro employee who works on Sun Studio, told 
me that
the Standard prohibits calls to static functions with template parameters. Sun
documentation provides a few words on the subject, see "Calling Dependent Static
Functions From a Function Template":

 http://developers.sun.com/sunstudio/documentation/ss11/mr/READMEs/c++.html

If I get it right, it refers to C++ Standard 14.6.4.2 - Candidate functions
[temp.dep.candidate]:

-1- For a function call that depends on a template parameter, if the function 
name is
an unqualified-id but not a template-id, the candidate functions are found 
using the
usual lookup rules (basic.lookup.unqual, basic.lookup.koenig) except that:

    * For the part of the lookup using unqualified name lookup (basic.lookup.unqual),
only function declarations with external linkage from the template definition 
context
are found.

Removing "static" linkage declarator (please see the patch) makes the project 
built
on Solaris.

Original comment by [email protected] on 20 Aug 2007 at 2:29

Attachments:

from sparsehash.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
I'm glad you figured out what's going on!  I've fixed the code to use an 
anonymous
namespace instead of 'static', so this should be fixed in the next release.

Original comment by [email protected] on 20 Aug 2007 at 6:30

from sparsehash.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
Sparsehash 0.9 was just released, which should fix this problem.

Original comment by [email protected] on 9 Oct 2007 at 10:39

  • Changed state: Fixed

from sparsehash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.