Changeset f4a42661 in mainline for uspace/lib/cpp


Ignore:
Timestamp:
2023-10-22T14:04:49Z (21 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
590cb6d2
Parents:
b2cbc0b (diff), c63c2bb (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge fixes to issues found while updating toolchain

Location:
uspace/lib/cpp
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/__bits/adt/hash_table.hpp

    rb2cbc0b rf4a42661  
    252252            void swap(hash_table& other)
    253253                noexcept(allocator_traits<allocator_type>::is_always_equal::value &&
    254                          noexcept(swap(declval<Hasher&>(), declval<Hasher&>())) &&
    255                          noexcept(swap(declval<KeyEq&>(), declval<KeyEq&>())))
     254                         noexcept(std::swap(declval<Hasher&>(), declval<Hasher&>())) &&
     255                         noexcept(std::swap(declval<KeyEq&>(), declval<KeyEq&>())))
    256256            {
    257257                std::swap(table_, other.table_);
  • uspace/lib/cpp/include/__bits/adt/rbtree.hpp

    rb2cbc0b rf4a42661  
    233233            void swap(rbtree& other)
    234234                noexcept(allocator_traits<allocator_type>::is_always_equal::value &&
    235                          noexcept(swap(declval<KeyComp&>(), declval<KeyComp&>())))
     235                         noexcept(std::swap(declval<KeyComp&>(), declval<KeyComp&>())))
    236236            {
    237237                std::swap(root_, other.root_);
  • uspace/lib/cpp/include/__bits/string/string.hpp

    rb2cbc0b rf4a42661  
    521521
    522522            basic_string(size_type n, value_type c, const allocator_type& alloc = allocator_type{})
    523                 : data_{}, size_{n}, capacity_{n}, allocator_{alloc}
     523                : data_{}, size_{n}, capacity_{n + 1}, allocator_{alloc}
    524524            {
    525525                data_ = allocator_.allocate(capacity_);
     
    908908            {
    909909                // TODO: if (n > max_size()) throw length_error.
    910                 resize_without_copy_(n);
     910                resize_without_copy_(n + 1);
    911911                traits_type::copy(begin(), str, n);
    912912                size_ = n;
  • uspace/lib/cpp/src/__bits/unwind.cpp

    rb2cbc0b rf4a42661  
    3030#include <cstdint>
    3131#include <cstdlib>
     32#include <typeinfo>
    3233
    3334namespace __cxxabiv1
  • uspace/lib/cpp/src/future.cpp

    rb2cbc0b rf4a42661  
    8484    const char* future_error::what() const noexcept
    8585    {
    86         return code().message().c_str();
     86        /*
     87         * FIXME
     88         * Following code would be optimal but the message string is
     89         * actually destroyed before the function returns so we would
     90         * be returning a dangling pointer. No simple fix available, hence
     91         * we use the ugly hack.
     92         */
     93        //return code().message().c_str();
     94#define QUOTE_ARG(arg) #arg
     95        return "future_error, see " __FILE__ ":" QUOTE_ARG(__LINE__);
    8796    }
    8897}
Note: See TracChangeset for help on using the changeset viewer.