Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12980: compile time character array
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-04-20 16:54:38
#12980: compile time character array
-------------------------------+--------------------------
Reporter: gast128@⦠| Owner: marshall
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: utility
Version: Boost 1.63.0 | Severity: Optimization
Resolution: | Keywords:
-------------------------------+--------------------------
Comment (by gast128@â¦):
The trailing zero is indeed a conceptual problem of how to deal with
character arrays vs string literals. Alternatively could it be solved by
introducing yet another class / macro and overload for that, e.g.
{{{#!cpp
BOOST_DEFINE_STRING_CONST(_T("Hello")); //introduces a class convertible
to string_view
}}}
In our code base we largely use (w)strings. A reason to prefer the
string_view in arguments is to circumvent the superfluous conversion to a
string object when hard code strings are supplied in the arguments.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12980#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-04-20 16:58:10 UTC