summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-08-27 02:50:29 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-02 01:16:45 +0300
commitc4e2b00d51f150632b203f81866604168d2ac1ff (patch)
tree69afd2d77a1c08748c8ebf949d897131b428c292 /Documentation
parentd1315600b8d406291215efc2be722dd93a38e481 (diff)
libcamera: base: bound_method: Remove BoundMethodArgs specialization
The BoundMethodArgs specialization for the void return type is only needed to avoid accessing the ret_ member variable that is lacking from the corresponding BoundMethodPack specialization. As the member variable is only accessed in the invokePack() function, instead of specializing the whole class we can use SFINAE to select between two different implementations of the function. SFINAE can only depend on the function template parameters, not the parameters of the class template in which the function is defined: "Only the failures in the types and expressions in the immediate context of the function type or its template parameter types are SFINAE errors." We thus can't use the type R in an std::enable_if expression for the invokePack() function. To work around this, we have to add a type T to the function template definition, which defaults to R, and use T with std::enable_if. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions