DRTVWR-587: Make LLSDParam<LLSD> simplify type when delegating.
LLSDParam<LLSD> is the generic case, when we need to pass LLSDParam adapters to some set of function parameters whose types we don't specifically know. Its templated conversion operator notices the actual parameter type T and delegates conversion to the specific LLSDParam<T> specialization. But when T has picked up references, e.g. somewhere along the way in the LL::apply() machinery, the compiler might not choose the desired conversion because we don't have a sufficiently specific LLSDParam specialization. LLSDParam<LLSD> can address that by using std::decay_t<T> when delegating to the specific LLSDParam specialization. This removes references, const and volatile.master
parent
1cebf95f13
commit
7fcb2bdb05
|
|
@ -358,7 +358,7 @@ public:
|
|||
/// otherwise, instantiate a more specific LLSDParam<T> to convert; that
|
||||
/// preserves the existing customization mechanism
|
||||
template <typename T>
|
||||
operator T() const { return LLSDParam<T>(value_); }
|
||||
operator T() const { return LLSDParam<std::decay_t<T>>(value_); }
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue