Skip to content

Commit

Permalink
Fixed OStream: printing a char now prints as a character, not an inte…
Browse files Browse the repository at this point in the history
…ger.

This has been referenced here: #17
  • Loading branch information
Chris--A committed Jul 23, 2016
1 parent 8e7412e commit 99e272f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib/OStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@

/** A specialization for integer data. **/
template< typename T >
typename enable_if<is_integer<T>::value, OStream>::type operator<< ( const T &data ){
typename enable_if<
is_integer<T>::value &&
!is_same<T,char>::value
, OStream>::type operator<< ( const T &data ){
out.print( data, params.base );
return *this;
}
Expand All @@ -117,7 +120,8 @@
template<
typename T,
typename = typename enable_if<
!is_fundamental<T>::value &&
(!is_fundamental<T>::value ||
is_same<T,char>::value) &&
!is_base_of<OStreamManipulator<T>,T>::value
>::type>
OStream operator<< ( const T &data ){
Expand Down

0 comments on commit 99e272f

Please sign in to comment.