| 170 | |
| 171 | template <typename T> |
| 172 | struct convert_helper { |
| 173 | private: |
| 174 | using Bare = typename std::remove_reference<T>::type; |
| 175 | static constexpr bool IsRef = std::is_reference<T>::value; |
| 176 | static constexpr bool IsConst = std::is_const<typename std::remove_reference<T>::type>::value; |
| 177 | |
| 178 | static_assert(!std::is_rvalue_reference<T>::value, |
| 179 | "convert to rvalue reference (T&&) is not allowed. Use T or T& / const T&."); |
| 180 | |
| 181 | public: |
| 182 | static const Bare &get_val(any &v) |
| 183 | { |
| 184 | return v.const_val<Bare>(); |
| 185 | } |
| 186 | }; |
| 187 | |
| 188 | template <typename T> |
| 189 | struct convert_helper<T &> { |
nothing calls this directly
no outgoing calls
no test coverage detected