This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Additional headers under include/experimental/


On 03/07/14 11:35 +0100, Jonathan Wakely wrote:
I'm working on parts of the Filesystem TS and think it makes sense to
split it up into separate headers for path, directory utils and the
free functions, then include those from <experimental/filesystem>,
otherwise it's going to be a whopper.

Currently I've created include/experimental/fs_path.h for the path
class, does that seem OK?

Would a new include/experimental/bits directory be better, so that
only official headers required by a TS are in include/experimental?
(That would imply moving string_view.tcc to another directory).

I'm thinking about adding an include/experimental/bits directory
again, for internal pieces of the Networking TS.

I didn't do it last time because I was too lazy, but as I'm adding
more non-public headers to include/experimental I think it makes
sense.

That patch looks like this, plus moving erase_if.h, string_view.tcc
and fs_{dir,fwd,ops,path}.h to the new bits sub-directory.

Anyone else got an opinion?


commit e4f2b74da0de2f49bb01cf0cc6ad5145b6b651f8
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Oct 6 13:03:31 2015 +0100

    Add include/experimental/bits dir

diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index 74100f2..15b7dd8 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: stamp-experimental ${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/experimental/filesystem b/libstdc++-v3/include/experimental/filesystem
index db7ab11..6713463 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 e4b3620..89bf260 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 c742d91..709fe32 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 9dca400..9931ad0 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 d3a578e..c80c382 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 2e5e08a..8461f9c 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)
 {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]