| Home | Libraries | People | FAQ | More

#### constant_string_view

(EXPERIMENTAL) A string view that should be known at compile-time.

##### Synopsis

Defined in header `<boost/mysql/constant_string_view.hpp>`

    class constant_string_view

##### Member Functions

Name | Description
--- | ---
constant_string_view [constructor] | Consteval constructor.
get | Retrieves the underlying string view.

##### Description

This type is used when a string function argument must always be known at compile-time except in rare cases. See `format_sql` format strings for an example.

##### Object lifetimes

This type holds internally a `string_view`, and follows the same lifetime rules as `string_view`. We recommend to only use this type as a function argument, to provide compile-time checks.