Skip to content

Package version changing functionality of string_view #861

@debreczenikalman

Description

@debreczenikalman

Hi!

I have a little problem with this package.

The 3.0.1 -> 3.0.3 update changed the functionality how the DISABLE_STRING_VIEW (option in your CMakeLists.txt at line 38) is handled later on, at line 112. In version 3.0.1, if the setting is ON, it defines HAS_STRING_VIEW=0, otherwise it does not define said macro at all. But in v. 3.0.3, it is defined, no matter what, to either HAS_STRING_VIEW=0 or HAS_STRING_VIEW=1.

To have the issue summarised; the date.h header, at line 35 should automatically decide whether to define HAS_STRING_VIEW to 0 or 1. This automatic check is now unused/obsolete, but our project relied on this check.

My issue is the following: I'm working on a project with my team that uses different versions of C++. The Build 5 uses C++ 14, which has no <string_view> header, but Build 8 uses C++ 17, which has said header.

The problem arises by having that macro defined no matter what. I can't turn the setting to OFF, as it breaks build 5 (it tries to include the header, but there is none), having the setting ON breaks build 8 (it uses the string_view specific functions).

It would be rude from me to edit your date.h header without a pr first, and sadly, I don't have much control over our build system, as other projects use this as well, changing would break the rest of them. I'm right now trying to edit the CMakeListsCustom file, see if I can control the option this way. Fearing the worst, what other recommendations could you give us to fix the problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions