Question: I was working on our current release branch "base" which is going to be released pretty soon. Last moment my feature is being pulled out and I have some un-pushed changes on the base branch. This is a big set including a huge merge of around 400 commits. Since it is being pushed, I cannot push it to base. Also, I don't want to re-do the merge. 

So, I was wondering if I can do this:

from the tree that has the merged changes, branch off a new branch, say "post-release" and then push it on the repository without changing base. Is it possible? I want to prevent accidental commit to base (I saw sometimes multiple refs getting updated in one single push). 

This diagram may help visualize the problem.

```
master
------------------------------------------->
    \                           
     \---release1--->            
                     \
                      \--base (releasing soon)------>
                          (I have some changes merged on a local tree 
                           based off "base" but not pushed to base)     

```

Since base will be released, I don't want to push my local changes but preserve these changes in some branch(which I can push to the repo.). 

Ideally, I should have started with creating a branch based off "base" branch and then later on merged it but I didn't do that.

Answer: 
The standard specialization for `std::string` is probably good enough (probably even extremely good) for strings in general. But if your working with string of a very specific format, you probably could find or design a better algorithm for your particular case.
You could check the [wiki](http://www.cplusplus.com/reference/algorithm/for_each/) , where you can see that in order to specify the hash function you should write something like : 

```
 std::unordered_map<X,int,hash_X> my_map;

```

where hash\_X is the definition of the hash function.

For completeness I include the code of the definition found in the [wiki](http://www.cplusplus.com/reference/algorithm/for_each/)

```
struct X{int i,j,k;};

struct hash_X{
  size_t operator()(const X &x){
    return hash<int>()(x.i) ^ hash<int>()(x.j) ^ hash<int>()(x.k);
  }
};

```