A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue2650 below:

compare(const string& s) wrong argument type

This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of TS status.

2650. [filesys.ts] [PDTS] path::compare(const string& s) wrong argument type

Section: 8 [filesys.ts::class.path] Status: TS Submitter: Stephan T. Lavavej Opened: 2014-02-03 Last modified: 2017-07-30

Priority: Not Prioritized

View all other issues in [filesys.ts::class.path].

View all issues with TS status.

Discussion:

Addresses: filesys.ts

path has "int compare(const string& s) const;" but it should almost certainly take const string_type&, since the third overload takes const value_type*.

[2014-02-08 Daniel comments and provides wording]

This issue is the same as 2643(i) and resolves that issue as well.

[2014-02-13 LWG/SG-3 Issaquah: Proposed wording accepted.]

Proposed resolution:

This wording is relative to SG3 working draft.

  1. Change class path synopsis, 8 [class.path], as indicated:

    // compare
    int compare(const path& p) const noexcept;
    int compare(const string_type& s) const;
    int compare(const value_type* s) const;
    
  2. Change path compare prototype specification, 8.4.8 [path.compare], as indicated:

    int compare(const string_type& s) const;
    

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4