Skip to content

Commit

Permalink
workaround for the MSVC / Visual Studio bug of its latest version (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
Necktschnagge authored Nov 19, 2023
1 parent c177937 commit 2715f55
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/logger.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "predefined.h"
#include "logger.h"

#include "internal_error.h"
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#include "predefined.h"
#include "logger.h"

#include "mainwindow.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#include "predefined.h"
#include "mainwindow.h"
#include "./ui_mainwindow.h"
#include <QMessageBox>
Expand Down
7 changes: 7 additions & 0 deletions src/predefined.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#pragma once

#ifdef _MSC_VER
//1 > C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xutility(1141, 31) : warning C4996 : 'stdext::checked_array_iterator<T *>' : warning STL4043 : stdext::checked_array_iterator, stdext::unchecked_array_iterator, and related factory functions are non - Standard extensions and will be removed in the future.std::span(since C++20) and gsl::span can be used instead.You can define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING or _SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS to suppress this warning.
#define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING
#endif // _MSC_VER

0 comments on commit 2715f55

Please sign in to comment.