Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variant,tuple: fix/silence misc warnings #564

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions include/EASTL/tuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
EA_DISABLE_VC_WARNING(4623) // warning C4623: default constructor was implicitly defined as deleted
EA_DISABLE_VC_WARNING(4625) // warning C4625: copy constructor was implicitly defined as deleted
EA_DISABLE_VC_WARNING(4510) // warning C4510: default constructor could not be generated
EA_DISABLE_VC_WARNING(5267) // warning C5267: definition of implicit copy constructor for '...' is deprecated because it has a user-provided assignment operator


#if EASTL_TUPLE_ENABLED

Expand Down Expand Up @@ -991,4 +993,5 @@ EA_CONSTEXPR decltype(auto) apply(F&& f, Tuple&& t)
EA_RESTORE_VC_WARNING()
EA_RESTORE_VC_WARNING()
EA_RESTORE_VC_WARNING()
EA_RESTORE_VC_WARNING()
#endif // EASTL_TUPLE_H
6 changes: 2 additions & 4 deletions include/EASTL/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
static_assert(false, "eastl::variant requires a C++14 compatible compiler (at least) ");
#endif

EA_DISABLE_VC_WARNING(4625) // copy constructor was implicitly defined as deleted
EA_DISABLE_VC_WARNING(4625 5267) // copy constructor was implicitly defined as deleted

namespace eastl
{
Expand Down Expand Up @@ -1336,9 +1336,8 @@ namespace eastl
// variant<int, long, string> v = "Hello, Variant";
// visit(MyVisitor{}, v); // calls MyVisitor::operator()(string) {}
//
EA_DISABLE_VC_WARNING(4100) // warning C4100: 't': unreferenced formal parameter
template <typename... Variants>
static EA_CPP14_CONSTEXPR void visit_throw_bad_variant_access(Variants&&... variants)
static EA_CPP14_CONSTEXPR void visit_throw_bad_variant_access(EA_MAYBE_UNUSED Variants&&... variants)
{
#if EASTL_EXCEPTIONS_ENABLED
using bool_array_type = bool[];
Expand All @@ -1352,7 +1351,6 @@ namespace eastl
}
#endif
}
EA_RESTORE_VC_WARNING()

template <typename... Variants>
static EA_CONSTEXPR void visit_static_assert_check(Variants&&...)
Expand Down
Loading