diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-10-19 11:12:25 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-10-19 15:12:35 +0200 |
commit | 5e8479a38f0c342979520018f79a6f79d40e99e3 (patch) | |
tree | 0f28489dff0a8c2a41b1fe23cd2f1a4c7c1d6d98 /include | |
parent | bc2fca254f8a9d7ca5eb156b7e3c19756a257e3b (diff) |
Remove a std::remove_reference_t
...which is unnecessary (short of dubious explicit invocations like
`makePropertyValue<int const &>(i)`) as T can never be deduced to be a reference
type there. And add some test code (that also tests the bit-field scenario
mentioned in the commit message of 23cded985ba0131f85ee445492c04871fbfb6351
"Specialize comphelper::makePropertyValue for arithmetic types").
Change-Id: If41ce20ab643041dd9721d05373eeb32fd099ead
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123805
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/comphelper/propertyvalue.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/comphelper/propertyvalue.hxx b/include/comphelper/propertyvalue.hxx index 9d0d94d3256a..de71791100b1 100644 --- a/include/comphelper/propertyvalue.hxx +++ b/include/comphelper/propertyvalue.hxx @@ -33,7 +33,7 @@ css::beans::PropertyValue makePropertyValue(const OUString& rName, T&& rValue) css::beans::PropertyState_DIRECT_VALUE }; } // Allows to pass e.g. bit fields -template <typename T, std::enable_if_t<std::is_arithmetic_v<std::remove_reference_t<T>>, int> = 0> +template <typename T, std::enable_if_t<std::is_arithmetic_v<T>, int> = 0> css::beans::PropertyValue makePropertyValue(const OUString& rName, T aValue) { return makePropertyValue(rName, css::uno::toAny(aValue)); |