Skip to content

C++17 std::byte detection fails on ubuntu+clang-6.0 #1992

Description

@gnbond

Describe the bug
Clang6 and clang8 in c++17 mode cannot compile catch unit tests

Expected behavior
C++17 should be supported

Reproduction steps
Ubuntu 16, clang++6.0 (and clang++-8) installed with "apt install clang6.0"
Simple null unit test:

#include "catch.hpp"
TEST_CASE("simple", "[simple]") {
}
$ clang++-6.0 -std=c++17 -c cb.cpp 
In file included from cb.cpp:1:
./catch.hpp:1735:29: error: no member named 'byte' in namespace 'std'
    struct StringMaker<std::byte> {
                       ~~~~~^
1 error generated.

Platform information:

  • OS: ubuntu 16

  • Compiler+version:
    clang version 6.0.0-1ubuntu2~16.04.1 (tags/RELEASE_600/final)
    Target: x86_64-pc-linux-gnu
    Thread model: posix
    InstalledDir: /usr/bin

  • Catch version: v2.13.0 downloaded in the single file version

Additional context
Also happens with clang-8 package.
Compiles fine in clang-6 or clang-8 in c+11 or c++14 mode.

This may be a packaging error in ubuntu, or it might be I have not installed some vital piece, or need to configure clang to use a better standard library or something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions