47 std::unique_ptr<int>
ptr;
60 ptr = f.
ptr ? std::make_unique<int>(*f.
ptr) :
nullptr;
76 requires std::convertible_to<T, int>
82 for (
size_t i = 0; i < s.
size(); ++i)
92 requires std::constructible_from<T, int>
97 for (
int i = 0; i < n; ++i)
113 catch (
const std::invalid_argument &) { n = 1000; }
114 catch (
const std::out_of_range &) { n = 1000; }
118 for (
int i = 0; i < n; ++i)
127 catch (
const std::invalid_argument &) {
m = n / 4; }
128 catch (
const std::out_of_range &) {
m = n / 4; }
132 cout <<
"Extracting " <<
m <<
" items" <<
endl;
133 for (
int i = 0; i <
m; ++i)
134 cout << s.
get() <<
" ";
Exception handling system with formatted messages for Aleph-w.
#define ah_domain_error_if(C)
Throws std::domain_error if condition holds.
#define ah_invalid_argument_if(C)
Throws std::invalid_argument if condition holds.
Simple, scalable and fast dynamic array.
size_t size() const noexcept
Return the number of elements.
constexpr size_t capacity() const noexcept
The type of element of array.
T get(const size_t i=1)
Remove i elements from the end.
T & put(const T &item)
Put a copy of item at the end of sequence.
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
Main namespace for Aleph-w library functions.
std::decay_t< typename HeadC::Item_Type > T
std::unique_ptr< int > ptr
Foo(Foo &&f) noexcept=default
Foo & operator=(const Foo &f)
void print(const MemArray< T > &s)
MemArray< T > create_memarray(int n)
FooMap m(5, fst_unit_pair_hash, snd_unit_pair_hash)
Simple, scalable, contiguous dynamic array.