Skip to content

pathのoperator string_type()に関する例がおかしい #148

@vyv03354

Description

@vyv03354
    std::basic_ofstream<path::value_type> file( name ) 

basic_ofstreamの型パラメーターはファイル名と関係ないので、型パラメーターにpath::value_typeを渡すのはおかしくないですか?

C++17で型パラメーターとは無関係にconst path&const path::value_type*を引数に取るオーバーロードが追加されたので、普通に

    std::ofstream file( path ) 

    std::ofstream file( name ) 

と書けばいいと思っていたのですが、何か勘違いしているでしょうか。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions