aboutsummaryrefslogtreecommitdiff
path: root/build2/types
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-02-12 16:10:48 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-02-12 16:10:48 +0200
commit4e665067ff264c55086fdfb776a95b0fbb4d432c (patch)
tree2371403561c0a3d754792f68d2515cae71dff565 /build2/types
parent00ed965e4a29f66666d2bf4372d2d6919c29664e (diff)
<types>/<utility> scheme cleanup
Diffstat (limited to 'build2/types')
-rw-r--r--build2/types53
1 files changed, 44 insertions, 9 deletions
diff --git a/build2/types b/build2/types
index 35aaa58..0c34efb 100644
--- a/build2/types
+++ b/build2/types
@@ -5,16 +5,22 @@
#ifndef BUILD2_TYPES
#define BUILD2_TYPES
-#include <iosfwd> // ostream
#include <vector>
#include <string>
-#include <utility> // pair
-#include <memory> // unique_ptr, shared_ptr
-#include <cstddef> // size_t
-#include <cstdint> // uint{8,16,32,64}_t
-#include <functional> // reference_wrapper
+#include <memory> // unique_ptr, shared_ptr
+#include <utility> // pair
+#include <cstddef> // size_t, nullptr_t
+#include <cstdint> // uint{8,16,32,64}_t
+#include <istream>
+#include <ostream>
+#include <functional> // function, reference_wrapper
+
+#include <exception> // exception
+#include <stdexcept> // logic_error, invalid_argument, runtime_error
+#include <system_error>
#include <butl/path>
+#include <butl/optional>
#include <butl/timestamp>
#include <build2/name>
@@ -27,22 +33,40 @@ namespace build2
using std::uint16_t;
using std::uint32_t;
using std::uint64_t;
+
using std::size_t;
+ using std::nullptr_t;
using std::pair;
using std::string;
+ using std::function;
+ using std::reference_wrapper;
+
using std::unique_ptr;
using std::shared_ptr;
- using std::reference_wrapper;
+ using std::weak_ptr;
+
using std::vector;
using strings = vector<string>;
using cstrings = vector<const char*>;
- // <iosfwd>
- //
+ using std::istream;
using std::ostream;
+ // Exceptions. While <exception> is included, there is no using for
+ // std::exception -- use qualified.
+ //
+ using std::logic_error;
+ using std::invalid_argument;
+ using std::runtime_error;
+ using std::system_error;
+
+ // <butl/optional>
+ //
+ using butl::optional;
+ using butl::nullopt;
+
// <butl/path>
//
using butl::path;
@@ -53,6 +77,14 @@ namespace build2
using paths = std::vector<path>;
using dir_paths = std::vector<dir_path>;
+ // Custom path printing (implemented in utility.cxx).
+ //
+ ostream&
+ operator<< (ostream&, const path&);
+
+ ostream&
+ operator<< (ostream&, const dir_path&);
+
// <butl/timestamp>
//
using butl::system_clock;
@@ -61,6 +93,9 @@ namespace build2
using butl::timestamp_unknown;
using butl::timestamp_nonexistent;
using butl::operator<<;
+
+ // <build2/name>
+ //
}
#endif // BUILD2_TYPES