mirror of
https://github.com/boostorg/utility.git
synced 2025-08-02 14:24:30 +02:00
function pointer special case for default values
[SVN r1875]
This commit is contained in:
@@ -62,22 +62,17 @@ namespace test
|
||||
>
|
||||
{};
|
||||
|
||||
struct value_default
|
||||
double value_default()
|
||||
{
|
||||
typedef double result_type;
|
||||
|
||||
double operator()() const
|
||||
{
|
||||
return 666.222;
|
||||
}
|
||||
};
|
||||
return 666.222;
|
||||
}
|
||||
|
||||
template<class Params>
|
||||
int f_impl(const Params& p)
|
||||
{
|
||||
p[tester](
|
||||
p[name]
|
||||
, p[value || value_default() ]
|
||||
, p[value || &value_default ]
|
||||
, p[index | 999]
|
||||
);
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user