Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions include/rfl/Variant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class Variant {
template <class F, IndexType... _is>
void do_visit_no_result(F& _f, bool* _visited,
std::integer_sequence<IndexType, _is...>) {
auto visit_one = [this]<IndexType _i>(const F& _f, bool* _visited,
auto visit_one = [this]<IndexType _i>(F& _f, bool* _visited,
Index<_i>) {
if (!*_visited && index_ == _i) {
_f(get_alternative<_i>());
Expand All @@ -236,7 +236,7 @@ class Variant {
template <class F, IndexType... _is>
void do_visit_no_result(F& _f, bool* _visited,
std::integer_sequence<IndexType, _is...>) const {
auto visit_one = [this]<IndexType _i>(const F& _f, bool* _visited,
auto visit_one = [this]<IndexType _i>(F& _f, bool* _visited,
Index<_i>) {
if (!*_visited && index_ == _i) {
_f(get_alternative<_i>());
Expand Down Expand Up @@ -275,7 +275,7 @@ class Variant {
template <class F, class ResultType, IndexType... _is>
void do_visit_with_result(F& _f, std::optional<ResultType>* _result,
std::integer_sequence<IndexType, _is...>) {
auto visit_one = [this]<IndexType _i>(const F& _f,
auto visit_one = [this]<IndexType _i>(F& _f,
std::optional<ResultType>* _result,
Index<_i>) {
if (!*_result && index_ == _i) {
Expand All @@ -288,7 +288,7 @@ class Variant {
template <class F, class ResultType, IndexType... _is>
void do_visit_with_result(F& _f, std::optional<ResultType>* _result,
std::integer_sequence<IndexType, _is...>) const {
auto visit_one = [this]<IndexType _i>(const F& _f,
auto visit_one = [this]<IndexType _i>(F& _f,
std::optional<ResultType>* _result,
Index<_i>) {
if (!*_result && index_ == _i) {
Expand Down Expand Up @@ -328,7 +328,7 @@ class Variant {
void do_visit_with_reference(F& _f, ResultType** _result,
std::integer_sequence<IndexType, _is...>) {
const auto visit_one = [this]<IndexType _i>(
const F& _f, ResultType** _result, Index<_i>) {
F& _f, ResultType** _result, Index<_i>) {
if (!*_result && index_ == _i) {
*_result = &_f(get_alternative<_i>());
}
Expand All @@ -340,7 +340,7 @@ class Variant {
void do_visit_with_reference(F& _f, ResultType** _result,
std::integer_sequence<IndexType, _is...>) const {
const auto visit_one = [this]<IndexType _i>(
const F& _f, ResultType** _result, Index<_i>) {
F& _f, ResultType** _result, Index<_i>) {
if (!*_result && index_ == _i) {
*_result = &_f(get_alternative<_i>());
}
Expand Down
Loading