Skip to content

Commit

Permalink
Merge pull request #23 from SergeyIvanov87/clang_fix
Browse files Browse the repository at this point in the history
Fix clang compilation
  • Loading branch information
SergeyIvanov87 authored Oct 24, 2023
2 parents 77a2348 + 4d9274b commit ef2e511
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion txml/applications/json/include/Deserializer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ std::optional<DeserializedItem> FromJSON<TEMPL_ARGS_DEF>::deserialize_tag_impl(c
return {};
}

return std::make_optional<DeserializedItem>((begin_it++).value().get<typename DeserializedItem::value_t>());
return std::make_optional<DeserializedItem>((begin_it++).value().template get<typename DeserializedItem::value_t>());
}

template<TEMPL_ARGS_DECL>
Expand Down
5 changes: 5 additions & 0 deletions txml/include/engine/fwd/DispatcherBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ struct DispatcherVirtualBase : public Contexts...
{
}

VirtualBaseContext& get_virtual_base()
{
return *static_cast<VirtualBaseContext*>(this);
}

template <class InElement, class Tracer>
typename std::add_pointer<typename details::ContextResolver<InElement, Contexts...>::type>::type
dispatch_context(Tracer &tracer) {
Expand Down
11 changes: 6 additions & 5 deletions txml/include/engine/fwd/Helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ struct DispatchableClass : public BaseImpl < Class_Aggregator, __VA_ARGS__ >
{ \
using base_t = BaseImpl < Class_Aggregator, __VA_ARGS__ >; \
using virtual_base_t = typename base_t::core_t; \
using base_t::BaseImpl; \
using base_t::base_t; \
static constexpr const char *name() { return #DispatchableClass"<"#__VA_ARGS__">"; } \
static constexpr std::string_view enumerate() { return enumerate_impl<__VA_ARGS__>(); } \
template<class ...Elements> \
Expand Down Expand Up @@ -132,9 +132,10 @@ struct DispatchableClass : public BaseImpl < Class_Aggregator, __VA_ARGS__ >
struct Class_Aggregator : \
public txml::SerializerSchemaDispatcher<txml::utils::core_t_extractor_t<__VA_ARGS__>, __VA_ARGS__ > \
{ \
using base_t = \
txml::SerializerSchemaDispatcher <txml::utils::core_t_extractor_t<__VA_ARGS__>, __VA_ARGS__ >; \
using virtual_base_t = txml::utils::core_t_extractor_t<__VA_ARGS__>; \
using base_t = \
txml::SerializerSchemaDispatcher <virtual_base_t, __VA_ARGS__ >; \
\
static constexpr const char *name() { return #Class_Aggregator"<"#__VA_ARGS__">"; } \
\
Class_Aggregator(typename virtual_base_t::ctor_arg_t shared_arg = virtual_base_t::default_ctor_arg()) : \
Expand All @@ -157,7 +158,7 @@ struct DispatchableClass : public BaseImpl < Class_Aggregator, __VA_ARGS__ >
{ \
using base_t = BaseImpl < Class_Aggregator, __VA_ARGS__ >; \
using virtual_base_t = typename base_t::core_t; \
using base_t::BaseImpl; \
using base_t::base_t; \
static constexpr const char *name() { return #DispatchableClass"<"#__VA_ARGS__">"; } \
static constexpr std::string_view enumerate() { return enumerate_impl<__VA_ARGS__>(); } \
template<class ...Elements> \
Expand Down Expand Up @@ -214,7 +215,7 @@ struct DispatchableClass : public BaseImpl < Class_Aggregator, __VA_ARGS__ >
{ \
using base_t = BaseImpl < Class_Aggregator, __VA_ARGS__ >; \
using virtual_base_t = typename base_t::core_t; \
using base_t::BaseImpl; \
using base_t::base_t; \
static constexpr const char *name() { return #DispatchableClass":"#Class_Aggregator"<"#__VA_ARGS__">"; } \
static constexpr std::string_view enumerate() { return enumerate_impl<__VA_ARGS__>(); } \
template<class ...Elements> \
Expand Down

0 comments on commit ef2e511

Please sign in to comment.