title: std::make_unsigned not giving expected results
body: <p>I have something like this:</p>
  
  <pre><code>template&lt;class T&gt;
  class SomeClass {
  public:
      typedef std::make_unsigned&lt;T&gt; unsigned_t;
      unsigned_t maxBinBitRep_ { - 1 };    
  };
  
  int main() {
      // Okay prints out 255 as expected.
      SomeClass&lt;unsigned char&gt;  unsignedChar;  // unsigned version
      // New to `make_unsigned&lt;&gt;` but should print 255.
      //std::cout &lt;&lt; unsignedChar.maxBinBitRep &lt;&lt; std::endl; 
  
      // Should be printing the same as above however it's printing: 4294967295
      SomeClass&lt;char&gt; signedChar;
      // same as above.
      //std::cout &lt;&lt; signedChar.maxBinBitRep &lt;&lt; std::endl; // signed version
  
  
      std::cout &lt;&lt; "/nPress any key and enter to quit./n" );
      char q;
      std::cin &gt;&gt; q;
  
      return 0;
  }
  </code></pre>
  
  <p>I'm trying to take the <code>integral</code> type that is passed into the template's parameter list and make a <code>unsigned</code> version of it and initializing it to <code>-1</code>. This should give me the value that I need for any <code>integral type</code>. </p>
  
  <p>Am I using <code>std::make_unsigned</code> correctly?</p>
  
  <p><em>my mistake</em> miss the keyword <code>class</code> in the declaration... fixed typo.</p>
  
  <hr>
  
  <p><strong>EDIT</strong> - <em>My Actual Class:</em></p>
  
  <pre><code>template&lt;class T&gt;
  class showBinary {
  public:
      static const std::size_t standardByteWidth_ { 8 };  
  private:
      typedef std::make_unsigned&lt;T&gt; unsigned_t;
      unsigned_t maxVal_ { -1 };
  
      T t_;
      std::vector&lt;unsigned&gt; bitPattern_;
      std::size_t size_ = sizeof( T );        
  
  public:
      explicit showBinary( T t ) : t_( t ) {
  
          bitPattern_.resize( size_ * standardByteWidth_ );
          for ( int i = ((maxVal_ + 1) / 2); i &gt;= 1; i &gt;&gt;= 1 ) {
              if ( t_ &amp; i ) {
                  bitPattern_.emplace_back( 1 );
              } else {
                  bitPattern_.emplace_back( 0 );
              }
          }
      }    
  
      template&lt;typename U&gt;
      friend std::ostream&amp; operator&lt;&lt;( std::ostream&amp; out, const showBinary&lt;U&gt;&amp; val ) {
          std::ostringstream ostring;
          ostring &lt;&lt; "Val: " &lt;&lt; val.t_ &lt;&lt; " ";
          ostring &lt;&lt; "Max Value: " &lt;&lt; val.maxVal_ &lt;&lt; "\n";
          ostring &lt;&lt; "Size in bytes: " &lt;&lt; val.size_ &lt;&lt; " ";
          ostring &lt;&lt; "Number of bits: " &lt;&lt; val.size_ * val.standardByteWidth_ &lt;&lt; "\n";
  
          ostring &lt;&lt; "Bit Pattern: ";
  
          for ( auto t : val.bitPattern_ ) {
              ostring &lt;&lt; t;
          }
          ostring &lt;&lt; std::endl;
  
          out &lt;&lt; ostring.str();
          return out;
      }
  
  };
  </code></pre>
  
  <p>Its use:</p>
  
  <pre><code>int main() {
      showBinary&lt;unsigned char&gt; ucBin( 5 );
      showBinary&lt;char&gt; scBin( 5 );
      std::cout &lt;&lt; ucBin &lt;&lt; std::endl;
      std::cout &lt;&lt; scBin &lt;&lt; std::endl;
  
      std::cout &lt;&lt; "\nPress any key and enter to quit." &lt;&lt; std::endl;
      char q;
      std::cin &gt;&gt; q;
  
      return 0;        
  }
  </code></pre>