typename _Require = __detail::_Path2<_InputIterator>,
typename _CharT
= __detail::__value_type_is_char_or_char8_t<_InputIterator>>
+ _GLIBCXX20_DEPRECATED_SUGGEST("path(u8string(first, last))")
inline path
u8path(_InputIterator __first, _InputIterator __last)
{
template<typename _Source,
typename _Require = __detail::_Path<_Source>,
typename _CharT = __detail::__value_type_is_char_or_char8_t<_Source>>
+ _GLIBCXX20_DEPRECATED_SUGGEST("path((const char8_t*)&*source)")
inline path
u8path(const _Source& __source)
{
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++17 } }
+// { dg-additional-options "-Wno-deprecated-declarations" { target c++20 } }
#include <filesystem>
#include <testsuite_hooks.h>
// { dg-options "-fchar8_t -Wno-stringop-overread" }
// { dg-do run { target c++17 } }
+// { dg-additional-options "-Wno-deprecated-declarations" { target c++20 } }
#include <filesystem>
#include <string_view>
--- /dev/null
+// { dg-options "-std=gnu++20" }
+// { dg-do compile { target c++20 } }
+
+#include <filesystem>
+
+namespace fs = std::filesystem;
+
+const char* s = "";
+auto p1 = fs::u8path(s); // { dg-warning "deprecated" }
+auto p2 = fs::u8path(s, s); // { dg-warning "deprecated" }
+
+#if __cpp_lib_char8_t
+const char8_t* u = u8"";
+auto p3 = fs::u8path(u); // { dg-warning "deprecated" }
+auto p4 = fs::u8path(u, u); // { dg-warning "deprecated" }
+#endif
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++17 } }
+// { dg-additional-options "-Wno-deprecated-declarations" { target c++20 } }
#include <filesystem>
#include <string_view>
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++17 } }
+// { dg-additional-options "-Wno-deprecated-declarations" { target c++20 } }
#include <filesystem>
#include <string>