Skip to content

Commit

Permalink
fix clang incomplete return type error (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
avagordon01 authored Jul 24, 2024
1 parent 7e817e6 commit f118693
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
10 changes: 10 additions & 0 deletions include/avk/avk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,16 @@ namespace avk
#include "avk/commands.hpp"
#include "avk/queue.hpp"

namespace avk {
template<typename Ret>
[[nodiscard]] Ret buffer_t::read(size_t aMetaDataIndex) {
auto memProps = memory_properties();
Ret result;
read_into(static_cast<void*>(&result), aMetaDataIndex);
return result;
}
}

namespace avk
{
// T must provide:
Expand Down
7 changes: 1 addition & 6 deletions include/avk/buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,7 @@ namespace avk
* // ^ given that mMyBuffer is a buffer backed by host visible memory and hence, does not require commands to be executed.
*/
template<typename Ret>
[[nodiscard]] Ret read(size_t aMetaDataIndex) {
auto memProps = memory_properties();
Ret result;
read_into(static_cast<void*>(&result), aMetaDataIndex);
return result;
}
[[nodiscard]] Ret read(size_t aMetaDataIndex);

[[nodiscard]] const auto* root_ptr() const { return mRoot; }

Expand Down

0 comments on commit f118693

Please sign in to comment.