Skip to content

Commit 15d283d

Browse files
committed
WIP: use FWD() macro, wait for PR in stdx to finalise
Waiting for intel/cpp-std-extensions#45 to be merged before we can proceed.
1 parent 9f17802 commit 15d283d

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

include/msg/rle_indexed_handler.hpp

+13-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
#include <msg/detail/rle_codec.hpp>
55

66
#include <stdx/compiler.hpp>
7+
#include <stdx/utility.hpp>
8+
9+
#ifndef FWD
10+
// TODO: remove when stdx contains a FWD() macro
11+
#define FWD(x) std::forward<decltype(x)>(x)
12+
#else
13+
#error "Remove the FWD() declaration in favour of the one from stdx"
14+
#endif
715

816
namespace msg {
917

@@ -14,13 +22,15 @@ struct rle_indices : IndicesT... {
1422

1523
constexpr auto operator()(auto const &data) const {
1624
// proxy to allow intersection without materializing a full bitset.
17-
return detail::rle_intersect{std::forward<decltype(storage.decode(
18-
this->IndicesT::operator()(data)))>(
19-
storage.decode(this->IndicesT::operator()(data)))...};
25+
return detail::rle_intersect{
26+
FWD(storage.decode(this->IndicesT::operator()(data)))...};
2027
}
2128

2229
// index entries will map into this storage to decode RLE data
2330
RleStorageT storage;
2431
};
2532

2633
} // namespace msg
34+
35+
// TODO: remove when stdx contains a FWD() macro
36+
#undef FWD

0 commit comments

Comments
 (0)