Skip to content

Commit

Permalink
Add missing inline
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmoene committed Apr 1, 2014
1 parent 3280fb5 commit 51c897f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changes for lest � lest errors escape testing


version 1.7.4 2014-04-01

- Add missing inline to to_string() functions.


version 1.7.3 2014-02-06

- Restore formatting of Readme.md (trailing double spaces).
Expand Down
8 changes: 4 additions & 4 deletions lest_cpp03.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,11 @@ int run( C const & specification, std::ostream & os = std::cout )
// Expression decomposition:

#if __cplusplus >= 201103L
std::string to_string( std::nullptr_t const & ) { return "nullptr"; }
inline std::string to_string( std::nullptr_t const & ) { return "nullptr"; }
#endif
std::string to_string( std::string const & text ) { return "\"" + text + "\"" ; }
std::string to_string( char const * const & text ) { return "\"" + std::string( text ) + "\"" ; }
std::string to_string( char const & text ) { return "\'" + std::string( 1, text ) + "\'" ; }
inline std::string to_string( std::string const & text ) { return "\"" + text + "\"" ; }
inline std::string to_string( char const * const & text ) { return "\"" + std::string( text ) + "\"" ; }
inline std::string to_string( char const & text ) { return "\'" + std::string( 1, text ) + "\'" ; }

template <typename T>
std::string to_string( T const & value )
Expand Down
8 changes: 4 additions & 4 deletions lest_decompose.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ int run( test const (&specification)[N], std::ostream & os = std::cout )

// Expression decomposition:

std::string to_string( std::nullptr_t const & ) { return "nullptr"; }
std::string to_string( std::string const & text ) { return "\"" + text + "\"" ; }
std::string to_string( char const * const & text ) { return "\"" + std::string( text ) + "\"" ; }
std::string to_string( char const & text ) { return "\'" + std::string( 1, text ) + "\'" ; }
inline std::string to_string( std::nullptr_t const & ) { return "nullptr"; }
inline std::string to_string( std::string const & text ) { return "\"" + text + "\"" ; }
inline std::string to_string( char const * const & text ) { return "\"" + std::string( text ) + "\"" ; }
inline std::string to_string( char const & text ) { return "\'" + std::string( 1, text ) + "\'" ; }

// not using std::true_type to prevent warning: ...has a non-virtual destructor [-Weffc++]:

Expand Down

0 comments on commit 51c897f

Please sign in to comment.