Skip to content

Commit 713f88c

Browse files
committed
[BCL, Tagged, GCC] Fix, strange error if GCC compiler is used.
There is template method get in bcl::tagged_tuple and there is a structure bcl::tags::get. This is strange, but GCC try to use structure instead of a method. We use type of a tuple to fix this situation.
1 parent c9624b0 commit 713f88c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/bcl/tagged.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@ void for_each(tagged_tuple<Taggeds...> &T, Function &&F, std::true_type) {
361361
using TupleT = tagged_tuple<Taggeds...>;
362362
using TagT = typename tagged_tuple_tag<Idx, TupleT>::type;
363363
#if defined __GNUC__ || defined __clang__ || defined _MSC_VER && _MSC_VER >= 1911
364-
F.template operator()<get_tagged<TagT, Taggeds...>>(T.template get<TagT>());
364+
F.template operator()<get_tagged<TagT, Taggeds...>>(
365+
T.TupleT:: template get<TagT>());
365366
#else
366367
F.operator()<get_tagged<TagT, Taggeds...>>(T.get<TagT>());
367368
#endif
@@ -376,7 +377,8 @@ void for_each(const tagged_tuple<Taggeds...> &T, Function &&F, std::true_type) {
376377
using TupleT = tagged_tuple<Taggeds...>;
377378
using TagT = typename tagged_tuple_tag<Idx, TupleT>::type;
378379
#if defined __GNUC__ || defined __clang__ || defined _MSC_VER && _MSC_VER >= 1911
379-
F.template operator()<get_tagged<TagT, Taggeds...>>(T.template get<TagT>());
380+
F.template operator()<get_tagged<TagT, Taggeds...>>(
381+
T.TupleT:: template get<TagT>());
380382
#else
381383
F.operator()<get_tagged<TagT, Taggeds...>>(T.get<TagT>());
382384
#endif

0 commit comments

Comments
 (0)