[Boost-bugs] [Boost C++ Libraries] #12896: [Utility] string_view's comparison operators are not marked "constexpr"

Subject: [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-03-11 05:15:48


#12896: [Utility] string_view's comparison operators are not marked "constexpr"
-----------------------------------+---------------------------
 Reporter: Zheng Luo | Owner: no-maintainer
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: utility
  Version: Boost 1.63.0 | Severity: Problem
 Keywords: string_view,constexpr |
-----------------------------------+---------------------------
 During the implementation of my GSoC static_map competency project, I
 found that in Boost 1.63, string_view's comparison operator was not marked
 as
 constexpr(http://www.boost.org/doc/libs/1_63_0/boost/utility/string_view.hpp).
 According to cppreference, string_view in C++17's standard library
 includes constexpr comparison operators, and actually the implementation
 of Boost's comparison operators calls constexpr compare() method. However,
 constexpr compare() in Boost never works in C++14, since it uses
 std::char_traits in standard library, of which char_traits::compare is not
 marked constexpr until C++17. It seems possible to backport C++17's
 constexpr char_traits into Boost's library.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12896>
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-03-11 05:19:05 UTC