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)
Change History (6)
comment:1 by , 15 years ago
Owner: | removed |
---|
comment:2 by , 15 years ago
Owner: | set to |
---|---|
Version: | → release 1.34.0 |
comment:3 by , 15 years ago
Status: | new → assigned |
---|
comment:4 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
comment:5 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [45226]) Fixed #1044. ArgumentPack is now available in the return type calculation
'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.