Skip to content

Build fails with C++14 compiler; code uses <string_view> which is a C++17 header #883

Description

@ryandesign

Hi, the readme says tilemaker is written in C++14:

tilemaker is written in C++14. The chief dependencies are:

However on OS X 10.11.6 with Apple Clang 8.0.0 (clang-800.0.42.1), which I've found hasn't implemented all of C++17, the build uses the flag -std=gnu++1z and it includes the <string_view> header, which doesn't exist in this compiler:

https://build.macports.org/builders/ports-10.11_x86_64-builder/builds/315537/steps/install-port/logs/stdio

In file included from /opt/local/var/macports/build/tilemaker-00870ee9/work/tilemaker-3.1.0/server/server.cpp:1:
In file included from /opt/local/var/macports/build/tilemaker-00870ee9/work/tilemaker-3.1.0/server/Simple-Web-Server/server_http.hpp:6:
/opt/local/var/macports/build/tilemaker-00870ee9/work/tilemaker-3.1.0/server/Simple-Web-Server/utility.hpp:26:10: fatal error: 'string_view' file not found
#include <string_view>
         ^

With newer versions of clang that have <string_view, the build uses the flag -std=gnu++17 and it succeeds.

So I wasn't sure if your stated requirement of C++14 should be changed to C++17 or whether you want to make any changes to maintain C++14 compatibility.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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