Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2006-01-27 11:45:42

Cromwell Enage <sponage_at_[hidden]> writes:

> MinGW reports:
> 'static const T&
> boost::random::detail::ptr_helper<T&>::ref(const T&)
> [with T = const boost::mt19937]' and 'static T&
> boost::random::detail::ptr_helper<T&>::ref(T&) [with T
> = const boost::mt19937]' cannot be overloaded
> When I wrap boost::ref around rng, the program runs
> fine.
> I'm curious as to why I get this error only when
> specifying positional arguments. Have I run afoul of
> something fundamental, such as the forwarding problem?

That's precisely correct. When you use keyword arguments, the two
overloads for

          T const&

are cheap to generate. For positional arguments you get a 2^N

Dave Abrahams
Boost Consulting

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at