Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12896: [Utility] string_view's comparison operators are not marked "constexpr"
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-05-04 01:30:01
#12896: [Utility] string_view's comparison operators are not marked "constexpr"
-------------------------------+-----------------------------------
Reporter: Zheng Luo | Owner: marshall
Type: Bugs | Status: new
Milestone: To Be Determined | Component: utility
Version: Boost 1.63.0 | Severity: Problem
Resolution: | Keywords: string_view,constexpr
-------------------------------+-----------------------------------
Changes (by marshall):
* owner: no-maintainer => marshall
Comment:
All the variations of `basic_string_view::compare` are marked as
constexpr. (well, `BOOST_CXX14_CONSTEXPR`).
But, as you correctly point out, the operators (`< <= == != > > =` are
not.
> However, constexpr compare() in Boost never works in C++14, since it
uses std::char_traits in standard library.
That's not strictly true; merely a default. You are free to use your own
traits class.
I'll fix the operators.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12896#comment:1> 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-05-04 01:34:57 UTC