Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable build with gcc-14 #60

Merged
merged 6 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,13 @@ jobs:
compiler: llvm
- platform: ubuntu-latest
compiler: msvc
# llvm doesn't work with libstd++ until P2493R0 is done
# Re-enable after llvm-19
- platform: ubuntu-latest
compiler: llvm
- platform: macos-13
compiler: msvc
- platform: macos-13
compiler: gcc
# Temporary until gcc-14
- platform: ubuntu-latest
compiler: gcc
runs-on: ${{matrix.platform}}

steps:
Expand All @@ -44,6 +41,10 @@ jobs:

- name: Set gcc
run: |
# Temporary until gcc-14 is officialy released and available on the runner
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ noble main universe"
sudo apt update
sudo apt install gcc-14 g++-14
echo "CC=gcc-14" >> $GITHUB_ENV
echo "CXX=g++-14" >> $GITHUB_ENV
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion src/directory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ std::expected<std::shared_ptr<WfsItem>, WfsError> Directory::GetObject(const std
const auto attributes_block = FindObjectAttributes(block_, name);
if (!attributes_block.has_value())
return std::unexpected(attributes_block.error());
return WfsItem::Load(quota_, name, std::move(*attributes_block));
return WfsItem::Load(quota_, name, *attributes_block);
}

std::expected<std::shared_ptr<Directory>, WfsError> Directory::GetDirectory(const std::string& name) const {
Expand Down
2 changes: 1 addition & 1 deletion src/ptree.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class PTreeConstIterator {
bool is_end() const { return !leaf_ || leaf_->iterator.is_end(); }

private:
const NodeRefCreator* ptree_;
const NodeRefCreator* ptree_{nullptr};
std::vector<parent_node_info> parents_;
std::optional<leaf_node_info> leaf_;
};
Expand Down