diff options
Diffstat (limited to 'bpkg/types')
-rw-r--r-- | bpkg/types | 41 |
1 files changed, 32 insertions, 9 deletions
@@ -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 ();} |