Skip to content

Please don't unconditionally define _CRT_SECURE_NO_WARNINGS #264

@jonesmz

Description

@jonesmz

Here:

#define _CRT_SECURE_NO_WARNINGS // for std::wcscpy

This introduces a warning in any project that defines this macro globally.

Better is to do

#ifndef  _CRT_SECURE_NO_WARNINGS
#define  _CRT_SECURE_NO_WARNINGS
#endif 

so that if it's already defined, it won't be re-defined.

This impacted me when i tried out the boost 1.90 beta.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions