[PATCH] D26830: [libcxx] Add string_view literals

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 18 03:41:14 PST 2016


EricWF added inline comments.


================
Comment at: include/string_view:749
 
+inline namespace literals
+{
----------------
AntonBikineev wrote:
> EricWF wrote:
> > If this is new to C++17 then the new declarations should be guarded by `#if _LIBCPP_VERSION > 14`.
> Eric, I was thinking about it, but the fact that the whole string_view code is not guarded by _LIBCPP_VERSION > 14 (I guess it's because it can be compiled with lower Standards just fine) stopped me from doing that. I'm still not sure though.
Understandable. The decision to backport most of `string_view` was intentional. 

However we shouldn't backport these, since the literal suffix is only supported by the compiler in C++17.


https://reviews.llvm.org/D26830





More information about the cfe-commits mailing list