Remove the usage of boost::noncopyable

Prior to this half of the codebase used explicit deleted copy constructors, the others used boost::noncopyable.
This commit is contained in:
Alex Beregszaszi
2021-04-23 14:57:01 +01:00
parent 15decd2413
commit e39433198d
20 changed files with 70 additions and 38 deletions
@@ -26,7 +26,6 @@
#include <libsolidity/ast/ASTForward.h>
#include <liblangutil/Exceptions.h>
#include <liblangutil/SourceLocation.h>
#include <boost/noncopyable.hpp>
namespace solidity::frontend
{
@@ -22,7 +22,6 @@
#include <libsolidity/ast/ASTAnnotations.h>
#include <liblangutil/EVMVersion.h>
#include <boost/noncopyable.hpp>
#include <list>
#include <map>
+5 -2
View File
@@ -24,7 +24,6 @@
#pragma once
#include <libsolidity/ast/ASTForward.h>
#include <boost/noncopyable.hpp>
#include <map>
#include <memory>
#include <string>
@@ -41,9 +40,13 @@ class Type; // forward
* @note must not be destroyed or moved during compilation as its objects can be referenced from
* other objects.
*/
class GlobalContext: private boost::noncopyable
class GlobalContext
{
public:
/// Noncopyable.
GlobalContext(GlobalContext const&) = delete;
GlobalContext& operator=(GlobalContext const&) = delete;
GlobalContext();
void setCurrentContract(ContractDefinition const& _contract);
void resetCurrentContract() { m_currentContract = nullptr; }
+5 -3
View File
@@ -31,8 +31,6 @@
#include <liblangutil/EVMVersion.h>
#include <boost/noncopyable.hpp>
#include <list>
#include <map>
@@ -48,9 +46,13 @@ namespace solidity::frontend
* Resolves name references, typenames and sets the (explicitly given) types for all variable
* declarations.
*/
class NameAndTypeResolver: private boost::noncopyable
class NameAndTypeResolver
{
public:
/// Noncopyable.
NameAndTypeResolver(NameAndTypeResolver const&) = delete;
NameAndTypeResolver& operator=(NameAndTypeResolver const&) = delete;
/// Creates the resolver with the given declarations added to the global scope.
/// @param _scopes mapping of scopes to be used (usually default constructed), these
/// are filled during the lifetime of this object.
@@ -28,7 +28,6 @@
#include <liblangutil/EVMVersion.h>
#include <libyul/optimiser/ASTWalker.h>
#include <boost/noncopyable.hpp>
#include <list>
#include <map>