Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2020-11-30 00:36:01

Gavin Lambert wrote:
> > For this specific use, it doesn't need to. It can just match against a
> > StringLike concept, as I said.
> Except that you can't use concepts in a compiled library, only in a
> header-only one. (Or it still requires you to write that concrete type
> conversion.)

Of course you can.

class string_view

    template<class StringLike,
        class E = enable_if_t<is_string_like<StringLike>>
    string_view( StringLike const& sl ): p_( ), n_( sl.size() ) {}

void my_compiled_library( string_view sv );

This is not something theoretical. E.g. Victor Zverovich has independently
come to the same conclusion:

Boost list run by bdawes at, gregod at, cpdaniel at, john at