Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ target_link_libraries(boost_iostreams
Boost::iterator
Boost::mpl
Boost::preprocessor
Boost::random
Boost::range
Boost::regex
Boost::smart_ptr
Expand Down
1 change: 0 additions & 1 deletion build.jam
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ constant boost_dependencies :
/boost/mpl//boost_mpl
/boost/numeric_conversion//boost_numeric_conversion
/boost/preprocessor//boost_preprocessor
/boost/random//boost_random
/boost/range//boost_range
/boost/regex//boost_regex
/boost/smart_ptr//boost_smart_ptr
Expand Down
28 changes: 7 additions & 21 deletions include/boost/iostreams/filter/test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,7 @@
#include <iterator>
#include <string>
#include <vector>
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) && \
!BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \
/**/
# include <boost/random/linear_congruential.hpp>
# include <boost/random/uniform_smallint.hpp>
#endif
#include <random>
#include <boost/iostreams/categories.hpp>
#include <boost/iostreams/compose.hpp>
#include <boost/iostreams/copy.hpp>
Expand Down Expand Up @@ -64,21 +59,12 @@ BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_string, std::basic_string, 3)

const std::streamsize default_increment = 5;

#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) && \
!BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \
/**/
std::streamsize rand(std::streamsize inc)
{
static rand48 random_gen;
static uniform_smallint<int> random_dist(0, static_cast<int>(inc));
return random_dist(random_gen);
}
#else
std::streamsize rand(std::streamsize inc)
{
return (std::rand() * inc + 1) / RAND_MAX;
}
#endif
std::streamsize rand(std::streamsize inc)
{
static std::mt19937 random_gen;
static std::uniform_int_distribution<int> random_dist(0, static_cast<int>(inc));
return random_dist(random_gen);
}

class non_blocking_source {
public:
Expand Down
Loading