aboutsummaryrefslogtreecommitdiff
path: root/bpkg/types
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-02-12 16:34:29 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-02-12 16:34:29 +0200
commit4fd0df2573341824eea5edfaf45be33997ce56ce (patch)
tree71338eb0045c9eb734178cafb2fabd128d4076da /bpkg/types
parent2c58968b94f348911372e8afb47626d33825757b (diff)
<types>/<utility> scheme cleanup
Diffstat (limited to 'bpkg/types')
-rw-r--r--bpkg/types41
1 files changed, 32 insertions, 9 deletions
diff --git a/bpkg/types b/bpkg/types
index b0db478..aa88701 100644
--- a/bpkg/types
+++ b/bpkg/types
@@ -7,11 +7,17 @@
#include <vector>
#include <string>
-#include <memory> // shared_ptr, unique_ptr
-#include <cstddef> // size_t
-#include <cstdint> // uint{8,16,32,64}_t
+#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 <odb/lazy-ptr.hxx>
@@ -26,8 +32,18 @@ namespace bpkg
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::weak_ptr;
using std::vector;
@@ -37,16 +53,21 @@ namespace bpkg
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;
- // Smart pointers
+ // ODB smart pointers.
//
- using std::unique_ptr;
-
- using std::shared_ptr;
- using std::weak_ptr;
-
using odb::lazy_shared_ptr;
using odb::lazy_weak_ptr;
@@ -60,6 +81,8 @@ namespace bpkg
using paths = std::vector<path>;
using dir_paths = std::vector<dir_path>;
+ // Custom path printing.
+ //
inline ostream&
operator<< (ostream& os, const path& p) {return os << p.string ();}