|
Boost Users : |
Subject: Re: [Boost-users] [thread]N of args for thread::thread with args
From: Arash Partow (arash_at_[hidden])
Date: 2011-10-19 17:37:22
Marcello Puligheddu wrote:
> In
> http://www.boost.org/doc/libs/1_47_0/doc/html/thread/thread_management.html
>
> Thread Constructor with arguments
> <http://www.boost.org/doc/libs/1_47_0/doc/html/thread/thread_management.html#thread.thread_management.thread.multiple_argument_constructor>
>
> [...]
> Note:
>
> Currently up to nine additional arguments |a1|to |a9|can be
> specified in addition to the function |f|.
>
> But in
>
> Launching threads
> <http://www.boost.org/doc/libs/1_47_0/doc/html/thread/thread_management.html#thread.thread_management.launching_threads>
>
> is clearly stated
>
> "There is an unspecified limit on the number of additional arguments
> that can be passed."
AFAIK, for C++11 implementations of std::thread, based on 30.2.1.2 of [1], the constructor is to make use of variadic templates. I believe that is where the term "unspecified" originates. For pre C++11 implementations, this can only be achieved through multiple overloads with a varying number of parameters, which would inevitably have a trivial upper-limit.
[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2497.html#thread.threads.constr
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