title: C++ error on std::unordered_map (Ubuntu - GCC4.8.2)
body: <p>I'm trying to compile someone else project on linux (Ubuntu), it's a game that uses SDL2. I'm compiling with Code::Blocks using GCC4.8.2 and with the C++11 flag. I spend the las hours to look in internet for the error or even understand it, but with no luck at all. I hope anyone can help me or at least give me a lead.</p>
  
  <p>The error is:</p>
  
  <pre><code>/usr/include/c++/4.8/bits/hashtable_policy.h: In instantiation of ‘struct std::__detail::__is_noexcept_hash&lt;Position, PositionHash&gt;’:
  /usr/include/c++/4.8/type_traits:121:12:   recursively required from ‘struct std::__and_&lt;std::is_default_constructible&lt;PositionHash&gt;, std::is_copy_assignable&lt;PositionHash&gt;, std::__detail::__is_noexcept_hash&lt;Position, PositionHash&gt; &gt;’
  /usr/include/c++/4.8/type_traits:121:12:   required from ‘struct std::__and_&lt;std::__is_fast_hash&lt;PositionHash&gt;, std::is_default_constructible&lt;PositionHash&gt;, std::is_copy_assignable&lt;PositionHash&gt;, std::__detail::__is_noexcept_hash&lt;Position, PositionHash&gt; &gt;’
  /usr/include/c++/4.8/type_traits:127:38:   required from ‘struct std::__not_&lt;std::__and_&lt;std::__is_fast_hash&lt;PositionHash&gt;, std::is_default_constructible&lt;PositionHash&gt;, std::is_copy_assignable&lt;PositionHash&gt;, std::__detail::__is_noexcept_hash&lt;Position, PositionHash&gt; &gt; &gt;’
  /usr/include/c++/4.8/bits/unordered_map.h:99:66:   required from ‘class std::unordered_map&lt;Position, SDLGameObject*, PositionHash&gt;’
  /home/*/*/games/magictower/Magic-Tower/Floor.h:17:61:   required from here
  </code></pre>
  
  <p>And the code for Floor.h:</p>
  
  <pre><code>#ifndef __FLOOR_H__
  #define __FLOOR_H__
  #include &lt;vector&gt;
  #include &lt;unordered_map&gt;
  
  
  #include "Position.h"
  
  //class SDLGameObject;
  #include "SDLGameObject.h"
  
  // Floor stores elements on that floor
  
  class Floor {
  
  public:
      std::unordered_map&lt;Position, SDLGameObject*, PositionHash&gt; elements;  // Line of the error
      std::vector&lt;std::vector&lt;SDLGameObject*&gt; &gt; map;// Map
  
  public:
      Floor();
      ~Floor();
  
      void render();
      void cleanUp();
  };
  #endif
  </code></pre>
  
  <p>And, if it helps, the code for Position.h:</p>
  
  <pre><code>#ifndef __POSITION_H__
  #define __POSITION_H__
  
  class Position {
  public:
      int x_coord;
      int y_coord;
  
  public:
      Position(int x, int y):x_coord(x),y_coord(y){}
  
      bool operator==(const Position&amp; other) const {
       return x_coord == other.x_coord &amp;&amp;
              y_coord == other.y_coord;
      }
  
  };
  
  class PositionHash {
  
  public:
      std::size_t operator()(const Position* p) const {
           // 16 is the maximum value in the pair of coordination integers
           return p-&gt;x_coord * 16 + p-&gt;y_coord;
      }
  };
  
  #endif
  </code></pre>
  
  <p>Thanks in advance!!!!</p>