haohaolee / patl

Automatically exported from code.google.com/p/patl
0 stars 0 forks source link

problems while building trie_set with std::wstring #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

first of all thanks a lot for a great library!

I have a build problem on MS VS 2005 for the following code:

typedef patl::trie_set<std::wstring> Wstring_set;
typedef patl::levenshtein_distance<Wstring_set, true> Leven_dist;
Wstring_set dict; 

^-- this line gives template instantiation error in debug build which
happens algorithm_generic::compact():

    word_t compact() const
    {
        return
#ifdef PATL_ALIGNHACK
            qq_;
#else
            qid_ | q_; <- here it fails, presumably because qid_ and q_
have incompatible types (int and pointer?)
#endif
    }

With PATL_ALIGNHACK it works fine. I didn't try it with anything else than
wstring so I don't know if this is wstring-specific.

Original issue reported on code.google.com by vkol...@gmail.com on 18 Jul 2009 at 8:39

GoogleCodeExporter commented 9 years ago
Fixed.

Original comment by uxn...@gmail.com on 14 Jan 2010 at 5:34

GoogleCodeExporter commented 9 years ago

Original comment by uxn...@gmail.com on 2 Mar 2012 at 10:06