Boost logo

Boost :

Subject: Re: [boost] Boost linked example
From: degski (degski_at_[hidden])
Date: 2018-07-03 06:15:09


On 3 July 2018 at 09:07, Steven Watanabe via Boost <boost_at_[hidden]>
wrote:

> What exactly did you try? random_device is implemented in
> the library, so it shouldn't link if the library is missing.
>

I tried:

#include <boost/random.hpp>
#include <boost/random/random_device.hpp>
#include <iostream>

int
main()
{

    boost::random::taus88 rng { [ ] ( ) { boost::random::random_device
rdev; return ( static_cast<std::uint64_t> ( rdev ( ) ) << 32 ) | rdev ( );
} ( ) };

    boost::random::uniform_int_distribution<std::int32_t> dist { 0, 100 };

    std::cout << dist ( rng ) << '\n';

    return 0;
}

(Perhaps auto-link is picking up a library that you weren't
> expecting?)
>

I must have a stray then (I'm trying to test the auto-linking and it works,
while it shouldn't), now I have an anchor point, I'll take it from here.

Thanks Steven,

degski

-- 
*"If something cannot go on forever, it will stop" - Herbert Stein*

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk