boost::format bug?
Hi, I am getting boost::io::too_many_args exceptions for the following line. cout << format(" %1% %3% \n") % 1 % 2 % 3 % 4 % 5; but not for this one cout << format(" %1% %5% \n") % 1 % 2 % 3 % 4 % 5; If the last argument is used in the format, I do not get the exception. Is this a bug? Thanks. Orhun Birsoy -- _____________________________________________________________ Web-based SMS services available at http://www.operamail.com.
From your mailbox to local or overseas cell phones.
Powered by Outblaze
Orhun Birsoy wrote:
Hi, I am getting boost::io::too_many_args exceptions for the following line.
cout << format(" %1% %3% \n") % 1 % 2 % 3 % 4 % 5;
but not for this one
cout << format(" %1% %5% \n") % 1 % 2 % 3 % 4 % 5;
If the last argument is used in the format, I do not get the exception.
Is this a bug?
Thanks.
Orhun Birsoy
this is by design, and mentionned in the documentation : """ The only constraint is that it expects exactly /P/ arguments, /P/ being the maximum argument number used in the format string. (e.g., for "%1$d %10$d", /P/ is 10 ). Supplying more, or less, than /P/ arguments raises an exception. (unless it was set otherwise, see exceptions http://www.boost.org/libs/format/doc/format.html#exceptions) """ regards, -- Samuel
participants (2)
-
Orhun Birsoy
-
Samuel Krempp