Replace std::ignore with boost::ignore_unused()
According to https://isocpp.org/blog/2016/09/quick-q-stdignore-for-ignoring-unused-variable std::ignore is not supposed to be used for this
This commit is contained in:
@@ -22,6 +22,9 @@
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#endif
|
||||
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/Unit.h>
|
||||
@@ -140,10 +143,10 @@ DocumentObjectExecReturn *FeatureTest::execute()
|
||||
|
||||
Enumeration enumObj4("Single item");
|
||||
enumObj4.setEnums(enums);
|
||||
std::ignore = enumObj4 == enumObj2;
|
||||
boost::ignore_unused(enumObj4 == enumObj2);
|
||||
enumObj4.setEnums(nullptr);
|
||||
enumObj4 = enumObj2;
|
||||
std::ignore = enumObj4 == enumObj4.getCStr();
|
||||
boost::ignore_unused(enumObj4 == enumObj4.getCStr());
|
||||
|
||||
Enumeration enumObj5(enums, enums[3]);
|
||||
enumObj5.isValue(enums[2]);
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#ifndef _PreComp_
|
||||
# include <memory>
|
||||
# include <sstream>
|
||||
# include <boost/core/ignore_unused.hpp>
|
||||
#endif
|
||||
|
||||
#include "Metadata.h"
|
||||
@@ -61,7 +62,7 @@ namespace MetadataInternal {
|
||||
void warning(const SAXParseException& toCatch)
|
||||
{
|
||||
// Don't deal with warnings at all
|
||||
std::ignore = toCatch;
|
||||
boost::ignore_unused(toCatch);
|
||||
}
|
||||
|
||||
void error(const SAXParseException& toCatch)
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
// Boost
|
||||
#include <boost_signals2.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
#include <boost/utility.hpp>
|
||||
|
||||
Reference in New Issue
Block a user