Skip to content

Commit

Permalink
Improve error messages for illegal relational operators
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Oct 18, 2015
1 parent bb1f4dc commit 36676fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/tao/seq/tuple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ namespace tao
struct index_of_impl< seq::index_sequence< Is... >, T, Ts... >
: seq::sum< std::size_t, ( std::is_same< T, Ts >::value ? Is : 0 )... >
{
static_assert( count_of< T, Ts... >::value > 0, "error: T not found within Ts..." );
static_assert( count_of< T, Ts... >::value < 2, "error: T must be unique within Ts..." );
static_assert( count_of< T, Ts... >::value > 0, "T not found within Ts..." );
static_assert( count_of< T, Ts... >::value < 2, "T must be unique within Ts..." );
};

template< typename T, typename... Ts >
Expand Down Expand Up @@ -329,7 +329,7 @@ namespace tao
}

// operators
template< typename... Ts, typename... Us >
template< typename... Ts, typename... Us, typename = typename std::enable_if< sizeof...( Ts ) == sizeof...( Us ) >::type >
TAOCPP_TUPLE_CONSTEXPR
bool operator==( const tuple< Ts... >& lhs, const tuple< Us... >& rhs )
{
Expand All @@ -343,7 +343,7 @@ namespace tao
return !( lhs == rhs );
}

template< typename... Ts, typename... Us >
template< typename... Ts, typename... Us, typename = typename std::enable_if< sizeof...( Ts ) == sizeof...( Us ) >::type >
TAOCPP_TUPLE_CONSTEXPR
bool operator<( const tuple< Ts... >& lhs, const tuple< Us... >& rhs )
{
Expand Down

0 comments on commit 36676fe

Please sign in to comment.