Skip to content

Broken boost::sort::spreadsort::string_sort #66

Description

@sgn

Below function

template <class RandomAccessIter, class Unsigned_char_type>
inline typename boost::disable_if_c< sizeof(Unsigned_char_type) <= 2, void
>::type
string_sort(RandomAccessIter first, RandomAccessIter last,
Unsigned_char_type)
{
//Warning that we're using boost::sort::pdqsort, even though string_sort was called
BOOST_STATIC_ASSERT( sizeof(Unsigned_char_type) <= 2 );
boost::sort::pdqsort(first, last);
}

Will be disable if sizeof(Unsigned_char_type) <= 2, that means that function will be enabled when sizeof(Unsigned_char_type) > 2.

However, when sizeof(Unsigned_char_type) > 2, the BOOST_STATIC_ASSERT( sizeof(Unsigned_char_type) <= 2 ); will run into failure.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions