diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-04-14 18:55:01 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-04-14 18:55:01 +0000 |
commit | bde1393a7b0583bc123ac962ed2f729b80cd7498 (patch) | |
tree | d9e8972ddece739bbdc248c5e33919ded2862cf7 /libstdc++-v3 | |
parent | 8f8a206e72c6183084a6792ae98593944dd06fbd (diff) | |
download | gcc-bde1393a7b0583bc123ac962ed2f729b80cd7498.tar.gz |
2016-04-14 Basile Starynkevitch <basile@starynkevitch.net>
{{merging with even more of GCC 6, using subversion 1.9
svn merge -r228401:229500 ^/trunk
}}
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@234985 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
68 files changed, 858 insertions, 333 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 8dcf1bdd2ea..7c88b8f7161 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,156 @@ +2015-10-24 Jonathan Wakely <jwakely@redhat.com> + + * include/std/functional (__invoke_impl): New overloads. + (__invoke): Replace with a single function calling __invoke_impl. + (invoke): Add C++17 std::invoke. + (reference_wrapper::operator()): Qualify call to __invoke. + (_Mem_fn_traits_base, _Mem_fn_traits): Remove unused typedefs. + (_Mem_fn_base): Remove unused typedefs and implement call operator in + terms of __invoke. + * include/std/future (__future_base::_Async_state_commonV2): Do not + pass reference_wrapper as object argument to call_once. + * include/std/type_traits (result_of): Define nested __invoke_type. + Handle reference_wrapper as per LWG 2219. + * testsuite/20_util/bind/ref_neg.cc: Adjust dg-error directives. + * testsuite/20_util/function_objects/mem_fn/55463.cc: Remove tests + using member functions of reference_wrapper. + +2015-10-24 Jonathan Wakely <jwakely@redhat.com> + + * include/std/future (async): Use deferred function on exception. + * testsuite/30_threads/async/except.cc: New. + +2015-10-21 Jonathan Wakely <jwakely@redhat.com> + + * include/std/type_traits (__cpp_lib_bool_constant): Define. + +2015-10-16 Jonathan Wakely <jwakely@redhat.com> + + * doc/xml/manual/configure.xml: Document + --enable-libstdcxx-filesystem-ts option. + * doc/xml/manual/status_cxx2014.xml: Document libstdc++fs.a. + * doc/xml/manual/using.xml: Likewise. + * doc/html/*: Regenerate. + +2015-10-16 Aurelio Remonda <aurelio.remonda@tallertechnologies.com> + + * testsuite/25_algorithms/random_shuffle/moveable.cc: Change variable + N from const int N = 200000 to const unsigned int N = 10000. + Delete useless fill_ascending function call. + +2015-10-15 Szabolcs Nagy <szabolcs.nagy@arm.com> + + * testsuite/lib/libstdc++.exp (libstdc++-dg-test): Check for + unsupported compiler output. + +2015-10-13 Nathan Froyd <froydnj@gcc.gnu.org> + + * config/cpu/i486/opt/bits/opt_random.h: Include pmmintrin.h instead + of x86intrin.h, and only do so when __SSE3__ + * include/ext/random: Include emmintrin.h instead of x86intrin.h + +2015-10-11 Joseph Myers <joseph@codesourcery.com> + + * crossconfig.m4 (GLIBCXX_CROSSCONFIG) <*-linux* | *-uclinux* | + *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu | *-cygwin*>: Check for + __cxa_thread_atexit_impl. + * configure: Regenerate. + +2015-10-09 Jonathan Wakely <jwakely@redhat.com> + + * include/experimental/erase_if.h: Move to ... + * include/experimental/bits/erase_if.h: New. + * include/experimental/fs_dir.h: Move to ... + * include/experimental/bits/fs_dir.h: New. + * include/experimental/fs_fwd.h: Move to ... + * include/experimental/bits/fs_fwd.h: New. + * include/experimental/fs_ops.h: Move to ... + * include/experimental/bits/fs_ops.h: New. + * include/experimental/fs_path.h: Move to ... + * include/experimental/bits/fs_path.h: New. + * include/experimental/string_view.tcc: Move to ... + * include/experimental/bits/string_view.tcc: New. + * include/Makefile.am: Add include/experimental/bits sub-directory. + * include/Makefile.in: Regenerate. + * include/experimental/filesystem: Adjust includes. + * include/experimental/map: Likewise. + * include/experimental/set: Likewise. + * include/experimental/string_view: Likewise. + * include/experimental/unordered_map: Likewise. + * include/experimental/unordered_set: Likewise. + +2015-10-05 Ville Voutilainen <ville.voutilainen@gmail.com> + + PR 67844. + * include/std/tuple (_TC::_NonNestedTuple): Eagerly reject + conversions from tuple types same as the target tuple. + * testsuite/20_util/tuple/67844.cc: New. + * testsuite/20_util/tuple/cons/nested_tuple_construct.cc: Add + a missing copyright header. + +2015-10-03 Jonathan Wakely <jwakely@redhat.com> + + * python/libstdcxx/v6/printers.py (StdExpAnyPrinter): Remove support + for _Manager_alloc. + + * src/c++98/locale.cc: Fix comment. + * src/c++98/locale_init.cc: Likewise. + + * testsuite/21_strings/basic_string/literals/types.cc: Guard use of + wchar_t with _GLIBCXX_USE_WCHAR_T. + * testsuite/21_strings/basic_string/literals/values.cc: Likewise. + * testsuite/21_strings/basic_string/requirements/citerators.cc: + Likewise. + * testsuite/22_locale/messages/13631.cc: Likewise. + * testsuite/experimental/string_view/literals/types.cc: Likewise. + * testsuite/experimental/string_view/literals/values.cc: Likewise. + + * src/filesystem/Makefile.am: Add cxx11_abi_sources. + * src/filesystem/Makefile.in: Regenerate. + * src/filesystem/cow-dir.cc: New. + * src/filesystem/cow-ops.cc: New. + * src/filesystem/cow-path.cc: New. + * src/filesystem/dir.cc: Define macro for new ABI. + * src/filesystem/ops.cc: Likewise. + * src/filesystem/path.cc: Likewise. + +2015-10-02 Jonathan Wakely <jwakely@redhat.com> + + * testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc: + Minor tweaks to match narrow char version. + + * testsuite/21_strings/basic_string/allocator/char/minimal.cc: Guard + explicit instantiation with check for new ABI. + * testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc: + Likewise. Use wchar_t as char_type. + + * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI] + (basic_string::front() const, basic_string::back() const): Use + noexcept instead of _GLIBCXX_NOEXCEPT macro. + (__versa_string::front, __versa_string::back): Likewise. + + * acinclude.m4 (GLIBCXX_ENABLE_DEBUG_FLAGS): Fix comment. + + * include/bits/locale_conv.h [!_GLIBCXX_USE_WCHAR_T] + (__do_str_codecvt, __str_codecvt_in, __str_codecvt_out): Enable. + * include/experimental/fs_path.h [!_GLIBCXX_USE_WCHAR_T] + (path::wstring, path::generic_wstring): Disable. + * src/filesystem/path.cc (path::_S_convert_loc) + [!_GLIBCXX_USE_WCHAR_T]: Skip conversion. + * testsuite/experimental/filesystem/path/assign/assign.cc: Check for + wchar_t support. + * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise. + * testsuite/experimental/filesystem/path/construct/range.cc: Likewise. + + * testsuite/util/testsuite_fs.h (nonexistent_path): Use less generic + name for paths. Prefer snprintf to sprintf. + + PR libstdc++/67747 + * src/filesystem/dir.cc (native_readdir): Remove. + (_Dir::advance): Use readdir instead of native_readdir. + (recursive_directory_iterator(const path&, directory_options, + error_code*)): Use swap instead of reset. + 2015-10-01 Jonathan Wakely <jwakely@redhat.com> * doc/html/manual/errno.html: Add new file. diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 4b031f7117f..abf2e93afd4 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -2518,7 +2518,7 @@ dnl Check for explicit debug flags. dnl dnl --enable-libstdcxx-debug-flags='-O1' dnl is a general method for passing flags to be used when -dnl building debug libraries with --enable-debug. +dnl building debug libraries with --enable-libstdcxx-debug. dnl dnl --disable-libstdcxx-debug-flags does nothing. dnl + Usage: GLIBCXX_ENABLE_DEBUG_FLAGS(default flags) diff --git a/libstdc++-v3/config/cpu/i486/opt/bits/opt_random.h b/libstdc++-v3/config/cpu/i486/opt/bits/opt_random.h index 4495569ab26..a9f6c1355e7 100644 --- a/libstdc++-v3/config/cpu/i486/opt/bits/opt_random.h +++ b/libstdc++-v3/config/cpu/i486/opt/bits/opt_random.h @@ -30,7 +30,9 @@ #ifndef _BITS_OPT_RANDOM_H #define _BITS_OPT_RANDOM_H 1 -#include <x86intrin.h> +#ifdef __SSE3__ +#include <pmmintrin.h> +#endif #pragma GCC system_header diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 73d45b1a680..1eb6db4ec4c 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -58893,6 +58893,17 @@ $as_echo "$gcc_cv_have_tls" >&6; } $as_echo "#define HAVE_TLS 1" >>confdefs.h fi + for ac_func in __cxa_thread_atexit_impl +do : + ac_fn_c_check_func "$LINENO" "__cxa_thread_atexit_impl" "ac_cv_func___cxa_thread_atexit_impl" +if test "x$ac_cv_func___cxa_thread_atexit_impl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE___CXA_THREAD_ATEXIT_IMPL 1 +_ACEOF + +fi +done + diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4 index 10247f940b5..ece12567794 100644 --- a/libstdc++-v3/crossconfig.m4 +++ b/libstdc++-v3/crossconfig.m4 @@ -156,6 +156,7 @@ case "${host}" in GLIBCXX_CHECK_STDLIB_SUPPORT AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1) GCC_CHECK_TLS + AC_CHECK_FUNCS(__cxa_thread_atexit_impl) AM_ICONV ;; *-mingw32*) diff --git a/libstdc++-v3/doc/html/manual/configure.html b/libstdc++-v3/doc/html/manual/configure.html index 565d75e3e25..a54582d7a79 100644 --- a/libstdc++-v3/doc/html/manual/configure.html +++ b/libstdc++-v3/doc/html/manual/configure.html @@ -245,4 +245,8 @@ <code class="classname">iostream</code>, and others. Disabling means that the C++ runtime is compiled without support for vtable verification. By default, this option is off. - </p></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="setup.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="setup.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="make.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Setup </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Make</td></tr></table></div></body></html>
\ No newline at end of file + </p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-filesystem-ts</code>[default]</span></dt><dd><p>Build <code class="filename">libstdc++fs.a</code> as well + as the usual libstdc++ and libsupc++ libraries. This is enabled by + default on select POSIX targets where it is known to work and disabled + otherwise. + </p></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="setup.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="setup.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="make.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Setup </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Make</td></tr></table></div></body></html>
\ No newline at end of file diff --git a/libstdc++-v3/doc/html/manual/index.html b/libstdc++-v3/doc/html/manual/index.html index fbe657ef9dc..091e40d0cf8 100644 --- a/libstdc++-v3/doc/html/manual/index.html +++ b/libstdc++-v3/doc/html/manual/index.html @@ -4,7 +4,7 @@ </p></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="part"><a href="intro.html">I. Introduction -</a></span></dt><dd><dl><dt><span class="chapter"><a href="status.html">1. Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.1998.status">Implementation Status</a></span></dt><dt><span class="section"><a href="status.html#iso.1998.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.2011">C++ 2011</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.2011.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.2014">C++ 2014</a></span></dt><dt><span class="section"><a href="status.html#status.iso.201z">C++ 201z</a></span></dt><dt><span class="section"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.tr1.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="section"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="section"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="section"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="section"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="section"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="configure.html">Configure</a></span></dt><dt><span class="section"><a href="make.html">Make</a></span></dt></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="section"><a href="using.html#manual.intro.using.flags">Command Options</a></span></dt><dt><span class="section"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="section"><a href="using_macros.html">Macros</a></span></dt><dt><span class="section"><a href="using_dual_abi.html">Dual ABI</a></span></dt><dd><dl><dt><span class="section"><a href="using_dual_abi.html#manual.intro.using.abi.trouble">Troubleshooting</a></span></dt></dl></dd><dt><span class="section"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="section"><a href="using_dynamic_or_shared.html">Linking</a></span></dt><dd><dl><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.freestanding">Almost Nothing</a></span></dt><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic">Finding Dynamic or Shared Libraries</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#concurrency.io.structure">Structure</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.defaults">Defaults</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.future">Future</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.alt">Alternatives</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="section"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.propagating">Exception Neutrality</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.no">Doing without</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.compat">Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.c">With <code class="literal">C</code></a></span></dt><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.posix">With <code class="literal">POSIX</code> thread cancellation</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="section"><a href="debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="section"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.races">Data Race Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="section"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="section"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="section"><a href="debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="std_contents.html">II. +</a></span></dt><dd><dl><dt><span class="chapter"><a href="status.html">1. Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.1998.status">Implementation Status</a></span></dt><dt><span class="section"><a href="status.html#iso.1998.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.2011">C++ 2011</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.2011.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.2014">C++ 2014</a></span></dt><dt><span class="section"><a href="status.html#status.iso.201z">C++ 201z</a></span></dt><dt><span class="section"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.tr1.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="section"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="section"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="section"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="section"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="section"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="configure.html">Configure</a></span></dt><dt><span class="section"><a href="make.html">Make</a></span></dt></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="section"><a href="using.html#manual.intro.using.flags">Command Options</a></span></dt><dt><span class="section"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="section"><a href="using_macros.html">Macros</a></span></dt><dt><span class="section"><a href="using_dual_abi.html">Dual ABI</a></span></dt><dd><dl><dt><span class="section"><a href="using_dual_abi.html#manual.intro.using.abi.trouble">Troubleshooting</a></span></dt></dl></dd><dt><span class="section"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="section"><a href="using_dynamic_or_shared.html">Linking</a></span></dt><dd><dl><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.freestanding">Almost Nothing</a></span></dt><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic">Finding Dynamic or Shared Libraries</a></span></dt><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.experimental">Experimental Library Extensions</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#concurrency.io.structure">Structure</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.defaults">Defaults</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.future">Future</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.alt">Alternatives</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="section"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.propagating">Exception Neutrality</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.no">Doing without</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.compat">Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.c">With <code class="literal">C</code></a></span></dt><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.posix">With <code class="literal">POSIX</code> thread cancellation</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="section"><a href="debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="section"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.races">Data Race Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="section"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="section"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="section"><a href="debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="std_contents.html">II. Standard Contents </a></span></dt><dd><dl><dt><span class="chapter"><a href="support.html">4. Support diff --git a/libstdc++-v3/doc/html/manual/intro.html b/libstdc++-v3/doc/html/manual/intro.html index a98c0d26d67..55ace72f0f3 100644 --- a/libstdc++-v3/doc/html/manual/intro.html +++ b/libstdc++-v3/doc/html/manual/intro.html @@ -5,4 +5,4 @@ </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library Manual</th><td width="20%" align="right"> <a accesskey="n" href="status.html">Next</a></td></tr></table><hr /></div><div class="part"><div class="titlepage"><div><div><h1 class="title"><a id="manual.intro"></a>Part I. Introduction <a id="id-1.3.3.1.1.1" class="indexterm"></a> -</h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="chapter"><a href="status.html">1. Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.1998.status">Implementation Status</a></span></dt><dt><span class="section"><a href="status.html#iso.1998.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.2011">C++ 2011</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.2011.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.2014">C++ 2014</a></span></dt><dt><span class="section"><a href="status.html#status.iso.201z">C++ 201z</a></span></dt><dt><span class="section"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.tr1.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="section"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="section"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="section"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="section"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="section"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="configure.html">Configure</a></span></dt><dt><span class="section"><a href="make.html">Make</a></span></dt></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="section"><a href="using.html#manual.intro.using.flags">Command Options</a></span></dt><dt><span class="section"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="section"><a href="using_macros.html">Macros</a></span></dt><dt><span class="section"><a href="using_dual_abi.html">Dual ABI</a></span></dt><dd><dl><dt><span class="section"><a href="using_dual_abi.html#manual.intro.using.abi.trouble">Troubleshooting</a></span></dt></dl></dd><dt><span class="section"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="section"><a href="using_dynamic_or_shared.html">Linking</a></span></dt><dd><dl><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.freestanding">Almost Nothing</a></span></dt><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic">Finding Dynamic or Shared Libraries</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#concurrency.io.structure">Structure</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.defaults">Defaults</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.future">Future</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.alt">Alternatives</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="section"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.propagating">Exception Neutrality</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.no">Doing without</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.compat">Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.c">With <code class="literal">C</code></a></span></dt><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.posix">With <code class="literal">POSIX</code> thread cancellation</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="section"><a href="debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="section"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.races">Data Race Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="section"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="section"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="section"><a href="debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="status.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library Manual </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 1. Status</td></tr></table></div></body></html>
\ No newline at end of file +</h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="chapter"><a href="status.html">1. Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.1998.status">Implementation Status</a></span></dt><dt><span class="section"><a href="status.html#iso.1998.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.2011">C++ 2011</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.2011.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.2014">C++ 2014</a></span></dt><dt><span class="section"><a href="status.html#status.iso.201z">C++ 201z</a></span></dt><dt><span class="section"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.tr1.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="section"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="section"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="section"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="section"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="section"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="configure.html">Configure</a></span></dt><dt><span class="section"><a href="make.html">Make</a></span></dt></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="section"><a href="using.html#manual.intro.using.flags">Command Options</a></span></dt><dt><span class="section"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="section"><a href="using_macros.html">Macros</a></span></dt><dt><span class="section"><a href="using_dual_abi.html">Dual ABI</a></span></dt><dd><dl><dt><span class="section"><a href="using_dual_abi.html#manual.intro.using.abi.trouble">Troubleshooting</a></span></dt></dl></dd><dt><span class="section"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="section"><a href="using_dynamic_or_shared.html">Linking</a></span></dt><dd><dl><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.freestanding">Almost Nothing</a></span></dt><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic">Finding Dynamic or Shared Libraries</a></span></dt><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.experimental">Experimental Library Extensions</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#concurrency.io.structure">Structure</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.defaults">Defaults</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.future">Future</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.alt">Alternatives</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="section"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.propagating">Exception Neutrality</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.no">Doing without</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.compat">Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.c">With <code class="literal">C</code></a></span></dt><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.posix">With <code class="literal">POSIX</code> thread cancellation</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="section"><a href="debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="section"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.races">Data Race Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="section"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="section"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="section"><a href="debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="status.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library Manual </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 1. Status</td></tr></table></div></body></html>
\ No newline at end of file diff --git a/libstdc++-v3/doc/html/manual/status.html b/libstdc++-v3/doc/html/manual/status.html index 9052ce64a0c..cdbc8b94f2f 100644 --- a/libstdc++-v3/doc/html/manual/status.html +++ b/libstdc++-v3/doc/html/manual/status.html @@ -457,7 +457,11 @@ not in any particular release. <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf" target="_top"> N4100 </a> - </td><td align="left">File System</td><td align="left">Y</td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.201z"></a>C++ 201z</h3></div></div></div><p> + </td><td align="left">File System</td><td align="left">Y</td><td align="left"> + Link with + <a class="link" href="using_dynamic_or_shared.html#manual.intro.using.linkage.experimental" title="Experimental Library Extensions"> + <code class="option">-lstdc++fs</code></a> + </td></tr></tbody></table></div></div><br class="table-break" /></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.201z"></a>C++ 201z</h3></div></div></div><p> In this implementation the <code class="literal">-std=gnu++1z</code> or <code class="literal">-std=c++1z</code> flag must be used to enable language and library diff --git a/libstdc++-v3/doc/html/manual/using.html b/libstdc++-v3/doc/html/manual/using.html index 5888002028a..e9ed21fe872 100644 --- a/libstdc++-v3/doc/html/manual/using.html +++ b/libstdc++-v3/doc/html/manual/using.html @@ -2,7 +2,7 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 3. Using</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.78.1" /><meta name="keywords" content="ISO C++, library" /><meta name="keywords" content="ISO C++, runtime, library" /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="intro.html" title="Part I. Introduction" /><link rel="prev" href="make.html" title="Make" /><link rel="next" href="using_headers.html" title="Headers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 3. Using</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="make.html">Prev</a> </td><th width="60%" align="center">Part I. Introduction -</th><td width="20%" align="right"> <a accesskey="n" href="using_headers.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.using"></a>Chapter 3. Using</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="using.html#manual.intro.using.flags">Command Options</a></span></dt><dt><span class="section"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="section"><a href="using_macros.html">Macros</a></span></dt><dt><span class="section"><a href="using_dual_abi.html">Dual ABI</a></span></dt><dd><dl><dt><span class="section"><a href="using_dual_abi.html#manual.intro.using.abi.trouble">Troubleshooting</a></span></dt></dl></dd><dt><span class="section"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="section"><a href="using_dynamic_or_shared.html">Linking</a></span></dt><dd><dl><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.freestanding">Almost Nothing</a></span></dt><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic">Finding Dynamic or Shared Libraries</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#concurrency.io.structure">Structure</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.defaults">Defaults</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.future">Future</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.alt">Alternatives</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="section"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.propagating">Exception Neutrality</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.no">Doing without</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.compat">Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.c">With <code class="literal">C</code></a></span></dt><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.posix">With <code class="literal">POSIX</code> thread cancellation</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="section"><a href="debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="section"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.races">Data Race Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="section"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="section"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="section"><a href="debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.flags"></a>Command Options</h2></div></div></div><p> +</th><td width="20%" align="right"> <a accesskey="n" href="using_headers.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.using"></a>Chapter 3. Using</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="using.html#manual.intro.using.flags">Command Options</a></span></dt><dt><span class="section"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="section"><a href="using_macros.html">Macros</a></span></dt><dt><span class="section"><a href="using_dual_abi.html">Dual ABI</a></span></dt><dd><dl><dt><span class="section"><a href="using_dual_abi.html#manual.intro.using.abi.trouble">Troubleshooting</a></span></dt></dl></dd><dt><span class="section"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="section"><a href="using_dynamic_or_shared.html">Linking</a></span></dt><dd><dl><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.freestanding">Almost Nothing</a></span></dt><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic">Finding Dynamic or Shared Libraries</a></span></dt><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.experimental">Experimental Library Extensions</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#concurrency.io.structure">Structure</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.defaults">Defaults</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.future">Future</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.alt">Alternatives</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="section"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.propagating">Exception Neutrality</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.no">Doing without</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.compat">Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.c">With <code class="literal">C</code></a></span></dt><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.posix">With <code class="literal">POSIX</code> thread cancellation</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="section"><a href="debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="section"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.races">Data Race Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="section"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="section"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="section"><a href="debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.flags"></a>Command Options</h2></div></div></div><p> The set of features available in the GNU C++ library is shaped by several <a class="link" href="http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Invoking-GCC.html" target="_top">GCC Command Options</a>. Options that impact libstdc++ are @@ -23,4 +23,7 @@ </td></tr><tr><td align="left"><code class="literal">-latomic</code></td><td align="left">Linking to <code class="filename">libatomic</code> is required for some uses of ISO C++11 <code class="filename"><atomic></code>. + </td></tr><tr><td align="left"><code class="literal">-lstdc++fs</code></td><td align="left">Linking to <code class="filename">libstdc++fs</code> + is required for use of the Filesystem library extensions in + <code class="filename"><experimental/filesystem></code>. </td></tr><tr><td align="left"><code class="literal">-fopenmp</code></td><td align="left">For <a class="link" href="parallel_mode.html" title="Chapter 18. Parallel Mode">parallel</a> mode.</td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="make.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="intro.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="using_headers.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Make </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Headers</td></tr></table></div></body></html>
\ No newline at end of file diff --git a/libstdc++-v3/doc/html/manual/using_dynamic_or_shared.html b/libstdc++-v3/doc/html/manual/using_dynamic_or_shared.html index ac46c7e19f6..8defacd1e3b 100644 --- a/libstdc++-v3/doc/html/manual/using_dynamic_or_shared.html +++ b/libstdc++-v3/doc/html/manual/using_dynamic_or_shared.html @@ -102,4 +102,21 @@ A quick read of the relevant part of the GCC also installed, for use with Libtool. If you use Libtool to create your executables, these details are taken care of for you. + </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.linkage.experimental"></a>Experimental Library Extensions</h3></div></div></div><p> + GCC 5.3 includes an implementation of the Filesystem library defined + by the technical specification ISO/IEC TS 18822:2015. Because this is + an experimental library extension, not part of the C++ standard, it + is implemented in a separate library, + <code class="filename">libstdc++fs.a</code>, and there is + no shared library for it. To use the library you should include + <code class="filename"><experimental/filesystem></code> + and link with <code class="option">-lstdc++fs</code>. The library implementation + is incomplete on non-POSIX platforms, specifically Windows support is + rudimentary. + </p><p> + Due to the experimental nature of the Filesystem library the usual + guarantees about ABI stability and backwards compatibility do not apply + to it. There is no guarantee that the components in any + <code class="filename"><experimental/xxx></code> + header will remain compatible between different GCC releases. </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="using_namespaces.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="using.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="using_concurrency.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Namespaces </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Concurrency</td></tr></table></div></body></html>
\ No newline at end of file diff --git a/libstdc++-v3/doc/xml/manual/configure.xml b/libstdc++-v3/doc/xml/manual/configure.xml index 2f558d2b7d7..ac383cf7fa7 100644 --- a/libstdc++-v3/doc/xml/manual/configure.xml +++ b/libstdc++-v3/doc/xml/manual/configure.xml @@ -411,6 +411,15 @@ </para> </listitem></varlistentry> + <varlistentry><term><code>--enable-libstdcxx-filesystem-ts</code>[default]</term> + <listitem> + <para>Build <filename class="libraryfile">libstdc++fs.a</filename> as well + as the usual libstdc++ and libsupc++ libraries. This is enabled by + default on select POSIX targets where it is known to work and disabled + otherwise. + </para> + </listitem></varlistentry> + </variablelist> </section> diff --git a/libstdc++-v3/doc/xml/manual/status_cxx2014.xml b/libstdc++-v3/doc/xml/manual/status_cxx2014.xml index d022ea41227..6f1fbe5664a 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxx2014.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxx2014.xml @@ -402,7 +402,11 @@ not in any particular release. </entry> <entry>File System</entry> <entry>Y</entry> - <entry></entry> + <entry> + Link with + <link linkend="manual.intro.using.linkage.experimental"> + <option>-lstdc++fs</option></link> + </entry> </row> diff --git a/libstdc++-v3/doc/xml/manual/using.xml b/libstdc++-v3/doc/xml/manual/using.xml index 2c8d179b489..96ae6861400 100644 --- a/libstdc++-v3/doc/xml/manual/using.xml +++ b/libstdc++-v3/doc/xml/manual/using.xml @@ -96,6 +96,14 @@ </row> <row> + <entry><literal>-lstdc++fs</literal></entry> + <entry>Linking to <filename class="libraryfile">libstdc++fs</filename> + is required for use of the Filesystem library extensions in + <filename class="headerfile"><experimental/filesystem></filename>. + </entry> + </row> + + <row> <entry><literal>-fopenmp</literal></entry> <entry>For <link linkend="manual.ext.parallel_mode">parallel</link> mode.</entry> </row> @@ -1361,8 +1369,31 @@ A quick read of the relevant part of the GCC you. </para> </section> - </section> + <section xml:id="manual.intro.using.linkage.experimental" xreflabel="Library Extensions"><info><title>Experimental Library Extensions</title></info> + + <para> + GCC 5.3 includes an implementation of the Filesystem library defined + by the technical specification ISO/IEC TS 18822:2015. Because this is + an experimental library extension, not part of the C++ standard, it + is implemented in a separate library, + <filename class="libraryfile">libstdc++fs.a</filename>, and there is + no shared library for it. To use the library you should include + <filename class="headerfile"><experimental/filesystem></filename> + and link with <option>-lstdc++fs</option>. The library implementation + is incomplete on non-POSIX platforms, specifically Windows support is + rudimentary. + </para> + + <para> + Due to the experimental nature of the Filesystem library the usual + guarantees about ABI stability and backwards compatibility do not apply + to it. There is no guarantee that the components in any + <filename class="headerfile"><experimental/xxx></filename> + header will remain compatible between different GCC releases. + </para> + </section> + </section> <section xml:id="manual.intro.using.concurrency" xreflabel="Concurrency"><info><title>Concurrency</title></info> <?dbhtml filename="using_concurrency.html"?> diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am index 74100f29925..2dc0d01241a 100644 --- a/libstdc++-v3/include/Makefile.am +++ b/libstdc++-v3/include/Makefile.am @@ -650,7 +650,6 @@ experimental_headers = \ ${experimental_srcdir}/array \ ${experimental_srcdir}/chrono \ ${experimental_srcdir}/deque \ - ${experimental_srcdir}/erase_if.h \ ${experimental_srcdir}/forward_list \ ${experimental_srcdir}/functional \ ${experimental_srcdir}/iterator \ @@ -664,7 +663,6 @@ experimental_headers = \ ${experimental_srcdir}/set \ ${experimental_srcdir}/string \ ${experimental_srcdir}/string_view \ - ${experimental_srcdir}/string_view.tcc \ ${experimental_srcdir}/system_error \ ${experimental_srcdir}/tuple \ ${experimental_srcdir}/type_traits \ @@ -673,15 +671,24 @@ experimental_headers = \ ${experimental_srcdir}/vector \ ${experimental_filesystem_headers} +experimental_bits_srcdir = ${glibcxx_srcdir}/include/experimental/bits +experimental_bits_builddir = ./experimental/bits +experimental_bits_headers = \ + ${experimental_bits_srcdir}/erase_if.h \ + ${experimental_bits_srcdir}/string_view.tcc \ + ${experimental_bits_filesystem_headers} + if ENABLE_FILESYSTEM_TS experimental_filesystem_headers = \ - ${experimental_srcdir}/filesystem \ - ${experimental_srcdir}/fs_dir.h \ - ${experimental_srcdir}/fs_fwd.h \ - ${experimental_srcdir}/fs_ops.h \ - ${experimental_srcdir}/fs_path.h + ${experimental_srcdir}/filesystem +experimental_bits_filesystem_headers = \ + ${experimental_bits_srcdir}/fs_dir.h \ + ${experimental_bits_srcdir}/fs_fwd.h \ + ${experimental_bits_srcdir}/fs_ops.h \ + ${experimental_bits_srcdir}/fs_path.h else experimental_filesystem_headers = +experimental_bits_filesystem_headers = endif # This is the common subset of C++ files that all three "C" header models use. @@ -968,8 +975,8 @@ endif allstamped = \ stamp-std stamp-bits stamp-bits-sup stamp-c_base stamp-c_compatibility \ stamp-backward stamp-ext stamp-pb stamp-tr1 stamp-tr2 stamp-decimal \ - stamp-experimental stamp-debug stamp-parallel stamp-profile \ - stamp-profile-impl stamp-host + stamp-experimental stamp-experimental-bits stamp-debug stamp-parallel \ + stamp-profile stamp-profile-impl stamp-host # List of all files that are created by explicit building, editing, or # catenation. @@ -1097,6 +1104,11 @@ stamp-experimental: ${experimental_headers} @-cd ${experimental_builddir} && $(LN_S) $? . 2>/dev/null @$(STAMP) stamp-experimental +stamp-experimental-bits: ${experimental_bits_headers} + @-mkdir -p ${experimental_bits_builddir} + @-cd ${experimental_bits_builddir} && $(LN_S) $? . 2>/dev/null + @$(STAMP) stamp-experimental-bits + stamp-debug: ${debug_headers} @-mkdir -p ${debug_builddir} @-cd ${debug_builddir} && $(LN_S) $? . 2>/dev/null @@ -1369,6 +1381,9 @@ install-headers: $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${experimental_builddir} for file in ${experimental_headers}; do \ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${experimental_builddir}; done + $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${experimental_bits_builddir} + for file in ${experimental_bits_headers}; do \ + $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${experimental_bits_builddir}; done $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir} for file in ${c_base_headers}; do \ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${c_base_builddir}; done @@ -1415,9 +1430,11 @@ clean-local: # be made.) .PRECIOUS: $(std_headers) $(c_base_headers) $(tr1_headers) $(tr2_headers) $(decimal_headers) $(ext_headers) $(experimental_headers) + $(experimental_bits_headers) $(std_headers): ; @: $(c_base_headers): ; @: $(tr1_headers): ; @: $(decimal_headers): ; @: $(ext_headers): ; @: $(experimental_headers): ; @: +$(experimental_bits_headers): ; @: diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index b72df264531..d545484a568 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -939,7 +939,6 @@ experimental_headers = \ ${experimental_srcdir}/array \ ${experimental_srcdir}/chrono \ ${experimental_srcdir}/deque \ - ${experimental_srcdir}/erase_if.h \ ${experimental_srcdir}/forward_list \ ${experimental_srcdir}/functional \ ${experimental_srcdir}/iterator \ @@ -953,7 +952,6 @@ experimental_headers = \ ${experimental_srcdir}/set \ ${experimental_srcdir}/string \ ${experimental_srcdir}/string_view \ - ${experimental_srcdir}/string_view.tcc \ ${experimental_srcdir}/system_error \ ${experimental_srcdir}/tuple \ ${experimental_srcdir}/type_traits \ @@ -962,13 +960,23 @@ experimental_headers = \ ${experimental_srcdir}/vector \ ${experimental_filesystem_headers} +experimental_bits_srcdir = ${glibcxx_srcdir}/include/experimental/bits +experimental_bits_builddir = ./experimental/bits +experimental_bits_headers = \ + ${experimental_bits_srcdir}/erase_if.h \ + ${experimental_bits_srcdir}/string_view.tcc \ + ${experimental_bits_filesystem_headers} + @ENABLE_FILESYSTEM_TS_FALSE@experimental_filesystem_headers = @ENABLE_FILESYSTEM_TS_TRUE@experimental_filesystem_headers = \ -@ENABLE_FILESYSTEM_TS_TRUE@ ${experimental_srcdir}/filesystem \ -@ENABLE_FILESYSTEM_TS_TRUE@ ${experimental_srcdir}/fs_dir.h \ -@ENABLE_FILESYSTEM_TS_TRUE@ ${experimental_srcdir}/fs_fwd.h \ -@ENABLE_FILESYSTEM_TS_TRUE@ ${experimental_srcdir}/fs_ops.h \ -@ENABLE_FILESYSTEM_TS_TRUE@ ${experimental_srcdir}/fs_path.h +@ENABLE_FILESYSTEM_TS_TRUE@ ${experimental_srcdir}/filesystem + +@ENABLE_FILESYSTEM_TS_FALSE@experimental_bits_filesystem_headers = +@ENABLE_FILESYSTEM_TS_TRUE@experimental_bits_filesystem_headers = \ +@ENABLE_FILESYSTEM_TS_TRUE@ ${experimental_bits_srcdir}/fs_dir.h \ +@ENABLE_FILESYSTEM_TS_TRUE@ ${experimental_bits_srcdir}/fs_fwd.h \ +@ENABLE_FILESYSTEM_TS_TRUE@ ${experimental_bits_srcdir}/fs_ops.h \ +@ENABLE_FILESYSTEM_TS_TRUE@ ${experimental_bits_srcdir}/fs_path.h # This is the common subset of C++ files that all three "C" header models use. @@ -1245,8 +1253,8 @@ PCHFLAGS = -x c++-header -nostdinc++ $(CXXFLAGS) $(VTV_PCH_CXXFLAGS) allstamped = \ stamp-std stamp-bits stamp-bits-sup stamp-c_base stamp-c_compatibility \ stamp-backward stamp-ext stamp-pb stamp-tr1 stamp-tr2 stamp-decimal \ - stamp-experimental stamp-debug stamp-parallel stamp-profile \ - stamp-profile-impl stamp-host + stamp-experimental stamp-experimental-bits stamp-debug stamp-parallel \ + stamp-profile stamp-profile-impl stamp-host # List of all files that are created by explicit building, editing, or @@ -1542,6 +1550,11 @@ stamp-experimental: ${experimental_headers} @-cd ${experimental_builddir} && $(LN_S) $? . 2>/dev/null @$(STAMP) stamp-experimental +stamp-experimental-bits: ${experimental_bits_headers} + @-mkdir -p ${experimental_bits_builddir} + @-cd ${experimental_bits_builddir} && $(LN_S) $? . 2>/dev/null + @$(STAMP) stamp-experimental-bits + stamp-debug: ${debug_headers} @-mkdir -p ${debug_builddir} @-cd ${debug_builddir} && $(LN_S) $? . 2>/dev/null @@ -1793,6 +1806,9 @@ install-headers: $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${experimental_builddir} for file in ${experimental_headers}; do \ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${experimental_builddir}; done + $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${experimental_bits_builddir} + for file in ${experimental_bits_headers}; do \ + $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${experimental_bits_builddir}; done $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir} for file in ${c_base_headers}; do \ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${c_base_builddir}; done @@ -1836,12 +1852,14 @@ clean-local: # be made.) .PRECIOUS: $(std_headers) $(c_base_headers) $(tr1_headers) $(tr2_headers) $(decimal_headers) $(ext_headers) $(experimental_headers) + $(experimental_bits_headers) $(std_headers): ; @: $(c_base_headers): ; @: $(tr1_headers): ; @: $(decimal_headers): ; @: $(ext_headers): ; @: $(experimental_headers): ; @: +$(experimental_bits_headers): ; @: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index c1689af0e70..35246d945aa 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -3441,7 +3441,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 * element of the %string. */ const_reference - front() const _GLIBCXX_NOEXCEPT + front() const noexcept { __glibcxx_assert(!empty()); return operator[](0); @@ -3463,7 +3463,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 * last element of the %string. */ const_reference - back() const _GLIBCXX_NOEXCEPT + back() const noexcept { __glibcxx_assert(!empty()); return operator[](this->size() - 1); diff --git a/libstdc++-v3/include/bits/locale_conv.h b/libstdc++-v3/include/bits/locale_conv.h index 146f78b38d0..16b48758e77 100644 --- a/libstdc++-v3/include/bits/locale_conv.h +++ b/libstdc++-v3/include/bits/locale_conv.h @@ -44,8 +44,6 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION -#ifdef _GLIBCXX_USE_WCHAR_T - /** * @addtogroup locales * @{ @@ -157,6 +155,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __str_codecvt_out(__first, __last, __outstr, __cvt, __state, __n); } +#ifdef _GLIBCXX_USE_WCHAR_T + _GLIBCXX_BEGIN_NAMESPACE_CXX11 /// String conversions @@ -533,10 +533,10 @@ _GLIBCXX_END_NAMESPACE_CXX11 bool _M_always_noconv; }; - /// @} group locales - #endif // _GLIBCXX_USE_WCHAR_T + /// @} group locales + _GLIBCXX_END_NAMESPACE_VERSION } // namespace diff --git a/libstdc++-v3/include/experimental/erase_if.h b/libstdc++-v3/include/experimental/bits/erase_if.h index 35b5b377889..e8bd72893bc 100644 --- a/libstdc++-v3/include/experimental/erase_if.h +++ b/libstdc++-v3/include/experimental/bits/erase_if.h @@ -1,4 +1,4 @@ -// <experimental/erase_if.h> -*- C++ -*- +// <experimental/bits/erase_if.h> -*- C++ -*- // Copyright (C) 2015 Free Software Foundation, Inc. // @@ -22,7 +22,7 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. -/** @file experimental/erase_if.h +/** @file experimental/bits/erase_if.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. */ diff --git a/libstdc++-v3/include/experimental/fs_dir.h b/libstdc++-v3/include/experimental/bits/fs_dir.h index 0c5253fb62d..0c5253fb62d 100644 --- a/libstdc++-v3/include/experimental/fs_dir.h +++ b/libstdc++-v3/include/experimental/bits/fs_dir.h diff --git a/libstdc++-v3/include/experimental/fs_fwd.h b/libstdc++-v3/include/experimental/bits/fs_fwd.h index a5ed2c5de0e..a5ed2c5de0e 100644 --- a/libstdc++-v3/include/experimental/fs_fwd.h +++ b/libstdc++-v3/include/experimental/bits/fs_fwd.h diff --git a/libstdc++-v3/include/experimental/fs_ops.h b/libstdc++-v3/include/experimental/bits/fs_ops.h index 6b7d4709ee5..6b7d4709ee5 100644 --- a/libstdc++-v3/include/experimental/fs_ops.h +++ b/libstdc++-v3/include/experimental/bits/fs_ops.h diff --git a/libstdc++-v3/include/experimental/fs_path.h b/libstdc++-v3/include/experimental/bits/fs_path.h index 5daef12191d..40462a6ab19 100644 --- a/libstdc++-v3/include/experimental/fs_path.h +++ b/libstdc++-v3/include/experimental/bits/fs_path.h @@ -279,7 +279,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 string(const _Allocator& __a = _Allocator()) const; std::string string() const; +#if _GLIBCXX_USE_WCHAR_T std::wstring wstring() const; +#endif std::string u8string() const; std::u16string u16string() const; std::u32string u32string() const; @@ -291,7 +293,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 generic_string(const _Allocator& __a = _Allocator()) const; std::string generic_string() const; +#if _GLIBCXX_USE_WCHAR_T std::wstring generic_wstring() const; +#endif std::string generic_u8string() const; std::u16string generic_u16string() const; std::u32string generic_u32string() const; @@ -828,8 +832,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 inline std::string path::string() const { return string<char>(); } +#if _GLIBCXX_USE_WCHAR_T inline std::wstring path::wstring() const { return string<wchar_t>(); } +#endif inline std::string path::u8string() const @@ -865,8 +871,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 inline std::string path::generic_string() const { return string(); } +#if _GLIBCXX_USE_WCHAR_T inline std::wstring path::generic_wstring() const { return wstring(); } +#endif inline std::string path::generic_u8string() const { return u8string(); } diff --git a/libstdc++-v3/include/experimental/string_view.tcc b/libstdc++-v3/include/experimental/bits/string_view.tcc index 75a34f90b2d..75a34f90b2d 100644 --- a/libstdc++-v3/include/experimental/string_view.tcc +++ b/libstdc++-v3/include/experimental/bits/string_view.tcc diff --git a/libstdc++-v3/include/experimental/filesystem b/libstdc++-v3/include/experimental/filesystem index db7ab1117da..671346382d4 100644 --- a/libstdc++-v3/include/experimental/filesystem +++ b/libstdc++-v3/include/experimental/filesystem @@ -35,10 +35,10 @@ # include <bits/c++0x_warning.h> #else -#include <experimental/fs_fwd.h> -#include <experimental/fs_path.h> -#include <experimental/fs_dir.h> -#include <experimental/fs_ops.h> +#include <experimental/bits/fs_fwd.h> +#include <experimental/bits/fs_path.h> +#include <experimental/bits/fs_dir.h> +#include <experimental/bits/fs_ops.h> #define __cpp_lib_experimental_filesystem 201406 diff --git a/libstdc++-v3/include/experimental/map b/libstdc++-v3/include/experimental/map index e4b3620e671..89bf2605091 100644 --- a/libstdc++-v3/include/experimental/map +++ b/libstdc++-v3/include/experimental/map @@ -36,7 +36,7 @@ #else #include <map> -#include <experimental/erase_if.h> +#include <experimental/bits/erase_if.h> namespace std _GLIBCXX_VISIBILITY(default) { diff --git a/libstdc++-v3/include/experimental/set b/libstdc++-v3/include/experimental/set index c742d9187f5..709fe327475 100644 --- a/libstdc++-v3/include/experimental/set +++ b/libstdc++-v3/include/experimental/set @@ -36,7 +36,7 @@ #else #include <set> -#include <experimental/erase_if.h> +#include <experimental/bits/erase_if.h> namespace std _GLIBCXX_VISIBILITY(default) { diff --git a/libstdc++-v3/include/experimental/string_view b/libstdc++-v3/include/experimental/string_view index 9dca400d75e..9931ad0557d 100644 --- a/libstdc++-v3/include/experimental/string_view +++ b/libstdc++-v3/include/experimental/string_view @@ -686,7 +686,7 @@ _GLIBCXX_END_NAMESPACE_VERSION } // namespace experimental } // namespace std -#include <experimental/string_view.tcc> +#include <experimental/bits/string_view.tcc> #endif // __cplusplus <= 201103L diff --git a/libstdc++-v3/include/experimental/unordered_map b/libstdc++-v3/include/experimental/unordered_map index d3a578efe3a..c80c3828ded 100644 --- a/libstdc++-v3/include/experimental/unordered_map +++ b/libstdc++-v3/include/experimental/unordered_map @@ -36,7 +36,7 @@ #else #include <unordered_map> -#include <experimental/erase_if.h> +#include <experimental/bits/erase_if.h> namespace std _GLIBCXX_VISIBILITY(default) { diff --git a/libstdc++-v3/include/experimental/unordered_set b/libstdc++-v3/include/experimental/unordered_set index 2e5e08a9609..8461f9ccb91 100644 --- a/libstdc++-v3/include/experimental/unordered_set +++ b/libstdc++-v3/include/experimental/unordered_set @@ -36,7 +36,7 @@ #else #include <unordered_set> -#include <experimental/erase_if.h> +#include <experimental/bits/erase_if.h> namespace std _GLIBCXX_VISIBILITY(default) { diff --git a/libstdc++-v3/include/ext/random b/libstdc++-v3/include/ext/random index 0bcfa4a3016..ba363ce23e7 100644 --- a/libstdc++-v3/include/ext/random +++ b/libstdc++-v3/include/ext/random @@ -40,7 +40,7 @@ #include <array> #include <ext/cmath> #ifdef __SSE2__ -# include <x86intrin.h> +# include <emmintrin.h> #endif #if defined(_GLIBCXX_USE_C99_STDINT_TR1) && defined(UINT32_C) diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h index 94af25eb597..68acd576528 100644 --- a/libstdc++-v3/include/ext/vstring.h +++ b/libstdc++-v3/include/ext/vstring.h @@ -613,7 +613,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * element of the %string. */ reference - front() _GLIBCXX_NOEXCEPT + front() noexcept { return operator[](0); } /** @@ -621,7 +621,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * element of the %string. */ const_reference - front() const _GLIBCXX_NOEXCEPT + front() const noexcept { return operator[](0); } /** @@ -629,7 +629,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * element of the %string. */ reference - back() _GLIBCXX_NOEXCEPT + back() noexcept { return operator[](this->size() - 1); } /** @@ -637,7 +637,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * last element of the %string. */ const_reference - back() const _GLIBCXX_NOEXCEPT + back() const noexcept { return operator[](this->size() - 1); } #endif diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index 7dd149ada0a..f1dc8393af8 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -184,48 +184,77 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _Weak_result_type_impl<typename remove_cv<_Functor>::type> { }; - /** - * Invoke a function object, which may be either a member pointer or a - * function object. The first parameter will tell which. - */ - template<typename _Functor, typename... _Args> - inline - typename enable_if< - (!is_member_pointer<_Functor>::value - && !is_function<_Functor>::value - && !is_function<typename remove_pointer<_Functor>::type>::value), - typename result_of<_Functor&(_Args&&...)>::type - >::type - __invoke(_Functor& __f, _Args&&... __args) + template<typename _Res, typename _Fn, typename... _Args> + inline _Res + __invoke_impl(__invoke_other, _Fn&& __f, _Args&&... __args) + noexcept(noexcept(std::forward<_Fn>(__f)(std::forward<_Args>(__args)...))) + { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } + + template<typename _Res, typename _MemFun, typename _Tp, typename... _Args> + inline _Res + __invoke_impl(__invoke_memfun_ref, _MemFun&& __f, _Tp&& __t, + _Args&&... __args) + noexcept(noexcept((forward<_Tp>(__t).*__f)(forward<_Args>(__args)...))) + { return (forward<_Tp>(__t).*__f)(forward<_Args>(__args)...); } + + template<typename _Res, typename _MemFun, typename _Tp, typename... _Args> + inline _Res + __invoke_impl(__invoke_memfun_ref, _MemFun&& __f, + reference_wrapper<_Tp> __t, _Args&&... __args) + noexcept(noexcept((__t.get().*__f)(forward<_Args>(__args)...))) + { return (__t.get().*__f)(forward<_Args>(__args)...); } + + template<typename _Res, typename _MemFun, typename _Tp, typename... _Args> + inline _Res + __invoke_impl(__invoke_memfun_deref, _MemFun&& __f, _Tp&& __t, + _Args&&... __args) + noexcept(noexcept(((*forward<_Tp>(__t)).*__f)(forward<_Args>(__args)...))) + { return ((*forward<_Tp>(__t)).*__f)(forward<_Args>(__args)...); } + + template<typename _Res, typename _MemFun, typename _Tp, typename... _Args> + inline _Res + __invoke_impl(__invoke_memobj_ref, _MemFun&& __f, _Tp&& __t) + noexcept(noexcept(forward<_Tp>(__t).*__f)) + { return forward<_Tp>(__t).*__f; } + + template<typename _Res, typename _MemFun, typename _Tp, typename... _Args> + inline _Res + __invoke_impl(__invoke_memobj_ref, _MemFun&& __f, + reference_wrapper<_Tp> __t) + noexcept(noexcept(__t.get().*__f)) + { return __t.get().*__f; } + + template<typename _Res, typename _MemFun, typename _Tp, typename... _Args> + inline _Res + __invoke_impl(__invoke_memobj_deref, _MemFun&& __f, _Tp&& __t, + _Args&&... __args) + noexcept(noexcept((*forward<_Tp>(__t)).*__f)) + { return (*forward<_Tp>(__t)).*__f; } + + /// Invoke a callable object. + template<typename _Callable, typename... _Args> + inline typename result_of<_Callable&&(_Args&&...)>::type + __invoke(_Callable&& __fn, _Args&&... __args) { - return __f(std::forward<_Args>(__args)...); + using __result_of = result_of<_Callable&&(_Args&&...)>; + using __type = typename __result_of::type; + using __tag = typename __result_of::__invoke_type; + return std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn), + std::forward<_Args>(__args)...); } - template<typename _Functor, typename... _Args> - inline - typename enable_if< - (is_member_pointer<_Functor>::value - && !is_function<_Functor>::value - && !is_function<typename remove_pointer<_Functor>::type>::value), - typename result_of<_Functor(_Args&&...)>::type - >::type - __invoke(_Functor& __f, _Args&&... __args) - { - return std::mem_fn(__f)(std::forward<_Args>(__args)...); - } +#if __cplusplus > 201402L +# define __cpp_lib_invoke 201411 - // To pick up function references (that will become function pointers) - template<typename _Functor, typename... _Args> - inline - typename enable_if< - (is_pointer<_Functor>::value - && is_function<typename remove_pointer<_Functor>::type>::value), - typename result_of<_Functor(_Args&&...)>::type - >::type - __invoke(_Functor __f, _Args&&... __args) + /// Invoke a callable object. + template<typename _Callable, typename... _Args> + inline result_of_t<_Callable&&(_Args&&...)> + invoke(_Callable&& __fn, _Args&&... __args) { - return __f(std::forward<_Args>(__args)...); + return std::__invoke(std::forward<_Callable>(__fn), + std::forward<_Args>(__args)...); } +#endif /** * Knowing which of unary_function and binary_function _Tp derives @@ -425,7 +454,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename result_of<_Tp&(_Args&&...)>::type operator()(_Args&&... __args) const { - return __invoke(get(), std::forward<_Args>(__args)...); + return std::__invoke(get(), std::forward<_Args>(__args)...); } }; @@ -504,8 +533,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct _Mem_fn_traits_base { using __result_type = _Res; - using __class_type = _Class; - using __arg_types = _Pack<_ArgTypes...>; using __maybe_type = _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...>; using __arity = integral_constant<size_t, sizeof...(_ArgTypes)>; @@ -516,18 +543,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) _CV _REF> \ : _Mem_fn_traits_base<_Res, _CV _Class, _ArgTypes...> \ { \ - using __pmf_type = _Res (_Class::*)(_ArgTypes...) _CV _REF; \ - using __lvalue = _LVAL; \ - using __rvalue = _RVAL; \ using __vararg = false_type; \ }; \ template<typename _Res, typename _Class, typename... _ArgTypes> \ struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) _CV _REF> \ : _Mem_fn_traits_base<_Res, _CV _Class, _ArgTypes...> \ { \ - using __pmf_type = _Res (_Class::*)(_ArgTypes... ...) _CV _REF; \ - using __lvalue = _LVAL; \ - using __rvalue = _RVAL; \ using __vararg = true_type; \ }; @@ -551,173 +572,51 @@ _GLIBCXX_MEM_FN_TRAITS(&&, false_type, true_type) { using _Traits = _Mem_fn_traits<_MemFunPtr>; - using _Class = typename _Traits::__class_type; - using _ArgTypes = typename _Traits::__arg_types; - using _Pmf = typename _Traits::__pmf_type; - using _Arity = typename _Traits::__arity; using _Varargs = typename _Traits::__vararg; template<typename _Func, typename... _BoundArgs> friend struct _Bind_check_arity; - // for varargs functions we just check the number of arguments, - // otherwise we also check they are convertible. - template<typename _Args> - using _CheckArgs = typename conditional<_Varargs::value, - __bool_constant<(_Args::value >= _ArgTypes::value)>, - _AllConvertible<_Args, _ArgTypes> - >::type; + _MemFunPtr _M_pmf; public: - using result_type = typename _Traits::__result_type; - - explicit constexpr _Mem_fn_base(_Pmf __pmf) : _M_pmf(__pmf) { } - - // Handle objects - template<typename... _Args, typename _Req - = _Require<typename _Traits::__lvalue, - _CheckArgs<_Pack<_Args...>>>> - result_type - operator()(_Class& __object, _Args&&... __args) const - { return (__object.*_M_pmf)(std::forward<_Args>(__args)...); } - template<typename... _Args, typename _Req - = _Require<typename _Traits::__rvalue, - _CheckArgs<_Pack<_Args...>>>> - result_type - operator()(_Class&& __object, _Args&&... __args) const - { - return (std::move(__object).*_M_pmf)(std::forward<_Args>(__args)...); - } - - // Handle pointers - template<typename... _Args, typename _Req - = _Require<typename _Traits::__lvalue, - _CheckArgs<_Pack<_Args...>>>> - result_type - operator()(_Class* __object, _Args&&... __args) const - { return (__object->*_M_pmf)(std::forward<_Args>(__args)...); } - - // Handle smart pointers, references and pointers to derived - template<typename _Tp, typename... _Args, typename _Req - = _Require<_NotSame<_Class, _Tp>, _NotSame<_Class*, _Tp>, - _CheckArgs<_Pack<_Args...>>>> - result_type - operator()(_Tp&& __object, _Args&&... __args) const - { - return _M_call(std::forward<_Tp>(__object), &__object, - std::forward<_Args>(__args)...); - } - - // Handle reference wrappers - template<typename _Tp, typename... _Args, typename _Req - = _Require<is_base_of<_Class, _Tp>, typename _Traits::__lvalue, - _CheckArgs<_Pack<_Args...>>>> - result_type - operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const - { return operator()(__ref.get(), std::forward<_Args>(__args)...); } - - private: - template<typename _Tp, typename... _Args> - result_type - _M_call(_Tp&& __object, const volatile _Class *, - _Args&&... __args) const - { - return (std::forward<_Tp>(__object).*_M_pmf) - (std::forward<_Args>(__args)...); - } + using result_type = typename _Traits::__result_type; - template<typename _Tp, typename... _Args> - result_type - _M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const - { return ((*__ptr).*_M_pmf)(std::forward<_Args>(__args)...); } + explicit constexpr + _Mem_fn_base(_MemFunPtr __pmf) noexcept : _M_pmf(__pmf) { } - _Pmf _M_pmf; + template<typename... _Args> + auto + operator()(_Args&&... __args) const + noexcept(noexcept(std::__invoke(_M_pmf, forward<_Args>(__args)...))) + -> decltype(std::__invoke(_M_pmf, forward<_Args>(__args)...)) + { return std::__invoke(_M_pmf, std::forward<_Args>(__args)...); } }; // Partial specialization for member object pointers. - template<typename _Res, typename _Class> - class _Mem_fn_base<_Res _Class::*, false> + template<typename _MemObjPtr> + class _Mem_fn_base<_MemObjPtr, false> { - using __pm_type = _Res _Class::*; - - // This bit of genius is due to Peter Dimov, improved slightly by - // Douglas Gregor. - // Made less elegant to support perfect forwarding and noexcept. - template<typename _Tp> - auto - _M_call(_Tp&& __object, const _Class *) const noexcept - -> decltype(std::forward<_Tp>(__object).*std::declval<__pm_type&>()) - { return std::forward<_Tp>(__object).*_M_pm; } - - template<typename _Tp, typename _Up> - auto - _M_call(_Tp&& __object, _Up * const *) const noexcept - -> decltype((*std::forward<_Tp>(__object)).*std::declval<__pm_type&>()) - { return (*std::forward<_Tp>(__object)).*_M_pm; } - - template<typename _Tp> - auto - _M_call(_Tp&& __ptr, const volatile void*) const - noexcept(noexcept((*__ptr).*std::declval<__pm_type&>())) - -> decltype((*__ptr).*std::declval<__pm_type&>()) - { return (*__ptr).*_M_pm; } - using _Arity = integral_constant<size_t, 0>; using _Varargs = false_type; template<typename _Func, typename... _BoundArgs> friend struct _Bind_check_arity; + _MemObjPtr _M_pm; + public: explicit constexpr - _Mem_fn_base(_Res _Class::*__pm) noexcept : _M_pm(__pm) { } - - // Handle objects - _Res& - operator()(_Class& __object) const noexcept - { return __object.*_M_pm; } - - const _Res& - operator()(const _Class& __object) const noexcept - { return __object.*_M_pm; } - - _Res&& - operator()(_Class&& __object) const noexcept - { return std::forward<_Class>(__object).*_M_pm; } - - const _Res&& - operator()(const _Class&& __object) const noexcept - { return std::forward<const _Class>(__object).*_M_pm; } + _Mem_fn_base(_MemObjPtr __pm) noexcept : _M_pm(__pm) { } - // Handle pointers - _Res& - operator()(_Class* __object) const noexcept - { return __object->*_M_pm; } - - const _Res& - operator()(const _Class* __object) const noexcept - { return __object->*_M_pm; } - - // Handle smart pointers and derived - template<typename _Tp, typename _Req = _Require<_NotSame<_Class*, _Tp>>> - auto - operator()(_Tp&& __unknown) const - noexcept(noexcept(std::declval<_Mem_fn_base*>()->_M_call - (std::forward<_Tp>(__unknown), &__unknown))) - -> decltype(this->_M_call(std::forward<_Tp>(__unknown), &__unknown)) - { return _M_call(std::forward<_Tp>(__unknown), &__unknown); } - - template<typename _Tp, typename _Req = _Require<is_base_of<_Class, _Tp>>> + template<typename _Tp> auto - operator()(reference_wrapper<_Tp> __ref) const - noexcept(noexcept(std::declval<_Mem_fn_base&>()(__ref.get()))) - -> decltype((*this)(__ref.get())) - { return (*this)(__ref.get()); } - - private: - _Res _Class::*_M_pm; + operator()(_Tp&& __obj) const + noexcept(noexcept(std::__invoke(_M_pm, forward<_Tp>(__obj)))) + -> decltype(std::__invoke(_M_pm, std::forward<_Tp>(__obj))) + { return std::__invoke(_M_pm, std::forward<_Tp>(__obj)); } }; template<typename _Res, typename _Class> diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future index 216a921796a..014658f8db8 100644 --- a/libstdc++-v3/include/std/future +++ b/libstdc++-v3/include/std/future @@ -1641,7 +1641,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // the shared state, whichever happens first. virtual void _M_complete_async() { _M_join(); } - void _M_join() { std::call_once(_M_once, &thread::join, ref(_M_thread)); } + void _M_join() { std::call_once(_M_once, &thread::join, &_M_thread); } thread _M_thread; once_flag _M_once; @@ -1711,10 +1711,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION std::shared_ptr<__future_base::_State_base> __state; if ((__policy & launch::async) == launch::async) { - __state = __future_base::_S_make_async_state(std::__bind_simple( - std::forward<_Fn>(__fn), std::forward<_Args>(__args)...)); + __try + { + __state = __future_base::_S_make_async_state(std::__bind_simple( + std::forward<_Fn>(__fn), std::forward<_Args>(__args)...)); + } +#if __cpp_exceptions + catch(const system_error& __e) + { + if (__e.code() != errc::resource_unavailable_try_again + || (__policy & launch::deferred) != launch::deferred) + throw; + } +#endif } - else + if (!__state) { __state = __future_base::_S_make_deferred_state(std::__bind_simple( std::forward<_Fn>(__fn), std::forward<_Args>(__args)...)); diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index 751d7eb97cc..8af01f4756e 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -457,6 +457,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } }; + template<typename... _Elements> + class tuple; // Concept utility functions, reused in conditionally-explicit // constructors. @@ -490,7 +492,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _SrcTuple> static constexpr bool _NonNestedTuple() { - return __and_<__not_<is_convertible<_SrcTuple, _Elements...>>, + return __and_<__not_<is_same<tuple<_Elements...>, + typename remove_cv< + typename remove_reference<_SrcTuple>::type + >::type>>, + __not_<is_convertible<_SrcTuple, _Elements...>>, __not_<is_constructible<_Elements..., _SrcTuple>> >::value; } diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 55ca9167b7b..e08131b2c6d 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -93,7 +93,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __bool_constant = integral_constant<bool, __v>; #if __cplusplus > 201402L -// TODO: #define __cpp_lib_bool_constant 201505 +# define __cpp_lib_bool_constant 201505 template<bool __v> using bool_constant = integral_constant<bool, __v>; #endif @@ -2219,13 +2219,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #define __cpp_lib_result_of_sfinae 201210 + struct __invoke_memfun_ref { }; + struct __invoke_memfun_deref { }; + struct __invoke_memobj_ref { }; + struct __invoke_memobj_deref { }; + struct __invoke_other { }; + + // Associate a tag type with a specialization of __success_type. + template<typename _Tp, typename _Tag> + struct __result_of_success : __success_type<_Tp> + { using __invoke_type = _Tag; }; + // [func.require] paragraph 1 bullet 1: struct __result_of_memfun_ref_impl { template<typename _Fp, typename _Tp1, typename... _Args> - static __success_type<decltype( + static __result_of_success<decltype( (std::declval<_Tp1>().*std::declval<_Fp>())(std::declval<_Args>()...) - )> _S_test(int); + ), __invoke_memfun_ref> _S_test(int); template<typename...> static __failure_type _S_test(...); @@ -2242,9 +2253,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __result_of_memfun_deref_impl { template<typename _Fp, typename _Tp1, typename... _Args> - static __success_type<decltype( + static __result_of_success<decltype( ((*std::declval<_Tp1>()).*std::declval<_Fp>())(std::declval<_Args>()...) - )> _S_test(int); + ), __invoke_memfun_deref> _S_test(int); template<typename...> static __failure_type _S_test(...); @@ -2261,9 +2272,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __result_of_memobj_ref_impl { template<typename _Fp, typename _Tp1> - static __success_type<decltype( + static __result_of_success<decltype( std::declval<_Tp1>().*std::declval<_Fp>() - )> _S_test(int); + ), __invoke_memobj_ref> _S_test(int); template<typename, typename> static __failure_type _S_test(...); @@ -2280,9 +2291,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __result_of_memobj_deref_impl { template<typename _Fp, typename _Tp1> - static __success_type<decltype( + static __result_of_success<decltype( (*std::declval<_Tp1>()).*std::declval<_Fp>() - )> _S_test(int); + ), __invoke_memobj_deref> _S_test(int); template<typename, typename> static __failure_type _S_test(...); @@ -2327,6 +2338,49 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION >::type::type type; }; + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2219. INVOKE-ing a pointer to member with a reference_wrapper + // as the object expression + template<typename> struct reference_wrapper; + + template<typename _Res, typename _Class, typename _Arg> + struct __result_of_memobj<_Res _Class::*, reference_wrapper<_Arg>> + : __result_of_memobj<_Res _Class::*, _Arg> + { + typedef typename + __result_of_memobj_ref<_Res _Class::*, _Arg&>::type type; + }; + + template<typename _Res, typename _Class, typename _Arg> + struct __result_of_memobj<_Res _Class::*, reference_wrapper<_Arg>&> + : __result_of_memobj<_Res _Class::*, reference_wrapper<_Arg>> + { }; + + template<typename _Res, typename _Class, typename _Arg> + struct __result_of_memobj<_Res _Class::*, reference_wrapper<_Arg>&&> + : __result_of_memobj<_Res _Class::*, reference_wrapper<_Arg>> + { }; + + template<typename _Res, typename _Class, typename _Arg, typename... _Args> + struct __result_of_memfun<_Res _Class::*, reference_wrapper<_Arg>, _Args...> + : __result_of_memfun<_Res _Class::*, _Arg&, _Args...> + { + typedef typename + __result_of_memfun_ref<_Res _Class::*, _Arg&, _Args...>::type type; + }; + + template<typename _Res, typename _Class, typename _Arg, typename... _Args> + struct __result_of_memfun<_Res _Class::*, reference_wrapper<_Arg>&, + _Args...> + : __result_of_memfun<_Res _Class::*, reference_wrapper<_Arg>, _Args...> + { }; + + template<typename _Res, typename _Class, typename _Arg, typename... _Args> + struct __result_of_memfun<_Res _Class::*, reference_wrapper<_Arg>&&, + _Args...> + : __result_of_memfun<_Res _Class::*, reference_wrapper<_Arg>, _Args...> + { }; + template<bool, bool, typename _Functor, typename... _ArgTypes> struct __result_of_impl { @@ -2347,9 +2401,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __result_of_other_impl { template<typename _Fn, typename... _Args> - static __success_type<decltype( + static __result_of_success<decltype( std::declval<_Fn>()(std::declval<_Args>()...) - )> _S_test(int); + ), __invoke_other> _S_test(int); template<typename...> static __failure_type _S_test(...); diff --git a/libstdc++-v3/libsupc++/cxxabi.h b/libstdc++-v3/libsupc++/cxxabi.h index 571e42e9ad1..08eb7bcce5f 100644 --- a/libstdc++-v3/libsupc++/cxxabi.h +++ b/libstdc++-v3/libsupc++/cxxabi.h @@ -281,7 +281,8 @@ namespace __cxxabiv1 __volatile_mask = 0x2, __restrict_mask = 0x4, __incomplete_mask = 0x8, - __incomplete_class_mask = 0x10 + __incomplete_class_mask = 0x10, + __transaction_safe_mask = 0x20 }; protected: diff --git a/libstdc++-v3/libsupc++/pbase_type_info.cc b/libstdc++-v3/libsupc++/pbase_type_info.cc index cbfdc172f83..0e9652932c0 100644 --- a/libstdc++-v3/libsupc++/pbase_type_info.cc +++ b/libstdc++-v3/libsupc++/pbase_type_info.cc @@ -50,8 +50,19 @@ __do_catch (const type_info *thr_type, const __pbase_type_info *thrown_type = static_cast <const __pbase_type_info *> (thr_type); + + unsigned tflags = thrown_type->__flags; + + bool throw_tx = (tflags & __transaction_safe_mask); + bool catch_tx = (__flags & __transaction_safe_mask); + if (throw_tx && !catch_tx) + /* Catch can perform a transaction-safety conversion. */ + tflags &= ~__transaction_safe_mask; + if (catch_tx && !throw_tx) + /* But not the reverse. */ + return false; - if (thrown_type->__flags & ~__flags) + if (tflags & ~__flags) // We're less qualified. return false; diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py index 2d167863ad3..12e732e4a76 100644 --- a/libstdc++-v3/python/libstdcxx/v6/printers.py +++ b/libstdc++-v3/python/libstdcxx/v6/printers.py @@ -945,10 +945,6 @@ class StdExpAnyPrinter(SingleObjContainerPrinter): valptr = self.val['_M_storage']['_M_buffer'].address elif '::_Manager_external' in mgrname: valptr = self.val['_M_storage']['_M_ptr'] - elif '::_Manager_alloc' in mgrname: - datatype = gdb.lookup_type(mgrname + '::_Data') - valptr = self.val['_M_storage']['_M_ptr'].cast(datatype.pointer()) - valptr = valptr.dereference()['_M_data'].address else: raise ValueError("Unknown manager function in std::experimental::any") contained_value = valptr.cast(self.contained_type.pointer()).dereference() diff --git a/libstdc++-v3/src/c++98/locale.cc b/libstdc++-v3/src/c++98/locale.cc index 1c29a56a250..3395c93d8d8 100644 --- a/libstdc++-v3/src/c++98/locale.cc +++ b/libstdc++-v3/src/c++98/locale.cc @@ -23,7 +23,6 @@ #define _GLIBCXX_USE_CXX11_ABI 1 #include <clocale> #include <cstring> -#include <cstdlib> // For getenv #include <cctype> #include <cwctype> // For towupper, etc. #include <locale> diff --git a/libstdc++-v3/src/c++98/locale_init.cc b/libstdc++-v3/src/c++98/locale_init.cc index 0a95b9ff4b5..be7fd9055d9 100644 --- a/libstdc++-v3/src/c++98/locale_init.cc +++ b/libstdc++-v3/src/c++98/locale_init.cc @@ -23,7 +23,7 @@ #define _GLIBCXX_USE_CXX11_ABI 1 #include <clocale> #include <cstring> -#include <cstdlib> // For getenv, free. +#include <cstdlib> // For free. #include <cctype> #include <cwctype> // For towupper, etc. #include <locale> diff --git a/libstdc++-v3/src/filesystem/Makefile.am b/libstdc++-v3/src/filesystem/Makefile.am index 128cba9f52a..8e332ec4b01 100644 --- a/libstdc++-v3/src/filesystem/Makefile.am +++ b/libstdc++-v3/src/filesystem/Makefile.am @@ -26,10 +26,20 @@ toolexeclib_LTLIBRARIES = libstdc++fs.la headers = +if ENABLE_DUAL_ABI +cxx11_abi_sources = \ + cow-dir.cc \ + cow-ops.cc \ + cow-path.cc +else +cxx11_abi_sources = +endif + sources = \ dir.cc \ ops.cc \ - path.cc + path.cc \ + ${cxx11_abi_sources} # vpath % $(top_srcdir)/src/filesystem diff --git a/libstdc++-v3/src/filesystem/Makefile.in b/libstdc++-v3/src/filesystem/Makefile.in index a315bb63998..bbc45a87310 100644 --- a/libstdc++-v3/src/filesystem/Makefile.in +++ b/libstdc++-v3/src/filesystem/Makefile.in @@ -112,8 +112,10 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" LTLIBRARIES = $(toolexeclib_LTLIBRARIES) libstdc__fs_la_LIBADD = -am__objects_1 = dir.lo ops.lo path.lo -am_libstdc__fs_la_OBJECTS = $(am__objects_1) +@ENABLE_DUAL_ABI_TRUE@am__objects_1 = cow-dir.lo cow-ops.lo \ +@ENABLE_DUAL_ABI_TRUE@ cow-path.lo +am__objects_2 = dir.lo ops.lo path.lo $(am__objects_1) +am_libstdc__fs_la_OBJECTS = $(am__objects_2) libstdc__fs_la_OBJECTS = $(am_libstdc__fs_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = @@ -353,10 +355,17 @@ WARN_CXXFLAGS = \ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) $(CPPFLAGS) toolexeclib_LTLIBRARIES = libstdc++fs.la headers = +@ENABLE_DUAL_ABI_FALSE@cxx11_abi_sources = +@ENABLE_DUAL_ABI_TRUE@cxx11_abi_sources = \ +@ENABLE_DUAL_ABI_TRUE@ cow-dir.cc \ +@ENABLE_DUAL_ABI_TRUE@ cow-ops.cc \ +@ENABLE_DUAL_ABI_TRUE@ cow-path.cc + sources = \ dir.cc \ ops.cc \ - path.cc + path.cc \ + ${cxx11_abi_sources} # vpath % $(top_srcdir)/src/filesystem diff --git a/libstdc++-v3/src/filesystem/cow-dir.cc b/libstdc++-v3/src/filesystem/cow-dir.cc new file mode 100644 index 00000000000..b4175ef0ee3 --- /dev/null +++ b/libstdc++-v3/src/filesystem/cow-dir.cc @@ -0,0 +1,26 @@ +// Class filesystem::directory_entry etc. -*- C++ -*- + +// Copyright (C) 2015 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +#define _GLIBCXX_USE_CXX11_ABI 0 +#include "dir.cc" diff --git a/libstdc++-v3/src/filesystem/cow-ops.cc b/libstdc++-v3/src/filesystem/cow-ops.cc new file mode 100644 index 00000000000..6096dec4bb7 --- /dev/null +++ b/libstdc++-v3/src/filesystem/cow-ops.cc @@ -0,0 +1,26 @@ +// Filesystem operations -*- C++ -*- + +// Copyright (C) 2015 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +#define _GLIBCXX_USE_CXX11_ABI 0 +#include "ops.cc" diff --git a/libstdc++-v3/src/filesystem/cow-path.cc b/libstdc++-v3/src/filesystem/cow-path.cc new file mode 100644 index 00000000000..386df59d335 --- /dev/null +++ b/libstdc++-v3/src/filesystem/cow-path.cc @@ -0,0 +1,26 @@ +// Class filesystem::path -*- C++ -*- + +// Copyright (C) 2015 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +#define _GLIBCXX_USE_CXX11_ABI 0 +#include "path.cc" diff --git a/libstdc++-v3/src/filesystem/dir.cc b/libstdc++-v3/src/filesystem/dir.cc index bce751c3fb1..63c10e716db 100644 --- a/libstdc++-v3/src/filesystem/dir.cc +++ b/libstdc++-v3/src/filesystem/dir.cc @@ -22,6 +22,10 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. +#ifndef _GLIBCXX_USE_CXX11_ABI +# define _GLIBCXX_USE_CXX11_ABI 1 +#endif + #include <experimental/filesystem> #include <utility> #include <stack> @@ -69,15 +73,17 @@ struct fs::_Dir namespace { template<typename Bitmask> - inline bool is_set(Bitmask obj, Bitmask bits) + inline bool + is_set(Bitmask obj, Bitmask bits) { return (obj & bits) != Bitmask::none; } // Returns {dirp, p} on success, {nullptr, p} on error. // If an ignored EACCES error occurs returns {}. - fs::_Dir - open_dir(const fs::path& p, fs::directory_options options, std::error_code* ec) + inline fs::_Dir + open_dir(const fs::path& p, fs::directory_options options, + std::error_code* ec) { if (ec) ec->clear(); @@ -100,7 +106,7 @@ namespace } inline fs::file_type - get_file_type(const dirent& d __attribute__((__unused__))) + get_file_type(const ::dirent& d __attribute__((__unused__))) { #ifdef _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE switch (d.d_type) @@ -128,20 +134,9 @@ namespace return fs::file_type::none; #endif } - - int - native_readdir(DIR* dirp, ::dirent*& entryp) - { -#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS - if ((entryp = ::readdir(dirp))) - return 0; - return errno; -#else - return ::readdir_r(dirp, entryp, &entryp); -#endif - } } + // Returns false when the end of the directory entries is reached. // Reports errors by setting ec or throwing. bool @@ -150,9 +145,20 @@ fs::_Dir::advance(error_code* ec, directory_options options) if (ec) ec->clear(); - ::dirent ent; - ::dirent* result = &ent; - if (int err = native_readdir(dirp, result)) + int err = std::exchange(errno, 0); + const auto entp = readdir(dirp); + std::swap(errno, err); + + if (entp) + { + // skip past dot and dot-dot + if (!strcmp(entp->d_name, ".") || !strcmp(entp->d_name, "..")) + return advance(ec, options); + entry = fs::directory_entry{path / entp->d_name}; + type = get_file_type(*entp); + return true; + } + else if (err) { if (err == EACCES && is_set(options, directory_options::skip_permission_denied)) @@ -165,15 +171,6 @@ fs::_Dir::advance(error_code* ec, directory_options options) ec->assign(err, std::generic_category()); return true; } - else if (result != nullptr) - { - // skip past dot and dot-dot - if (!strcmp(ent.d_name, ".") || !strcmp(ent.d_name, "..")) - return advance(ec, options); - entry = fs::directory_entry{path / ent.d_name}; - type = get_file_type(ent); - return true; - } else { // reached the end @@ -251,10 +248,10 @@ recursive_directory_iterator(const path& p, directory_options options, { if (DIR* dirp = ::opendir(p.c_str())) { - _M_dirs = std::make_shared<_Dir_stack>(); - _M_dirs->push(_Dir{ dirp, p }); - if (!_M_dirs->top().advance(ec)) - _M_dirs.reset(); + auto sp = std::make_shared<_Dir_stack>(); + sp->push(_Dir{ dirp, p }); + if (sp->top().advance(ec)) + _M_dirs.swap(sp); } else { diff --git a/libstdc++-v3/src/filesystem/ops.cc b/libstdc++-v3/src/filesystem/ops.cc index 7b261fb93aa..81525609698 100644 --- a/libstdc++-v3/src/filesystem/ops.cc +++ b/libstdc++-v3/src/filesystem/ops.cc @@ -22,6 +22,10 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. +#ifndef _GLIBCXX_USE_CXX11_ABI +# define _GLIBCXX_USE_CXX11_ABI 1 +#endif + #include <experimental/filesystem> #include <functional> #include <stack> diff --git a/libstdc++-v3/src/filesystem/path.cc b/libstdc++-v3/src/filesystem/path.cc index a5441b95c9b..e9fe465d174 100644 --- a/libstdc++-v3/src/filesystem/path.cc +++ b/libstdc++-v3/src/filesystem/path.cc @@ -22,6 +22,10 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. +#ifndef _GLIBCXX_USE_CXX11_ABI +# define _GLIBCXX_USE_CXX11_ABI 1 +#endif + #include <experimental/filesystem> using std::experimental::filesystem::path; @@ -437,8 +441,9 @@ path::_M_trim() path::string_type path::_S_convert_loc(const char* __first, const char* __last, - const std::locale& __loc) + const std::locale& __loc) { +#if _GLIBCXX_USE_WCHAR_T auto& __cvt = std::use_facet<codecvt<wchar_t, char, mbstate_t>>(__loc); basic_string<wchar_t> __ws; if (!__str_codecvt_in(__first, __last, __ws, __cvt)) @@ -450,6 +455,9 @@ path::_S_convert_loc(const char* __first, const char* __last, #else return _Cvt<wchar_t>::_S_convert(__ws.data(), __ws.data() + __ws.size()); #endif +#else + return {__first, __last}; +#endif } std::size_t diff --git a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc index 73eabf90a9d..a09788a29e0 100644 --- a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc +++ b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc @@ -30,10 +30,6 @@ void test01() { const int dummy = 0; std::bind(&inc, _1)(0); // { dg-error "no match" } - // { dg-error "rvalue|const" "" { target *-*-* } 1125 } - // { dg-error "rvalue|const" "" { target *-*-* } 1139 } - // { dg-error "rvalue|const" "" { target *-*-* } 1153 } - // { dg-error "rvalue|const" "" { target *-*-* } 1167 } std::bind(&inc, std::ref(dummy))(); // { dg-error "no match" } } @@ -50,8 +46,15 @@ void test02() const int dummy = 0; std::bind(Inc(), _1)(dummy); // { dg-error "no match" } std::bind(&Inc::f, Inc(), std::ref(dummy))(); // { dg-error "no match" } + // { dg-error "no match" "" { target *-*-* } 594 } + // { dg-error "no type" "" { target *-*-* } 237 } } +// { dg-error "rvalue|const" "" { target *-*-* } 1024 } +// { dg-error "rvalue|const" "" { target *-*-* } 1038 } +// { dg-error "rvalue|const" "" { target *-*-* } 1052 } +// { dg-error "rvalue|const" "" { target *-*-* } 1066 } + int main() { test01(); diff --git a/libstdc++-v3/testsuite/20_util/function_objects/mem_fn/55463.cc b/libstdc++-v3/testsuite/20_util/function_objects/mem_fn/55463.cc index 2eba90229c7..c67731ae2bc 100644 --- a/libstdc++-v3/testsuite/20_util/function_objects/mem_fn/55463.cc +++ b/libstdc++-v3/testsuite/20_util/function_objects/mem_fn/55463.cc @@ -98,15 +98,3 @@ void test01() int& pval __attribute__((unused)) = std::mem_fn( &X::data )( X_ptr() ); int& sval __attribute__((unused)) = std::mem_fn( &X::data )( smart_ptr() ); } - -void test02() -{ - std::reference_wrapper<X> r = ref(); - X& x1 __attribute__((unused)) - = std::mem_fn( &std::reference_wrapper<X>::get )( r ); - const std::reference_wrapper<X> cr = ref(); - const X& x3 __attribute__((unused)) - = std::mem_fn( &std::reference_wrapper<X>::get )( cr ); - X& x2 __attribute__((unused)) - = std::mem_fn( &std::reference_wrapper<X>::get )( ref() ); -} diff --git a/libstdc++-v3/testsuite/20_util/tuple/67844.cc b/libstdc++-v3/testsuite/20_util/tuple/67844.cc new file mode 100644 index 00000000000..a4efb5ae357 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/tuple/67844.cc @@ -0,0 +1,43 @@ +// { dg-do compile } + +// Copyright (C) 2015 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// libstdc++/67844 + +#include <tuple> + +struct A +{ + template <typename T> + A(T) + { + } + + A(const A&) = default; + A(A&&) = default; + A& operator=(const A&) = default; + A& operator=(A&&) = default; + ~A() = default; +}; + +int main() +{ + auto x = A{7}; + std::make_tuple(x); +} + diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/nested_tuple_construct.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/nested_tuple_construct.cc index 32ef3cc0259..6085beefe33 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/cons/nested_tuple_construct.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/cons/nested_tuple_construct.cc @@ -1,3 +1,20 @@ +// Copyright (C) 2015 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + #include <string> #include <tuple> #include <testsuite_hooks.h> diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/minimal.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/minimal.cc index 4bfd4cabe42..d8dbb002977 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/minimal.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/minimal.cc @@ -22,25 +22,27 @@ #include <testsuite_hooks.h> #include <testsuite_allocator.h> +#if _GLIBCXX_USE_CXX11_ABI using C = char; const C c = 'a'; using traits = std::char_traits<C>; using __gnu_test::SimpleAllocator; -template class std::basic_string<C,traits, SimpleAllocator<C>>; +template class std::basic_string<C, traits, SimpleAllocator<C>>; void test01() { -#if _GLIBCXX_USE_CXX11_ABI typedef SimpleAllocator<C> alloc_type; typedef std::allocator_traits<alloc_type> traits_type; typedef std::basic_string<C, traits, alloc_type> test_type; test_type v(alloc_type{}); v.assign(1, c); v.assign(100, c); -#endif } +#else +void test01() { } +#endif int main() { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc index bfba87cc76b..b97a58a5ecc 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc @@ -22,25 +22,27 @@ #include <testsuite_hooks.h> #include <testsuite_allocator.h> -using C = char; -const C c = 'a'; +#if _GLIBCXX_USE_CXX11_ABI && defined(_GLIBCXX_USE_WCHAR_T) +using C = wchar_t; +const C c = L'a'; using traits = std::char_traits<C>; using __gnu_test::SimpleAllocator; -template class std::basic_string<C,traits, SimpleAllocator<C>>; +template class std::basic_string<C, traits, SimpleAllocator<C>>; void test01() { -#if _GLIBCXX_USE_CXX11_ABI && defined(_GLIBCXX_USE_WCHAR_T) typedef SimpleAllocator<C> alloc_type; typedef std::allocator_traits<alloc_type> traits_type; typedef std::basic_string<C, traits, alloc_type> test_type; test_type v(alloc_type{}); v.assign(1, c); v.assign(100, c); -#endif } +#else +void test01() { } +#endif int main() { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/literals/types.cc b/libstdc++-v3/testsuite/21_strings/basic_string/literals/types.cc index 5a31acfe5c1..8922bf26010 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/literals/types.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/literals/types.cc @@ -32,8 +32,10 @@ test01() static_assert(std::is_same<decltype(u8"Hello"s), std::string>::value, "u8\"Hello\"s is std::string"); +#ifdef _GLIBCXX_USE_WCHAR_T static_assert(std::is_same<decltype(L"Hello"s), std::wstring>::value, "L\"Hello\"s is std::wstring"); +#endif static_assert(std::is_same<decltype(u"Hello"s), std::u16string>::value, "u\"Hello\"s is std::u16string"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/literals/values.cc b/libstdc++-v3/testsuite/21_strings/basic_string/literals/values.cc index b8dc7d97806..bf60b9ea92c 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/literals/values.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/literals/values.cc @@ -27,15 +27,19 @@ test01() using namespace std::literals::string_literals; std::string planet = "Mercury"s; +#ifdef _GLIBCXX_USE_WCHAR_T std::wstring wplanet = L"Venus"s; +#endif std::string u8planet = u8"Mars"s; - std::u16string u16planet = u"Juiter"s; + std::u16string u16planet = u"Jupiter"s; std::u32string u32planet = U"Saturn"s; VERIFY( planet == std::string("Mercury") ); +#ifdef _GLIBCXX_USE_WCHAR_T VERIFY( wplanet == std::wstring(L"Venus") ); +#endif VERIFY( u8planet == std::string(u8"Mars") ); - VERIFY( u16planet == std::u16string(u"Juiter") ); + VERIFY( u16planet == std::u16string(u"Jupiter") ); VERIFY( u32planet == std::u32string(U"Saturn") ); } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/requirements/citerators.cc b/libstdc++-v3/testsuite/21_strings/basic_string/requirements/citerators.cc index f1dfff1f01a..533b3a666e8 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/requirements/citerators.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/requirements/citerators.cc @@ -24,6 +24,8 @@ int main() { __gnu_test::citerator<std::string> test1; +#ifdef _GLIBCXX_USE_WCHAR_T __gnu_test::citerator<std::wstring> test2; +#endif return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/messages/13631.cc b/libstdc++-v3/testsuite/22_locale/messages/13631.cc index 9feb42c7322..fb93c000f4c 100644 --- a/libstdc++-v3/testsuite/22_locale/messages/13631.cc +++ b/libstdc++-v3/testsuite/22_locale/messages/13631.cc @@ -57,6 +57,7 @@ void test01() void test02() { +#ifdef _GLIBCXX_USE_WCHAR_T bool test __attribute__((unused)) = true; // This is defined through CXXFLAGS in scripts/testsuite_flags[.in]. @@ -89,6 +90,7 @@ void test02() msgs_facet.close(msgs); VERIFY( translation1 == translation2 ); +#endif } int main() diff --git a/libstdc++-v3/testsuite/25_algorithms/random_shuffle/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/random_shuffle/moveable.cc index e854c38a209..9ce44ac09fa 100644 --- a/libstdc++-v3/testsuite/25_algorithms/random_shuffle/moveable.cc +++ b/libstdc++-v3/testsuite/25_algorithms/random_shuffle/moveable.cc @@ -34,8 +34,8 @@ using __gnu_test::rvalstruct; typedef test_container<rvalstruct, random_access_iterator_wrapper> Container; -const int N = 200000; -int A[N]; +const unsigned int N = 10000; +int A[N]; // This is made global because we don't want it on the stack void fill_ascending() { @@ -70,7 +70,6 @@ test02() { bool test __attribute__((unused)) = true; - fill_ascending(); rvalstruct rv[10] = {1,2,3,4,5,6,7,8,9,10}; int result[10] = {10,1,2,3,4,5,6,7,8,9}; Container con(rv, rv + 10); diff --git a/libstdc++-v3/testsuite/30_threads/async/except.cc b/libstdc++-v3/testsuite/30_threads/async/except.cc new file mode 100644 index 00000000000..fda08dc2bf4 --- /dev/null +++ b/libstdc++-v3/testsuite/30_threads/async/except.cc @@ -0,0 +1,70 @@ +// { dg-do run { target *-*-freebsd* *-*-dragonfly* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-rtems* *-*-darwin* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++11 -pthread" { target *-*-freebsd* *-*-dragonfly* *-*-netbsd* *-*-linux* *-*-gnu* powerpc-ibm-aix* } } +// { dg-options " -std=gnu++11 -pthreads" { target *-*-solaris* } } +// { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } } +// { dg-require-cstdint "" } +// { dg-require-gthreads "" } +// { dg-require-atomic-builtins "" } + +// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + + +#include <future> +#include <testsuite_hooks.h> + +struct Chucky +{ + Chucky() : copied(false) { } + + Chucky(const Chucky& other) : copied(true) + { + if (other.copied) + return; + other.copied = true; + using namespace std; + // Throw on first DECAY_COPY to simulate inability to start a new thread. + throw system_error(make_error_code(errc::resource_unavailable_try_again)); + } + + void operator()() const { } + + mutable bool copied; +}; + +void test01() +{ + bool test __attribute__((unused)) = true; + + using namespace std; + + future<void> f = async(Chucky{}); + VERIFY( f.wait_for(chrono::seconds(100)) == future_status::deferred ); + + bool caught = false; + try { + f = async(launch::async, Chucky{}); + } catch (const system_error&) { + caught = true; + } + VERIFY( caught ); +} + +int main() +{ + test01(); +} diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/assign/assign.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/assign/assign.cc index 6fd24a77cf3..fe4f96cde9b 100644 --- a/libstdc++-v3/testsuite/experimental/filesystem/path/assign/assign.cc +++ b/libstdc++-v3/testsuite/experimental/filesystem/path/assign/assign.cc @@ -36,6 +36,7 @@ test01() p2 = s.c_str(); compare_paths(p0, p2); +#if _GLIBCXX_USE_WCHAR_T std::wstring ws(s.begin(), s.end()); p3 = ws; @@ -43,6 +44,7 @@ test01() p4 = ws.c_str(); compare_paths(p0, p4); +#endif } } @@ -65,6 +67,7 @@ test02() p4.assign( s.c_str(), s.c_str() + s.size() ); compare_paths(p0, p4); +#if _GLIBCXX_USE_WCHAR_T std::wstring ws(s.begin(), s.end()); p5.assign(ws); @@ -78,6 +81,7 @@ test02() p8.assign( ws.c_str(), ws.c_str() + ws.size() ); compare_paths(p0, p8); +#endif } } diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/concat/strings.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/concat/strings.cc index e75e790a491..61ef7e40cfc 100644 --- a/libstdc++-v3/testsuite/experimental/filesystem/path/concat/strings.cc +++ b/libstdc++-v3/testsuite/experimental/filesystem/path/concat/strings.cc @@ -35,7 +35,11 @@ test01() VERIFY( p.filename() == "foobar" ); p += '/'; VERIFY( p.parent_path() == "/foobar" && p.filename() == "." ); +#if _GLIBCXX_USE_WCHAR_T p += L"baz.txt"; +#else + p += "baz.txt"; +#endif VERIFY( p.filename() == "baz.txt" ); p.concat("/dir/"); VERIFY( p.parent_path() == "/foobar/baz.txt/dir" && p.filename() == "." ); diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/range.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/range.cc index 03e50854772..2e8922913cf 100644 --- a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/range.cc +++ b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/range.cc @@ -37,19 +37,22 @@ test01() path p3( s.c_str() ); path p4( s.c_str(), s.c_str() + s.size() ); + compare_paths(p1, p2); + compare_paths(p1, p3); + compare_paths(p1, p4); + +#if _GLIBCXX_USE_WCHAR_T std::wstring ws(s.begin(), s.end()); path p5 = ws; path p6( ws.begin(), ws.end() ); path p7( ws.c_str() ); path p8( ws.c_str(), ws.c_str() + ws.size() ); - compare_paths(p1, p2); - compare_paths(p1, p3); - compare_paths(p1, p4); compare_paths(p1, p5); compare_paths(p1, p6); compare_paths(p1, p7); compare_paths(p1, p8); +#endif } } diff --git a/libstdc++-v3/testsuite/experimental/string_view/literals/types.cc b/libstdc++-v3/testsuite/experimental/string_view/literals/types.cc index 8b91c99b04c..bc2b2fc0a07 100644 --- a/libstdc++-v3/testsuite/experimental/string_view/literals/types.cc +++ b/libstdc++-v3/testsuite/experimental/string_view/literals/types.cc @@ -32,8 +32,10 @@ test01() static_assert(std::is_same<decltype(u8"Hello"sv), std::experimental::string_view>::value, "u8\"Hello\"s is std::string_view"); +#ifdef _GLIBCXX_USE_WCHAR_T static_assert(std::is_same<decltype(L"Hello"sv), std::experimental::wstring_view>::value, "L\"Hello\"s is std::wstring_view"); +#endif static_assert(std::is_same<decltype(u"Hello"sv), std::experimental::u16string_view>::value, "u\"Hello\"s is std::u16string_view"); diff --git a/libstdc++-v3/testsuite/experimental/string_view/literals/values.cc b/libstdc++-v3/testsuite/experimental/string_view/literals/values.cc index d96383b9461..3dd6b78a9fc 100644 --- a/libstdc++-v3/testsuite/experimental/string_view/literals/values.cc +++ b/libstdc++-v3/testsuite/experimental/string_view/literals/values.cc @@ -27,15 +27,19 @@ test01() using namespace std::experimental::literals::string_view_literals; std::experimental::string_view planet = "Mercury"sv; +#ifdef _GLIBCXX_USE_WCHAR_T std::experimental::wstring_view wplanet = L"Venus"sv; +#endif std::experimental::string_view u8planet = u8"Mars"sv; - std::experimental::u16string_view u16planet = u"Juiter"sv; + std::experimental::u16string_view u16planet = u"Jupiter"sv; std::experimental::u32string_view u32planet = U"Saturn"sv; VERIFY( planet == std::experimental::string_view("Mercury") ); +#ifdef _GLIBCXX_USE_WCHAR_T VERIFY( wplanet == std::experimental::wstring_view(L"Venus") ); +#endif VERIFY( u8planet == std::experimental::string_view(u8"Mars") ); - VERIFY( u16planet == std::experimental::u16string_view(u"Juiter") ); + VERIFY( u16planet == std::experimental::u16string_view(u"Jupiter") ); VERIFY( u32planet == std::experimental::u32string_view(U"Saturn") ); } diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 88738b739f1..769ac9434b2 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -409,6 +409,11 @@ proc libstdc++-dg-test { prog do_what extra_tool_flags } { # and-target file), but the defaults are lacking in goodness. set comp_output [$select_compile "$prog" "$output_file" "$compile_type" $options]; + set unsupported_message [libstdc++_check_unsupported_p $comp_output] + if { $unsupported_message != "" } { + set comp_output "::unsupported::$unsupported_message" + } + return [list $comp_output $output_file] } diff --git a/libstdc++-v3/testsuite/util/testsuite_fs.h b/libstdc++-v3/testsuite/util/testsuite_fs.h index 524972ece9b..44aef115ff3 100644 --- a/libstdc++-v3/testsuite/util/testsuite_fs.h +++ b/libstdc++-v3/testsuite/util/testsuite_fs.h @@ -73,7 +73,7 @@ namespace __gnu_test { std::experimental::filesystem::path p; #if defined(_GNU_SOURCE) || _XOPEN_SOURCE >= 500 || _POSIX_C_SOURCE >= 200112L - char tmp[] = "test.XXXXXX"; + char tmp[] = "filesystem-ts-test.XXXXXX"; int fd = ::mkstemp(tmp); if (fd == -1) throw std::experimental::filesystem::filesystem_error("mkstemp failed", @@ -83,7 +83,11 @@ namespace __gnu_test p = tmp; #else char buf[64]; - std::sprintf(buf, "test.%lu", (unsigned long)::getpid()); +#if _GLIBCXX_USE_C99 + std::snprintf(buf, 64, "filesystem-ts-test.%lu", (unsigned long)::getpid()); +#else + std::sprintf(buf, "filesystem-ts-test.%lu", (unsigned long)::getpid()); +#endif p = buf; #endif return p; |