Iros
 
Loading...
Searching...
No Matches
di::concepts::ConvertibleToNonSlicing Concept Reference

This concept requires that the conversion from From to To would not result in converting a derived type to a base type. More...

#include <di/meta/operations.h>

Concept definition

template<typename From, typename To>
This concept requires that the conversion from From to To would not result in converting a derived ty...
Definition operations.h:108
Definition operations.h:99
Implicit conversion for this test refers to the ability to return a value of function from a type.
Definition operations.h:89
Definition language.h:61
Type< detail::RemovePointerHelper< T > > RemovePointer
Definition language.h:491

Detailed Description

This concept requires that the conversion from From to To would not result in converting a derived type to a base type.

This is useful to prevent slicing when treating pointers as iterators, since an Cat[] can not be viewed the same as an Animal[].