Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sgn opened this issue Dec 17, 2022 · 3 comments
Closed

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

sgn opened this issue Dec 17, 2022 · 3 comments
Assignees

Comments

@sgn
Copy link

sgn commented Dec 17, 2022

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.

@spreadsort
Copy link
Collaborator

spreadsort commented Dec 17, 2022 via email

@spreadsort
Copy link
Collaborator

Thanks for spotting that! The fix is in develop: 2e6674d

@spreadsort spreadsort self-assigned this Dec 17, 2022
@spreadsort
Copy link
Collaborator

merge into master is here: #67, waiting on Francisco's review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants