PrevUpHomeNext

esv::end_with_star


Love birds! Don't make the trees feel lonely!

esv::end_with_star concept

esv::end_with_star is a concept used to match a type which has a pointer star symbol at the end.

As some type might be a pointer but does not have a pointer star symbol, esv::end_with_star is used to distinguish them, esv::end_with_star concept guarantees a star symbol must exist at the end.

The following types satisfy concept esv::end_with_star :

const char *
char *
int *
any_type any_qualifiers *

The following types do not satisfy concept esv::end_with_star :

const char * const
char * const
int * const
chat (*)[16]

To match a type which has a star symbol before cv- qualifiers, you can use esv::remove_cvref_t on it, then use concept esv::end_with_star .

esv::end_with_star was designed for esv::str_size, but it can be used for general purpose.

c++ example

#include <esvcpp/core.hpp>

template <esv::end_with_star pointer_type>
class fizz_box
{
};

int main()
{
	fizz_box<const char *> f1;	// OK
	// fizz_box<char (*) [16]> f2;	// error
}

See Also

esv::str_size


PrevUpHomeNext

esv::print