Opened 15 years ago

Closed 14 years ago

#1044 closed Bugs (fixed)

Argument pack inaccessable in a functions return type

Reported by: John Maddock Owned by: Daniel Wallin
Milestone: To Be Determined Component: parameter
Version: Boost 1.34.0 Severity: Showstopper
Keywords: Cc:

Description

An argument pack can not currently be used within the return type of a Boost.Parameter enabled function. The following patch from Daniel Wallin fixes the issue:

--- preprocessor.hpp 29 Sep 2006 00:31:28 -0000 1.5.2.9 +++ preprocessor.hpp 27 May 2007 16:01:40 -0000 @@ -149,7 +149,8 @@

, typename Parameters::deduced_list , tag_keyword_arg , mpl::false_

  • >::type type;

+ >::type result; + typedef typename mpl::first<result>::type type;

};

I also note that use of the argument pack within a BOOST_PARAMETER_FUNCTION-declared function is undocumented (but is supposed to be supported).

Likewise I couldn't easily see any documentation on the names or the types of the parameters passed to such a function: the information is sort of there in the tutorial, but I had to resort to the preprocessed output to see what was going on.

John Maddock.

Attachments (1)

parameter.diff (634 bytes ) - added by John Maddock 15 years ago.
Daniel's Patch

Download all attachments as: .zip

Change History (6)

comment:1 by Daniel James, 15 years ago

Owner: - removed

'daniel' isn't Daniel Wallin, it's actually my old username which I changed to avoid confusion but it's stuck around, making things worse. Sorry. I don't think Daniel Wallin is registered.

by John Maddock, 15 years ago

Attachment: parameter.diff added

Daniel's Patch

comment:2 by John Maddock, 15 years ago

Owner: set to Dave Abrahams
Version: release 1.34.0

comment:3 by Dave Abrahams, 15 years ago

Status: newassigned

comment:4 by Dave Abrahams, 15 years ago

Owner: changed from Dave Abrahams to Daniel Wallin
Status: assignednew

comment:5 by Daniel Wallin, 14 years ago

Resolution: fixed
Status: newclosed

(In [45226]) Fixed #1044. ArgumentPack is now available in the return type calculation

Note: See TracTickets for help on using tickets.