Comments (3)
Seems to work fine with gcc, but clang is definitely not happy. Since this
uses tr1 things, does this code need a C11 refresh or something?
Original comment by [email protected]
on 29 Oct 2013 at 9:36
from sparsehash.
I'm getting compile error on FreeBSD 10 release with clang 3.3 too ( have you
solved the problem yet? ) :
./src/sparsehash/internal/sparsehashtable.h:161:8: note: candidate constructor
(the implicit copy constructor) not viable: requires 1
argument, but 3 were provided
struct sparse_hashtable_iterator {
^
In file included from src/hashtable_test.cc:63:
./src/hash_test_interface.h:88:15: error: type 'typename
sparse_hash_map<basic_string<char>, basic_string<char>, Hasher, Hasher,
Alloc<basic_string<char>, unsigned long, 18446744073709551615> >::iterator' (aka 'sparse_hashtable_iterator<std::__1::pair<const
std::__1::basic_string<char>, std::__1::basic_string<char> >, std::__1::basic_string<char>, <anonymous>::Hasher,
google::sparse_hash_map<std::__1::basic_string<char>, std::__1::basic_string<char>, <anonymous>::Hasher, <anonymous>::Hasher,
<anonymous>::Alloc<std::__1::basic_string<char>, unsigned long, 18446744073709551615> >::SelectKey,
google::sparse_hash_map<std::__1::basic_string<char>, std::__1::basic_string<char>, <anonymous>::Hasher, <anonymous>::Hasher,
<anonymous>::Alloc<std::__1::basic_string<char>, unsigned long, 18446744073709551615> >::SetKey, <anonymous>::Hasher,
<anonymous>::Alloc<std::__1::basic_string<char>, unsigned long, 18446744073709551615> >') is not a direct or virtual base of
'google::BaseHashtableInterface<google::sparse_hash_map<std::__1::basic_string<char>, std::__1::basic_string<char>,
<anonymous>::Hasher, <anonymous>::Hasher, <anonymous>::Alloc<std::__1::basic_string<char>, unsigned long, 18446744073709551615> >
>::iterator'
: HT::iterator(it), parent_(parent) { }
^~~~~~~~
./src/hash_test_interface.h:144:12: note: in instantiation of member function
'google::BaseHashtableInterface<google::sparse_hash_map<std::__1::basic_string<char>, std::__1::basic_string<char>,
<anonymous>::Hasher, <anonymous>::Hasher, <anonymous>::Alloc<std::__1::basic_string<char>, unsigned long, 18446744073709551615> >
>::iterator::iterator' requested here
return iterator(ht_.begin(), this);
^
src/hashtable_test.cc:620:25: note: in instantiation of member function
'google::BaseHashtableInterface<google::sparse_hash_map<std::__1::basic_string<char>, std::__1::basic_string<char>,
<anonymous>::Hasher, <anonymous>::Hasher, <anonymous>::Alloc<std::__1::basic_string<char>, unsigned long, 18446744073709551615> >
>::begin' requested here
EXPECT_TRUE(this->ht_.begin() == this->ht_.end());
^
./src/testutil.h:51:9: note: expanded from macro 'EXPECT_TRUE'
if (!(cond)) { \
^
src/hashtable_test.cc:619:1: note: in instantiation of member function
'<anonymous
namespace>::TEST_onetype_HashtableAllTest_NormalIterators<google::HashtableInterface_SparseHashMap<std::__1::basic_string<char>,
std::__1::basic_string<char>, <anonymous>::Hasher, <anonymous>::Hasher, <anonymous>::Alloc<std::__1::basic_string<char>, unsigned
long, 18446744073709551615> > >::Run' requested here
TYPED_TEST(HashtableAllTest, NormalIterators) {
^
./src/testutil.h:171:7: note: expanded from macro 'TYPED_TEST'
Run(); \
^
src/hashtable_test.cc:619:1: note: in instantiation of member function
'<anonymous
namespace>::TEST_onetype_HashtableAllTest_NormalIterators<google::HashtableInterface_SparseHashMap<std::__1::basic_string<char>,
std::__1::basic_string<char>, <anonymous>::Hasher, <anonymous>::Hasher, <anonymous>::Alloc<std::__1::basic_string<char>, unsigned
long, 18446744073709551615> > >::TEST_onetype_HashtableAllTest_NormalIterators' requested here
TYPED_TEST(HashtableAllTest, NormalIterators) {
^
./src/testutil.h:205:68: note: expanded from macro 'TYPED_TEST'
TEST_onetype_##superclass##_##testname<superclass##_type7> t; \
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.
*** Error code 1
Original comment by [email protected]
on 27 Aug 2014 at 10:16
from sparsehash.
Seems clang is a bit more stringent - some of the allocators used in the test
are wrong. Seems hashmap allocators need to return pairs. Separately looks like
there's something wonky going on in libc++ or sparsehash itself - the first
element of the pair needs to be const. Not sure why.
Either way - here's a patch to fix the compile with clang.
Original comment by [email protected]
on 27 Oct 2014 at 7:17
Attachments:
from sparsehash.
Related Issues (20)
- Memory Corruption HOT 2
- Compile fails on up-to-date Fedora 18 system HOT 2
- Insert deleted key into hashmap will cause size() be increased
- Cannot compile sparsehash-2.0.2 on Ubuntu 12.04LTS
- [PATCH] Fix gcc warning: format '%p' expects argument of type 'void*'
- news page specifies wrong date
- failure during "make" of sparsehash on mac osx 10.8.5 HOT 1
- Please implement a check for try in case libstdc++ implements c++11 where tr1 is merged into std HOT 4
- Latest version of xcode Command Line tools breaks sparsehash. HOT 6
- Fix the compile problem's on llvm(macosx) HOT 1
- Call resize to preallocate for memory does not work
- SPARSEHASH_COMPILE_ASSERT HOT 2
- Repair compilation with clang
- Installation fails check on Red Hat 6
- Installation fails at "make" step on Red Hat Linux 6
- make check fails with GCC 4.9 on Mac OS 10.10.1
- [PATCH] Make dense_hash_map work with non-default-constructible values HOT 1
- Is it thread safe for insertion of sparse hash table? HOT 1
- Google Code is dying
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sparsehash.