NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

string_view and clang



According to

  http://en.cppreference.com/w/cpp/compiler_support

string_view is supported by gcc 7 and clang 4.0. As in NetBSD-current
base we have gcc 6.4.0 and clang 5.0.1, I thought I would try it out:

$ clang -std=c++17 -o foo foo.cpp
foo.cpp:3:10: fatal error: 'string_view' file not found
#include <string_view>
         ^~~~~~~~~~~~~
1 error generated.

Is the page over optimistic, or do I need more flags on my compile line?
(Guessing that /usr/include has the gcc include files...)


Cheers,

Patrick


Home | Main Index | Thread Index | Old Index