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&
          T const&

are cheap to generate. For positional arguments you get a 2^N
explosion.
http://www.boost.org/libs/parameter/doc/html/index.html#out-parameters

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net