Skip to content

Commit

Permalink
orm suppressed VS analyzer warning (C26816)
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed Aug 4, 2024
1 parent 10f91c6 commit aad3395
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/orm/tiny/concerns/hasrelationships.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,15 @@ namespace Concerns
checkRelationType<Result, Related>(lazyResult, relation,
QStringLiteral("getRelationValue"));

#if defined(_MSC_VER) && !defined(__clang__)
# pragma warning(push)
# pragma warning(disable : 26816)
#endif
// We are returning a copy here, MSVC C26816 is the false positive
return std::get<Result>(lazyResult);
#if defined(_MSC_VER) && !defined(__clang__)
# pragma warning(pop)
#endif
}

template<typename Derived, AllRelationsConcept ...AllRelations>
Expand Down

0 comments on commit aad3395

Please sign in to comment.