9#ifndef INCLUDED_SVL_TYPEDWHICH_HXX
10#define INCLUDED_SVL_TYPEDWHICH_HXX
30 template <
class derived_type>
32 std::enable_if_t<std::is_base_of_v<T, derived_type>,
int> = 0)
37 constexpr operator sal_uInt16()
const {
return mnWhich; }
45 return sal_uInt16(lhs) == sal_uInt16(rhs);
49 return sal_uInt16(lhs) != sal_uInt16(rhs);
53 return lhs == sal_uInt16(rhs);
57 return lhs != sal_uInt16(rhs);
61 return sal_uInt16(lhs) == rhs;
65 return sal_uInt16(lhs) != rhs;
A very thin wrapper around the sal_uInt16 WhichId whose purpose is mostly to carry type information,...
constexpr TypedWhichId(sal_uInt16 nWhich)
constexpr TypedWhichId(TypedWhichId< derived_type > other, std::enable_if_t< std::is_base_of_v< T, derived_type >, int >=0)
Up-casting conversion constructor.
constexpr bool operator!=(TypedWhichId< T > const &lhs, TypedWhichId< T > rhs)
constexpr bool operator==(TypedWhichId< T > const &lhs, TypedWhichId< T > rhs)