Skip to content

Misleading std::string Overload Leads to Undefined Behavior #501

@Mq-b

Description

@Mq-b
std::string sql = "SELECT name FROM sqlite_master WHERE type='table';";

SQLite::Statement query{ db, sql.c_str() }; // OK!
SQLite::Statement query{ db, sql };         // Error!

Extremely misleading, I've wasted a lot of time here, and it's hard for me.

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