# FreeBSD 9.1 and std::tr1::hash



## aleksuss (Jan 31, 2013)

Hello. I write c++ program wich include google::sparse_hash_map. My data structure looks like this:
FreeBSD 9.1

```
typedef google::dense_hash_map<const char*, const User*, std:tr1::hash<const char*>, eq_string> data
```

FreeBSD 9.0

```
typedef google::dense_hash_map<const char*, const User*, __gnu_cxx::hash<const char*>, eq_string> data
```


There are two methods in the class:

```
void addUser(User *user);
User* getUser(const char* hash);
```

On FreeBSD 9.0 everything work OK. I can get the user by his hash. But on FreeBSD 9.1 it doesn't work.


----------



## expl (Jan 31, 2013)

```
std:tr1::hash<const char*>
```

Is it a typo in post or you spelled it like this in your source code as well?


----------



## aleksuss (Feb 1, 2013)

In my source code spelled like this.

```
std:tr1::hash<const char*>
```


----------



## xibo (Feb 1, 2013)

Unless you ran into some bug it should have failed on 9.0 (and 8.x, and NetBSD, ... and Windows) as there ought to be a second colon character between *std* and *tr1* (jump labels are illegal at that point), though.


----------



## aleksuss (Feb 1, 2013)

Sorry. Of course:

```
std::tr1::hash<const char*>
```

It was a mistake.


----------

