From 4fd0df2573341824eea5edfaf45be33997ce56ce Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 12 Feb 2016 16:34:29 +0200 Subject: / scheme cleanup --- bpkg/types | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) (limited to 'bpkg/types') diff --git a/bpkg/types b/bpkg/types index b0db478..aa88701 100644 --- a/bpkg/types +++ b/bpkg/types @@ -7,11 +7,17 @@ #include #include -#include // shared_ptr, unique_ptr -#include // size_t -#include // uint{8,16,32,64}_t +#include // unique_ptr, shared_ptr +#include // pair +#include // size_t, nullptr_t +#include // uint{8,16,32,64}_t #include #include +#include // function, reference_wrapper + +#include // exception +#include // logic_error, invalid_argument, runtime_error +#include #include @@ -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 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; + + // + // 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; using dir_paths = std::vector; + // Custom path printing. + // inline ostream& operator<< (ostream& os, const path& p) {return os << p.string ();} -- cgit v1.1