Skip to content

Commit ef50fd1

Browse files
committed
fix example
1 parent 8ed08cf commit ef50fd1

2 files changed

Lines changed: 31 additions & 30 deletions

File tree

examples/example_pointer_tag_pair.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include <cassert>
2+
#include <tuple>
23

34
import dice.template_library;
45

src/dice/template-library/pointer_tag_pair.cppm

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -116,34 +116,34 @@ namespace dice::template_library {
116116
}
117117
} // namespace dice::template_library
118118

119-
export extern "C++" {
120-
template<typename T, typename Tag, unsigned BitsRequested>
121-
struct std::tuple_size<dice::template_library::pointer_tag_pair<T, Tag, BitsRequested> > {
122-
static constexpr size_t value = 2;
123-
};
124-
125-
template<typename T, typename Tag, unsigned BitsRequested>
126-
struct std::tuple_size<dice::template_library::pointer_tag_pair<T, Tag, BitsRequested> const> {
127-
static constexpr size_t value = 2;
128-
};
129-
130-
template<typename T, typename Tag, unsigned BitsRequested>
131-
struct std::tuple_element<0, dice::template_library::pointer_tag_pair<T, Tag, BitsRequested> > {
132-
using type = T *;
133-
};
134-
135-
template<typename T, typename Tag, unsigned BitsRequested>
136-
struct std::tuple_element<1, dice::template_library::pointer_tag_pair<T, Tag, BitsRequested> > {
137-
using type = Tag;
138-
};
139-
140-
template<typename T, typename Tag, unsigned BitsRequested>
141-
struct std::tuple_element<0, dice::template_library::pointer_tag_pair<T, Tag, BitsRequested> const> {
142-
using type = T *;
143-
};
144-
145-
template<typename T, typename Tag, unsigned BitsRequested>
146-
struct std::tuple_element<1, dice::template_library::pointer_tag_pair<T, Tag, BitsRequested> const> {
147-
using type = Tag;
148-
};
119+
export {
120+
template<typename T, typename Tag, unsigned BitsRequested>
121+
struct std::tuple_size<dice::template_library::pointer_tag_pair<T, Tag, BitsRequested>> {
122+
static constexpr size_t value = 2;
123+
};
124+
125+
template<typename T, typename Tag, unsigned BitsRequested>
126+
struct std::tuple_size<dice::template_library::pointer_tag_pair<T, Tag, BitsRequested> const> {
127+
static constexpr size_t value = 2;
128+
};
129+
130+
template<typename T, typename Tag, unsigned BitsRequested>
131+
struct std::tuple_element<0, dice::template_library::pointer_tag_pair<T, Tag, BitsRequested>> {
132+
using type = T *;
133+
};
134+
135+
template<typename T, typename Tag, unsigned BitsRequested>
136+
struct std::tuple_element<1, dice::template_library::pointer_tag_pair<T, Tag, BitsRequested>> {
137+
using type = Tag;
138+
};
139+
140+
template<typename T, typename Tag, unsigned BitsRequested>
141+
struct std::tuple_element<0, dice::template_library::pointer_tag_pair<T, Tag, BitsRequested> const> {
142+
using type = T *;
143+
};
144+
145+
template<typename T, typename Tag, unsigned BitsRequested>
146+
struct std::tuple_element<1, dice::template_library::pointer_tag_pair<T, Tag, BitsRequested> const> {
147+
using type = Tag;
148+
};
149149
}

0 commit comments

Comments
 (0)