Delete macros RTC_DISALLOW_ASSIGN and RTC_DISALLOW_IMPLICIT_CONSTRUCTORS

The former was unused, the latter is replaced with the explicit C++11
deletions. The related RTC_DISALLOW_COPY_AND_ASSIGN is left for now,
it is used in a lot more places.

Bug: None
Change-Id: I49503e7f2b9ff43c6285f8695833479bbc18c380
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185500
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32224}
diff --git a/api/transport/BUILD.gn b/api/transport/BUILD.gn
index d2da445..6a7cc57 100644
--- a/api/transport/BUILD.gn
+++ b/api/transport/BUILD.gn
@@ -144,7 +144,6 @@
     deps = [
       ":stun_types",
       "../../rtc_base",
-      "../../rtc_base:macromagic",
       "../../rtc_base:rtc_base_approved",
       "../../test:test_support",
       "//testing/gtest",
diff --git a/audio/audio_receive_stream.h b/audio/audio_receive_stream.h
index eeb876c..32f8b60 100644
--- a/audio/audio_receive_stream.h
+++ b/audio/audio_receive_stream.h
@@ -21,7 +21,6 @@
 #include "call/audio_receive_stream.h"
 #include "call/syncable.h"
 #include "modules/rtp_rtcp/source/source_tracker.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/thread_checker.h"
 #include "system_wrappers/include/clock.h"
 
@@ -61,6 +60,11 @@
       const rtc::scoped_refptr<webrtc::AudioState>& audio_state,
       webrtc::RtcEventLog* event_log,
       std::unique_ptr<voe::ChannelReceiveInterface> channel_receive);
+
+  AudioReceiveStream() = delete;
+  AudioReceiveStream(const AudioReceiveStream&) = delete;
+  AudioReceiveStream& operator=(const AudioReceiveStream&) = delete;
+
   ~AudioReceiveStream() override;
 
   // webrtc::AudioReceiveStream implementation.
@@ -113,8 +117,6 @@
   bool playing_ RTC_GUARDED_BY(worker_thread_checker_) = false;
 
   std::unique_ptr<RtpStreamReceiverInterface> rtp_stream_receiver_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioReceiveStream);
 };
 }  // namespace internal
 }  // namespace webrtc
diff --git a/audio/audio_send_stream.h b/audio/audio_send_stream.h
index 7bc3183..12fcb9f 100644
--- a/audio/audio_send_stream.h
+++ b/audio/audio_send_stream.h
@@ -21,7 +21,6 @@
 #include "call/audio_state.h"
 #include "call/bitrate_allocator.h"
 #include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/experiments/struct_parameters_parser.h"
 #include "rtc_base/race_checker.h"
 #include "rtc_base/synchronization/mutex.h"
@@ -75,6 +74,11 @@
                   RtcEventLog* event_log,
                   const absl::optional<RtpState>& suspended_rtp_state,
                   std::unique_ptr<voe::ChannelSendInterface> channel_send);
+
+  AudioSendStream() = delete;
+  AudioSendStream(const AudioSendStream&) = delete;
+  AudioSendStream& operator=(const AudioSendStream&) = delete;
+
   ~AudioSendStream() override;
 
   // webrtc::AudioSendStream implementation.
@@ -206,8 +210,6 @@
   size_t total_packet_overhead_bytes_ RTC_GUARDED_BY(worker_queue_) = 0;
   absl::optional<std::pair<TimeDelta, TimeDelta>> frame_length_range_
       RTC_GUARDED_BY(worker_queue_);
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream);
 };
 }  // namespace internal
 }  // namespace webrtc
diff --git a/audio/audio_state.h b/audio/audio_state.h
index 70c7208..5e76642 100644
--- a/audio/audio_state.h
+++ b/audio/audio_state.h
@@ -18,7 +18,6 @@
 #include "audio/audio_transport_impl.h"
 #include "audio/null_audio_poller.h"
 #include "call/audio_state.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/ref_count.h"
 #include "rtc_base/thread_checker.h"
 
@@ -32,6 +31,11 @@
 class AudioState : public webrtc::AudioState {
  public:
   explicit AudioState(const AudioState::Config& config);
+
+  AudioState() = delete;
+  AudioState(const AudioState&) = delete;
+  AudioState& operator=(const AudioState&) = delete;
+
   ~AudioState() override;
 
   AudioProcessing* audio_processing() override;
@@ -82,8 +86,6 @@
     size_t num_channels = 0;
   };
   std::map<webrtc::AudioSendStream*, StreamProperties> sending_streams_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioState);
 };
 }  // namespace internal
 }  // namespace webrtc
diff --git a/audio/audio_transport_impl.h b/audio/audio_transport_impl.h
index 1643a29..5b885bd 100644
--- a/audio/audio_transport_impl.h
+++ b/audio/audio_transport_impl.h
@@ -19,7 +19,6 @@
 #include "modules/audio_device/include/audio_device.h"
 #include "modules/audio_processing/include/audio_processing.h"
 #include "modules/audio_processing/typing_detection.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/synchronization/mutex.h"
 #include "rtc_base/thread_annotations.h"
 
@@ -30,6 +29,11 @@
 class AudioTransportImpl : public AudioTransport {
  public:
   AudioTransportImpl(AudioMixer* mixer, AudioProcessing* audio_processing);
+
+  AudioTransportImpl() = delete;
+  AudioTransportImpl(const AudioTransportImpl&) = delete;
+  AudioTransportImpl& operator=(const AudioTransportImpl&) = delete;
+
   ~AudioTransportImpl() override;
 
   int32_t RecordedDataIsAvailable(const void* audioSamples,
@@ -85,8 +89,6 @@
   AudioFrame mixed_frame_;
   // Converts mixed audio to the audio device output rate.
   PushResampler<int16_t> render_resampler_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioTransportImpl);
 };
 }  // namespace webrtc
 
diff --git a/common_audio/smoothing_filter.h b/common_audio/smoothing_filter.h
index e5f561e..e96d52a 100644
--- a/common_audio/smoothing_filter.h
+++ b/common_audio/smoothing_filter.h
@@ -14,7 +14,6 @@
 #include <stdint.h>
 
 #include "absl/types/optional.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -42,6 +41,11 @@
   // will be set to |init_time_ms| first and can be changed through
   // |SetTimeConstantMs|.
   explicit SmoothingFilterImpl(int init_time_ms);
+
+  SmoothingFilterImpl() = delete;
+  SmoothingFilterImpl(const SmoothingFilterImpl&) = delete;
+  SmoothingFilterImpl& operator=(const SmoothingFilterImpl&) = delete;
+
   ~SmoothingFilterImpl() override;
 
   void AddSample(float sample) override;
@@ -64,8 +68,6 @@
   float alpha_;
   float state_;
   int64_t last_state_time_ms_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(SmoothingFilterImpl);
 };
 
 }  // namespace webrtc
diff --git a/common_audio/window_generator.h b/common_audio/window_generator.h
index 0cbe24a..c0a89c4 100644
--- a/common_audio/window_generator.h
+++ b/common_audio/window_generator.h
@@ -13,18 +13,17 @@
 
 #include <stddef.h>
 
-#include "rtc_base/constructor_magic.h"
-
 namespace webrtc {
 
 // Helper class with generators for various signal transform windows.
 class WindowGenerator {
  public:
+  WindowGenerator() = delete;
+  WindowGenerator(const WindowGenerator&) = delete;
+  WindowGenerator& operator=(const WindowGenerator&) = delete;
+
   static void Hanning(int length, float* window);
   static void KaiserBesselDerived(float alpha, size_t length, float* window);
-
- private:
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WindowGenerator);
 };
 
 }  // namespace webrtc
diff --git a/media/engine/webrtc_voice_engine.cc b/media/engine/webrtc_voice_engine.cc
index 2c9e15d..52a8f3d 100644
--- a/media/engine/webrtc_voice_engine.cc
+++ b/media/engine/webrtc_voice_engine.cc
@@ -33,7 +33,6 @@
 #include "modules/audio_processing/include/audio_processing.h"
 #include "rtc_base/arraysize.h"
 #include "rtc_base/byte_order.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/experiments/field_trial_parser.h"
 #include "rtc_base/experiments/field_trial_units.h"
 #include "rtc_base/experiments/struct_parameters_parser.h"
@@ -802,6 +801,10 @@
     stream_ = call_->CreateAudioSendStream(config_);
   }
 
+  WebRtcAudioSendStream() = delete;
+  WebRtcAudioSendStream(const WebRtcAudioSendStream&) = delete;
+  WebRtcAudioSendStream& operator=(const WebRtcAudioSendStream&) = delete;
+
   ~WebRtcAudioSendStream() override {
     RTC_DCHECK(worker_thread_checker_.IsCurrent());
     ClearSource();
@@ -1143,8 +1146,6 @@
   // TODO(webrtc:11717): Remove this once audio_network_adaptor in AudioOptions
   // has been removed.
   absl::optional<std::string> audio_network_adaptor_config_from_options_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioSendStream);
 };
 
 class WebRtcVoiceMediaChannel::WebRtcAudioReceiveStream {
@@ -1193,6 +1194,10 @@
     RecreateAudioReceiveStream();
   }
 
+  WebRtcAudioReceiveStream() = delete;
+  WebRtcAudioReceiveStream(const WebRtcAudioReceiveStream&) = delete;
+  WebRtcAudioReceiveStream& operator=(const WebRtcAudioReceiveStream&) = delete;
+
   ~WebRtcAudioReceiveStream() {
     RTC_DCHECK(worker_thread_checker_.IsCurrent());
     call_->DestroyAudioReceiveStream(stream_);
@@ -1356,8 +1361,6 @@
   bool playout_ = false;
   float output_volume_ = 1.0;
   std::unique_ptr<webrtc::AudioSinkInterface> raw_audio_sink_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioReceiveStream);
 };
 
 WebRtcVoiceMediaChannel::WebRtcVoiceMediaChannel(
diff --git a/media/engine/webrtc_voice_engine.h b/media/engine/webrtc_voice_engine.h
index f805d6c..0d3c5fe 100644
--- a/media/engine/webrtc_voice_engine.h
+++ b/media/engine/webrtc_voice_engine.h
@@ -26,7 +26,6 @@
 #include "media/base/media_engine.h"
 #include "media/base/rtp_utils.h"
 #include "rtc_base/buffer.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/network_route.h"
 #include "rtc_base/task_queue.h"
 #include "rtc_base/thread_checker.h"
@@ -52,6 +51,11 @@
       rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer,
       rtc::scoped_refptr<webrtc::AudioProcessing> audio_processing,
       const webrtc::WebRtcKeyValueConfig& trials);
+
+  WebRtcVoiceEngine() = delete;
+  WebRtcVoiceEngine(const WebRtcVoiceEngine&) = delete;
+  WebRtcVoiceEngine& operator=(const WebRtcVoiceEngine&) = delete;
+
   ~WebRtcVoiceEngine() override;
 
   // Does initialization that needs to occur on the worker thread.
@@ -133,8 +137,6 @@
   // redundancy for opus audio.
   const bool audio_red_for_opus_trial_enabled_;
   const bool minimized_remsampling_on_mobile_trial_enabled_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceEngine);
 };
 
 // WebRtcVoiceMediaChannel is an implementation of VoiceMediaChannel that uses
@@ -147,6 +149,11 @@
                           const AudioOptions& options,
                           const webrtc::CryptoOptions& crypto_options,
                           webrtc::Call* call);
+
+  WebRtcVoiceMediaChannel() = delete;
+  WebRtcVoiceMediaChannel(const WebRtcVoiceMediaChannel&) = delete;
+  WebRtcVoiceMediaChannel& operator=(const WebRtcVoiceMediaChannel&) = delete;
+
   ~WebRtcVoiceMediaChannel() override;
 
   const AudioOptions& options() const { return options_; }
@@ -339,8 +346,6 @@
       unsignaled_frame_decryptor_;
 
   const bool audio_red_for_opus_trial_enabled_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel);
 };
 }  // namespace cricket
 
diff --git a/modules/audio_coding/BUILD.gn b/modules/audio_coding/BUILD.gn
index 3354033..cdf7821 100644
--- a/modules/audio_coding/BUILD.gn
+++ b/modules/audio_coding/BUILD.gn
@@ -793,7 +793,6 @@
     "../../api/units:time_delta",
     "../../rtc_base:checks",
     "../../rtc_base:logging",
-    "../../rtc_base:macromagic",
     "../../rtc_base:rtc_base_approved",
     "../../rtc_base:safe_minmax",
     "../../rtc_base:stringutils",
diff --git a/modules/audio_processing/BUILD.gn b/modules/audio_processing/BUILD.gn
index 83fdcef..dbb1882 100644
--- a/modules/audio_processing/BUILD.gn
+++ b/modules/audio_processing/BUILD.gn
@@ -25,10 +25,7 @@
     "include/config.cc",
     "include/config.h",
   ]
-  deps = [
-    "../../rtc_base:macromagic",
-    "../../rtc_base/system:rtc_export",
-  ]
+  deps = [ "../../rtc_base/system:rtc_export" ]
 }
 
 rtc_library("api") {
@@ -47,7 +44,6 @@
     "../../api/audio:audio_frame_api",
     "../../api/audio:echo_control",
     "../../rtc_base:deprecation",
-    "../../rtc_base:macromagic",
     "../../rtc_base:rtc_base_approved",
     "../../rtc_base/system:arch",
     "../../rtc_base/system:file_wrapper",
diff --git a/modules/audio_processing/aec3/echo_canceller3.cc b/modules/audio_processing/aec3/echo_canceller3.cc
index a0e1fc2..d96abc9 100644
--- a/modules/audio_processing/aec3/echo_canceller3.cc
+++ b/modules/audio_processing/aec3/echo_canceller3.cc
@@ -564,6 +564,11 @@
                          Aec3RenderQueueItemVerifier>* render_transfer_queue,
                size_t num_bands,
                size_t num_channels);
+
+  RenderWriter() = delete;
+  RenderWriter(const RenderWriter&) = delete;
+  RenderWriter& operator=(const RenderWriter&) = delete;
+
   ~RenderWriter();
   void Insert(const AudioBuffer& input);
 
@@ -575,7 +580,6 @@
   std::vector<std::vector<std::vector<float>>> render_queue_input_frame_;
   SwapQueue<std::vector<std::vector<std::vector<float>>>,
             Aec3RenderQueueItemVerifier>* render_transfer_queue_;
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RenderWriter);
 };
 
 EchoCanceller3::RenderWriter::RenderWriter(
diff --git a/modules/audio_processing/aec3/echo_canceller3_unittest.cc b/modules/audio_processing/aec3/echo_canceller3_unittest.cc
index 04d93e4..a02cfa3 100644
--- a/modules/audio_processing/aec3/echo_canceller3_unittest.cc
+++ b/modules/audio_processing/aec3/echo_canceller3_unittest.cc
@@ -108,6 +108,13 @@
 class CaptureTransportVerificationProcessor : public BlockProcessor {
  public:
   explicit CaptureTransportVerificationProcessor(size_t num_bands) {}
+
+  CaptureTransportVerificationProcessor() = delete;
+  CaptureTransportVerificationProcessor(
+      const CaptureTransportVerificationProcessor&) = delete;
+  CaptureTransportVerificationProcessor& operator=(
+      const CaptureTransportVerificationProcessor&) = delete;
+
   ~CaptureTransportVerificationProcessor() override = default;
 
   void ProcessCapture(
@@ -124,9 +131,6 @@
   void GetMetrics(EchoControl::Metrics* metrics) const override {}
 
   void SetAudioBufferDelay(int delay_ms) override {}
-
- private:
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CaptureTransportVerificationProcessor);
 };
 
 // Class for testing that the render data is properly received by the block
@@ -134,6 +138,13 @@
 class RenderTransportVerificationProcessor : public BlockProcessor {
  public:
   explicit RenderTransportVerificationProcessor(size_t num_bands) {}
+
+  RenderTransportVerificationProcessor() = delete;
+  RenderTransportVerificationProcessor(
+      const RenderTransportVerificationProcessor&) = delete;
+  RenderTransportVerificationProcessor& operator=(
+      const RenderTransportVerificationProcessor&) = delete;
+
   ~RenderTransportVerificationProcessor() override = default;
 
   void ProcessCapture(
@@ -161,7 +172,6 @@
  private:
   std::deque<std::vector<std::vector<std::vector<float>>>>
       received_render_blocks_;
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RenderTransportVerificationProcessor);
 };
 
 class EchoCanceller3Tester {
@@ -184,6 +194,10 @@
                        fullband_frame_length_ * 100,
                        1) {}
 
+  EchoCanceller3Tester() = delete;
+  EchoCanceller3Tester(const EchoCanceller3Tester&) = delete;
+  EchoCanceller3Tester& operator=(const EchoCanceller3Tester&) = delete;
+
   // Verifies that the capture data is properly received by the block processor
   // and that the processor data is properly passed to the EchoCanceller3
   // output.
@@ -602,8 +616,6 @@
   const int fullband_frame_length_;
   AudioBuffer capture_buffer_;
   AudioBuffer render_buffer_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(EchoCanceller3Tester);
 };
 
 std::string ProduceDebugText(int sample_rate_hz) {
diff --git a/modules/audio_processing/aec3/matched_filter.h b/modules/audio_processing/aec3/matched_filter.h
index 954e478..fa44eb2 100644
--- a/modules/audio_processing/aec3/matched_filter.h
+++ b/modules/audio_processing/aec3/matched_filter.h
@@ -17,7 +17,6 @@
 
 #include "api/array_view.h"
 #include "modules/audio_processing/aec3/aec3_common.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/system/arch.h"
 
 namespace webrtc {
@@ -104,6 +103,10 @@
                 float smoothing,
                 float matching_filter_threshold);
 
+  MatchedFilter() = delete;
+  MatchedFilter(const MatchedFilter&) = delete;
+  MatchedFilter& operator=(const MatchedFilter&) = delete;
+
   ~MatchedFilter();
 
   // Updates the correlation with the values in the capture buffer.
@@ -139,8 +142,6 @@
   const float excitation_limit_;
   const float smoothing_;
   const float matching_filter_threshold_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MatchedFilter);
 };
 
 }  // namespace webrtc
diff --git a/modules/audio_processing/aec3/matched_filter_lag_aggregator.h b/modules/audio_processing/aec3/matched_filter_lag_aggregator.h
index 0cc7789..d48011e 100644
--- a/modules/audio_processing/aec3/matched_filter_lag_aggregator.h
+++ b/modules/audio_processing/aec3/matched_filter_lag_aggregator.h
@@ -17,7 +17,6 @@
 #include "api/audio/echo_canceller3_config.h"
 #include "modules/audio_processing/aec3/delay_estimate.h"
 #include "modules/audio_processing/aec3/matched_filter.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -31,6 +30,12 @@
       ApmDataDumper* data_dumper,
       size_t max_filter_lag,
       const EchoCanceller3Config::Delay::DelaySelectionThresholds& thresholds);
+
+  MatchedFilterLagAggregator() = delete;
+  MatchedFilterLagAggregator(const MatchedFilterLagAggregator&) = delete;
+  MatchedFilterLagAggregator& operator=(const MatchedFilterLagAggregator&) =
+      delete;
+
   ~MatchedFilterLagAggregator();
 
   // Resets the aggregator.
@@ -47,8 +52,6 @@
   int histogram_data_index_ = 0;
   bool significant_candidate_found_ = false;
   const EchoCanceller3Config::Delay::DelaySelectionThresholds thresholds_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MatchedFilterLagAggregator);
 };
 }  // namespace webrtc
 
diff --git a/modules/audio_processing/aec3/render_buffer.h b/modules/audio_processing/aec3/render_buffer.h
index 3422df3..b8be6f5 100644
--- a/modules/audio_processing/aec3/render_buffer.h
+++ b/modules/audio_processing/aec3/render_buffer.h
@@ -23,7 +23,6 @@
 #include "modules/audio_processing/aec3/fft_data.h"
 #include "modules/audio_processing/aec3/spectrum_buffer.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -33,6 +32,11 @@
   RenderBuffer(BlockBuffer* block_buffer,
                SpectrumBuffer* spectrum_buffer,
                FftBuffer* fft_buffer);
+
+  RenderBuffer() = delete;
+  RenderBuffer(const RenderBuffer&) = delete;
+  RenderBuffer& operator=(const RenderBuffer&) = delete;
+
   ~RenderBuffer();
 
   // Get a block.
@@ -105,7 +109,6 @@
   const SpectrumBuffer* const spectrum_buffer_;
   const FftBuffer* const fft_buffer_;
   bool render_activity_ = false;
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RenderBuffer);
 };
 
 }  // namespace webrtc
diff --git a/modules/audio_processing/aec3/render_delay_controller.cc b/modules/audio_processing/aec3/render_delay_controller.cc
index c42d22b..3677085 100644
--- a/modules/audio_processing/aec3/render_delay_controller.cc
+++ b/modules/audio_processing/aec3/render_delay_controller.cc
@@ -25,7 +25,6 @@
 #include "modules/audio_processing/logging/apm_data_dumper.h"
 #include "rtc_base/atomic_ops.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -36,6 +35,12 @@
   RenderDelayControllerImpl(const EchoCanceller3Config& config,
                             int sample_rate_hz,
                             size_t num_capture_channels);
+
+  RenderDelayControllerImpl() = delete;
+  RenderDelayControllerImpl(const RenderDelayControllerImpl&) = delete;
+  RenderDelayControllerImpl& operator=(const RenderDelayControllerImpl&) =
+      delete;
+
   ~RenderDelayControllerImpl() override;
   void Reset(bool reset_delay_confidence) override;
   void LogRenderCall() override;
@@ -57,7 +62,6 @@
   size_t capture_call_counter_ = 0;
   int delay_change_counter_ = 0;
   DelayEstimate::Quality last_delay_estimate_quality_;
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RenderDelayControllerImpl);
 };
 
 DelayEstimate ComputeBufferDelay(
diff --git a/modules/audio_processing/agc/BUILD.gn b/modules/audio_processing/agc/BUILD.gn
index e5b3980..8235456 100644
--- a/modules/audio_processing/agc/BUILD.gn
+++ b/modules/audio_processing/agc/BUILD.gn
@@ -29,7 +29,6 @@
     "../../../rtc_base:checks",
     "../../../rtc_base:gtest_prod",
     "../../../rtc_base:logging",
-    "../../../rtc_base:macromagic",
     "../../../rtc_base:rtc_base_approved",
     "../../../rtc_base:safe_minmax",
     "../../../system_wrappers:field_trial",
@@ -51,7 +50,6 @@
   ]
   deps = [
     "../../../rtc_base:checks",
-    "../../../rtc_base:macromagic",
     "../vad",
   ]
 }
diff --git a/modules/audio_processing/agc2/down_sampler.h b/modules/audio_processing/agc2/down_sampler.h
index 61d1b00..be7cbb3 100644
--- a/modules/audio_processing/agc2/down_sampler.h
+++ b/modules/audio_processing/agc2/down_sampler.h
@@ -13,7 +13,6 @@
 
 #include "api/array_view.h"
 #include "modules/audio_processing/agc2/biquad_filter.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -22,6 +21,11 @@
 class DownSampler {
  public:
   explicit DownSampler(ApmDataDumper* data_dumper);
+
+  DownSampler() = delete;
+  DownSampler(const DownSampler&) = delete;
+  DownSampler& operator=(const DownSampler&) = delete;
+
   void Initialize(int sample_rate_hz);
 
   void DownSample(rtc::ArrayView<const float> in, rtc::ArrayView<float> out);
@@ -31,8 +35,6 @@
   int sample_rate_hz_;
   int down_sampling_factor_;
   BiQuadFilter low_pass_filter_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DownSampler);
 };
 
 }  // namespace webrtc
diff --git a/modules/audio_processing/agc2/noise_spectrum_estimator.h b/modules/audio_processing/agc2/noise_spectrum_estimator.h
index b22f9bb..e9895f0 100644
--- a/modules/audio_processing/agc2/noise_spectrum_estimator.h
+++ b/modules/audio_processing/agc2/noise_spectrum_estimator.h
@@ -12,7 +12,6 @@
 #define MODULES_AUDIO_PROCESSING_AGC2_NOISE_SPECTRUM_ESTIMATOR_H_
 
 #include "api/array_view.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -21,6 +20,11 @@
 class NoiseSpectrumEstimator {
  public:
   explicit NoiseSpectrumEstimator(ApmDataDumper* data_dumper);
+
+  NoiseSpectrumEstimator() = delete;
+  NoiseSpectrumEstimator(const NoiseSpectrumEstimator&) = delete;
+  NoiseSpectrumEstimator& operator=(const NoiseSpectrumEstimator&) = delete;
+
   void Initialize();
   void Update(rtc::ArrayView<const float> spectrum, bool first_update);
 
@@ -31,8 +35,6 @@
  private:
   ApmDataDumper* data_dumper_;
   float noise_spectrum_[65];
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(NoiseSpectrumEstimator);
 };
 
 }  // namespace webrtc
diff --git a/modules/audio_processing/agc2/signal_classifier.h b/modules/audio_processing/agc2/signal_classifier.h
index ae288ae..20cce92 100644
--- a/modules/audio_processing/agc2/signal_classifier.h
+++ b/modules/audio_processing/agc2/signal_classifier.h
@@ -18,7 +18,6 @@
 #include "common_audio/third_party/ooura/fft_size_128/ooura_fft.h"
 #include "modules/audio_processing/agc2/down_sampler.h"
 #include "modules/audio_processing/agc2/noise_spectrum_estimator.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -30,6 +29,11 @@
   enum class SignalType { kNonStationary, kStationary };
 
   explicit SignalClassifier(ApmDataDumper* data_dumper);
+
+  SignalClassifier() = delete;
+  SignalClassifier(const SignalClassifier&) = delete;
+  SignalClassifier& operator=(const SignalClassifier&) = delete;
+
   ~SignalClassifier();
 
   void Initialize(int sample_rate_hz);
@@ -39,6 +43,11 @@
   class FrameExtender {
    public:
     FrameExtender(size_t frame_size, size_t extended_frame_size);
+
+    FrameExtender() = delete;
+    FrameExtender(const FrameExtender&) = delete;
+    FrameExtender& operator=(const FrameExtender&) = delete;
+
     ~FrameExtender();
 
     void ExtendFrame(rtc::ArrayView<const float> x,
@@ -46,8 +55,6 @@
 
    private:
     std::vector<float> x_old_;
-
-    RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FrameExtender);
   };
 
   ApmDataDumper* const data_dumper_;
@@ -59,7 +66,6 @@
   int consistent_classification_counter_;
   SignalType last_signal_type_;
   const OouraFft ooura_fft_;
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(SignalClassifier);
 };
 
 }  // namespace webrtc
diff --git a/modules/audio_processing/include/audio_processing.h b/modules/audio_processing/include/audio_processing.h
index 32401af..43c40ff 100644
--- a/modules/audio_processing/include/audio_processing.h
+++ b/modules/audio_processing/include/audio_processing.h
@@ -31,6 +31,7 @@
 #include "modules/audio_processing/include/audio_processing_statistics.h"
 #include "modules/audio_processing/include/config.h"
 #include "rtc_base/arraysize.h"
+#include "rtc_base/constructor_magic.h"
 #include "rtc_base/deprecation.h"
 #include "rtc_base/ref_count.h"
 #include "rtc_base/system/file_wrapper.h"
diff --git a/modules/audio_processing/include/config.h b/modules/audio_processing/include/config.h
index 8a24586..7fab178 100644
--- a/modules/audio_processing/include/config.h
+++ b/modules/audio_processing/include/config.h
@@ -13,7 +13,6 @@
 
 #include <map>
 
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/system/rtc_export.h"
 
 namespace webrtc {
@@ -105,7 +104,6 @@
   typedef std::map<ConfigOptionID, BaseOption*> OptionMap;
   OptionMap options_;
 
-  // RTC_DISALLOW_COPY_AND_ASSIGN
   Config(const Config&);
   void operator=(const Config&);
 };
diff --git a/modules/audio_processing/logging/apm_data_dumper.h b/modules/audio_processing/logging/apm_data_dumper.h
index 17a5c87..1824fdd 100644
--- a/modules/audio_processing/logging/apm_data_dumper.h
+++ b/modules/audio_processing/logging/apm_data_dumper.h
@@ -26,7 +26,6 @@
 #include "common_audio/wav_file.h"
 #include "rtc_base/checks.h"
 #endif
-#include "rtc_base/constructor_magic.h"
 
 // Check to verify that the define is properly set.
 #if !defined(WEBRTC_APM_DEBUG_DUMP) || \
@@ -52,6 +51,10 @@
   // instances of the code.
   explicit ApmDataDumper(int instance_index);
 
+  ApmDataDumper() = delete;
+  ApmDataDumper(const ApmDataDumper&) = delete;
+  ApmDataDumper& operator=(const ApmDataDumper&) = delete;
+
   ~ApmDataDumper();
 
   // Activates or deactivate the dumping functionality.
@@ -277,7 +280,6 @@
                         int num_channels,
                         WavFile::SampleFormat format);
 #endif
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(ApmDataDumper);
 };
 
 }  // namespace webrtc
diff --git a/modules/audio_processing/test/aec_dump_based_simulator.h b/modules/audio_processing/test/aec_dump_based_simulator.h
index 092b82b..c8d82e6 100644
--- a/modules/audio_processing/test/aec_dump_based_simulator.h
+++ b/modules/audio_processing/test/aec_dump_based_simulator.h
@@ -15,7 +15,6 @@
 #include <string>
 
 #include "modules/audio_processing/test/audio_processing_simulator.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/ignore_wundef.h"
 
 RTC_PUSH_IGNORING_WUNDEF()
@@ -35,6 +34,11 @@
   AecDumpBasedSimulator(const SimulationSettings& settings,
                         rtc::scoped_refptr<AudioProcessing> audio_processing,
                         std::unique_ptr<AudioProcessingBuilder> ap_builder);
+
+  AecDumpBasedSimulator() = delete;
+  AecDumpBasedSimulator(const AecDumpBasedSimulator&) = delete;
+  AecDumpBasedSimulator& operator=(const AecDumpBasedSimulator&) = delete;
+
   ~AecDumpBasedSimulator() override;
 
   // Processes the messages in the aecdump file.
@@ -65,7 +69,6 @@
   bool artificial_nearend_eof_reported_ = false;
   InterfaceType interface_used_ = InterfaceType::kNotSpecified;
   std::unique_ptr<std::ofstream> call_order_output_file_;
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AecDumpBasedSimulator);
 };
 
 }  // namespace test
diff --git a/modules/audio_processing/test/audio_processing_simulator.h b/modules/audio_processing/test/audio_processing_simulator.h
index 8579f4b..63e644a 100644
--- a/modules/audio_processing/test/audio_processing_simulator.h
+++ b/modules/audio_processing/test/audio_processing_simulator.h
@@ -24,7 +24,6 @@
 #include "modules/audio_processing/test/api_call_statistics.h"
 #include "modules/audio_processing/test/fake_recording_device.h"
 #include "modules/audio_processing/test/test_utils.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/task_queue_for_test.h"
 #include "rtc_base/time_utils.h"
 
@@ -153,6 +152,11 @@
   AudioProcessingSimulator(const SimulationSettings& settings,
                            rtc::scoped_refptr<AudioProcessing> audio_processing,
                            std::unique_ptr<AudioProcessingBuilder> ap_builder);
+
+  AudioProcessingSimulator() = delete;
+  AudioProcessingSimulator(const AudioProcessingSimulator&) = delete;
+  AudioProcessingSimulator& operator=(const AudioProcessingSimulator&) = delete;
+
   virtual ~AudioProcessingSimulator();
 
   // Processes the data in the input.
@@ -222,8 +226,6 @@
   FakeRecordingDevice fake_recording_device_;
 
   TaskQueueForTest worker_queue_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioProcessingSimulator);
 };
 
 }  // namespace test
diff --git a/modules/audio_processing/test/wav_based_simulator.h b/modules/audio_processing/test/wav_based_simulator.h
index 3adbe70..286ce1f 100644
--- a/modules/audio_processing/test/wav_based_simulator.h
+++ b/modules/audio_processing/test/wav_based_simulator.h
@@ -14,7 +14,6 @@
 #include <vector>
 
 #include "modules/audio_processing/test/audio_processing_simulator.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 namespace test {
@@ -25,6 +24,11 @@
   WavBasedSimulator(const SimulationSettings& settings,
                     rtc::scoped_refptr<AudioProcessing> audio_processing,
                     std::unique_ptr<AudioProcessingBuilder> ap_builder);
+
+  WavBasedSimulator() = delete;
+  WavBasedSimulator(const WavBasedSimulator&) = delete;
+  WavBasedSimulator& operator=(const WavBasedSimulator&) = delete;
+
   ~WavBasedSimulator() override;
 
   // Processes the WAV input.
@@ -46,8 +50,6 @@
       const std::string& filename);
 
   std::vector<SimulationEventType> call_chain_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WavBasedSimulator);
 };
 
 }  // namespace test
diff --git a/modules/congestion_controller/goog_cc/BUILD.gn b/modules/congestion_controller/goog_cc/BUILD.gn
index 9bee7b2..00e00f4 100644
--- a/modules/congestion_controller/goog_cc/BUILD.gn
+++ b/modules/congestion_controller/goog_cc/BUILD.gn
@@ -44,7 +44,6 @@
     "../../../logging:rtc_event_pacing",
     "../../../rtc_base:checks",
     "../../../rtc_base:logging",
-    "../../../rtc_base:macromagic",
     "../../../rtc_base/experiments:alr_experiment",
     "../../../rtc_base/experiments:field_trial_parser",
     "../../../rtc_base/experiments:rate_control_settings",
diff --git a/modules/congestion_controller/goog_cc/delay_based_bwe.h b/modules/congestion_controller/goog_cc/delay_based_bwe.h
index 25f5a3b..74650dc 100644
--- a/modules/congestion_controller/goog_cc/delay_based_bwe.h
+++ b/modules/congestion_controller/goog_cc/delay_based_bwe.h
@@ -26,7 +26,6 @@
 #include "modules/remote_bitrate_estimator/aimd_rate_control.h"
 #include "modules/remote_bitrate_estimator/include/bwe_defines.h"
 #include "modules/remote_bitrate_estimator/inter_arrival.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/experiments/struct_parameters_parser.h"
 #include "rtc_base/race_checker.h"
 
@@ -78,6 +77,11 @@
   explicit DelayBasedBwe(const WebRtcKeyValueConfig* key_value_config,
                          RtcEventLog* event_log,
                          NetworkStatePredictor* network_state_predictor);
+
+  DelayBasedBwe() = delete;
+  DelayBasedBwe(const DelayBasedBwe&) = delete;
+  DelayBasedBwe& operator=(const DelayBasedBwe&) = delete;
+
   virtual ~DelayBasedBwe();
 
   Result IncomingPacketFeedbackVector(
@@ -143,7 +147,6 @@
   bool has_once_detected_overuse_;
   BandwidthUsage prev_state_;
   bool alr_limited_backoff_enabled_;
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe);
 };
 
 }  // namespace webrtc
diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control.h b/modules/congestion_controller/goog_cc/goog_cc_network_control.h
index 1e4dcf6..6dd70c8 100644
--- a/modules/congestion_controller/goog_cc/goog_cc_network_control.h
+++ b/modules/congestion_controller/goog_cc/goog_cc_network_control.h
@@ -33,7 +33,6 @@
 #include "modules/congestion_controller/goog_cc/delay_based_bwe.h"
 #include "modules/congestion_controller/goog_cc/probe_controller.h"
 #include "modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/experiments/field_trial_parser.h"
 #include "rtc_base/experiments/rate_control_settings.h"
 
@@ -48,6 +47,11 @@
  public:
   GoogCcNetworkController(NetworkControllerConfig config,
                           GoogCcConfig goog_cc_config);
+
+  GoogCcNetworkController() = delete;
+  GoogCcNetworkController(const GoogCcNetworkController&) = delete;
+  GoogCcNetworkController& operator=(const GoogCcNetworkController&) = delete;
+
   ~GoogCcNetworkController() override;
 
   // NetworkControllerInterface
@@ -137,8 +141,6 @@
   bool previously_in_alr_ = false;
 
   absl::optional<DataSize> current_data_window_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(GoogCcNetworkController);
 };
 
 }  // namespace webrtc
diff --git a/modules/congestion_controller/include/receive_side_congestion_controller.h b/modules/congestion_controller/include/receive_side_congestion_controller.h
index 6cd8be3..034f2e9 100644
--- a/modules/congestion_controller/include/receive_side_congestion_controller.h
+++ b/modules/congestion_controller/include/receive_side_congestion_controller.h
@@ -18,7 +18,6 @@
 #include "api/transport/network_control.h"
 #include "modules/include/module.h"
 #include "modules/remote_bitrate_estimator/remote_estimator_proxy.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/synchronization/mutex.h"
 
 namespace webrtc {
@@ -66,6 +65,11 @@
    public:
     WrappingBitrateEstimator(RemoteBitrateObserver* observer, Clock* clock);
 
+    WrappingBitrateEstimator() = delete;
+    WrappingBitrateEstimator(const WrappingBitrateEstimator&) = delete;
+    WrappingBitrateEstimator& operator=(const WrappingBitrateEstimator&) =
+        delete;
+
     ~WrappingBitrateEstimator() override;
 
     void IncomingPacket(int64_t arrival_time_ms,
@@ -96,8 +100,6 @@
     bool using_absolute_send_time_;
     uint32_t packets_since_absolute_send_time_;
     int min_bitrate_bps_;
-
-    RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WrappingBitrateEstimator);
   };
 
   const FieldTrialBasedConfig field_trial_config_;
diff --git a/modules/desktop_capture/win/scoped_gdi_object.h b/modules/desktop_capture/win/scoped_gdi_object.h
index 56abe95..d3ac9b9 100644
--- a/modules/desktop_capture/win/scoped_gdi_object.h
+++ b/modules/desktop_capture/win/scoped_gdi_object.h
@@ -58,27 +58,29 @@
 template <typename T>
 class DeleteObjectTraits {
  public:
+  DeleteObjectTraits() = delete;
+  DeleteObjectTraits(const DeleteObjectTraits&) = delete;
+  DeleteObjectTraits& operator=(const DeleteObjectTraits&) = delete;
+
   // Closes the handle.
   static void Close(T handle) {
     if (handle)
       DeleteObject(handle);
   }
-
- private:
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DeleteObjectTraits);
 };
 
 // The traits class that uses DestroyCursor() to close a handle.
 class DestroyCursorTraits {
  public:
+  DestroyCursorTraits() = delete;
+  DestroyCursorTraits(const DestroyCursorTraits&) = delete;
+  DestroyCursorTraits& operator=(const DestroyCursorTraits&) = delete;
+
   // Closes the handle.
   static void Close(HCURSOR handle) {
     if (handle)
       DestroyCursor(handle);
   }
-
- private:
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DestroyCursorTraits);
 };
 
 typedef ScopedGDIObject<HBITMAP, DeleteObjectTraits<HBITMAP> > ScopedBitmap;
diff --git a/modules/remote_bitrate_estimator/inter_arrival.h b/modules/remote_bitrate_estimator/inter_arrival.h
index 1d84970..dbc630f 100644
--- a/modules/remote_bitrate_estimator/inter_arrival.h
+++ b/modules/remote_bitrate_estimator/inter_arrival.h
@@ -14,8 +14,6 @@
 #include <stddef.h>
 #include <stdint.h>
 
-#include "rtc_base/constructor_magic.h"
-
 namespace webrtc {
 
 // Helper class to compute the inter-arrival time delta and the size delta
@@ -35,6 +33,10 @@
                double timestamp_to_ms_coeff,
                bool enable_burst_grouping);
 
+  InterArrival() = delete;
+  InterArrival(const InterArrival&) = delete;
+  InterArrival& operator=(const InterArrival&) = delete;
+
   // This function returns true if a delta was computed, or false if the current
   // group is still incomplete or if only one group has been completed.
   // |timestamp| is the timestamp.
@@ -87,8 +89,6 @@
   double timestamp_to_ms_coeff_;
   bool burst_grouping_;
   int num_consecutive_reordered_packets_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(InterArrival);
 };
 }  // namespace webrtc
 
diff --git a/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h b/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h
index 2423363..f42a28f 100644
--- a/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h
+++ b/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h
@@ -27,7 +27,6 @@
 #include "modules/remote_bitrate_estimator/overuse_detector.h"
 #include "modules/remote_bitrate_estimator/overuse_estimator.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/race_checker.h"
 #include "rtc_base/rate_statistics.h"
 #include "rtc_base/synchronization/mutex.h"
@@ -76,6 +75,13 @@
  public:
   RemoteBitrateEstimatorAbsSendTime(RemoteBitrateObserver* observer,
                                     Clock* clock);
+
+  RemoteBitrateEstimatorAbsSendTime() = delete;
+  RemoteBitrateEstimatorAbsSendTime(const RemoteBitrateEstimatorAbsSendTime&) =
+      delete;
+  RemoteBitrateEstimatorAbsSendTime& operator=(
+      const RemoteBitrateEstimatorAbsSendTime&) = delete;
+
   ~RemoteBitrateEstimatorAbsSendTime() override;
 
   void IncomingPacket(int64_t arrival_time_ms,
@@ -141,8 +147,6 @@
   mutable Mutex mutex_;
   Ssrcs ssrcs_ RTC_GUARDED_BY(&mutex_);
   AimdRateControl remote_rate_ RTC_GUARDED_BY(&mutex_);
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RemoteBitrateEstimatorAbsSendTime);
 };
 
 }  // namespace webrtc
diff --git a/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h b/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h
index 6da67e5..9fd2f9f 100644
--- a/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h
+++ b/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h
@@ -21,7 +21,6 @@
 #include "api/transport/field_trial_based_config.h"
 #include "modules/remote_bitrate_estimator/aimd_rate_control.h"
 #include "modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/rate_statistics.h"
 #include "rtc_base/synchronization/mutex.h"
 #include "rtc_base/thread_annotations.h"
@@ -35,6 +34,13 @@
  public:
   RemoteBitrateEstimatorSingleStream(RemoteBitrateObserver* observer,
                                      Clock* clock);
+
+  RemoteBitrateEstimatorSingleStream() = delete;
+  RemoteBitrateEstimatorSingleStream(
+      const RemoteBitrateEstimatorSingleStream&) = delete;
+  RemoteBitrateEstimatorSingleStream& operator=(
+      const RemoteBitrateEstimatorSingleStream&) = delete;
+
   ~RemoteBitrateEstimatorSingleStream() override;
 
   void IncomingPacket(int64_t arrival_time_ms,
@@ -74,8 +80,6 @@
   int64_t last_process_time_;
   int64_t process_interval_ms_ RTC_GUARDED_BY(mutex_);
   bool uma_recorded_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RemoteBitrateEstimatorSingleStream);
 };
 
 }  // namespace webrtc
diff --git a/modules/remote_bitrate_estimator/test/bwe_test_logging.h b/modules/remote_bitrate_estimator/test/bwe_test_logging.h
index 5a30da8..079a7f8 100644
--- a/modules/remote_bitrate_estimator/test/bwe_test_logging.h
+++ b/modules/remote_bitrate_estimator/test/bwe_test_logging.h
@@ -263,10 +263,11 @@
     Context(uint32_t name, int64_t timestamp_ms, bool enabled);
     Context(const std::string& name, int64_t timestamp_ms, bool enabled);
     Context(const char* name, int64_t timestamp_ms, bool enabled);
-    ~Context();
 
-   private:
-    RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(Context);
+    Context() = delete;
+    Context(const Context&) = delete;
+    Context& operator=(const Context&) = delete;
+    ~Context();
   };
 
   static Logging* GetInstance();
diff --git a/modules/rtp_rtcp/source/rtcp_sender.cc b/modules/rtp_rtcp/source/rtcp_sender.cc
index 5d2c9a2..61e6085 100644
--- a/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/modules/rtp_rtcp/source/rtcp_sender.cc
@@ -37,7 +37,6 @@
 #include "modules/rtp_rtcp/source/time_util.h"
 #include "modules/rtp_rtcp/source/tmmbr_help.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/numerics/safe_conversions.h"
 #include "rtc_base/trace_event.h"
@@ -56,6 +55,10 @@
   PacketContainer(Transport* transport, RtcEventLog* event_log)
       : transport_(transport), event_log_(event_log) {}
 
+  PacketContainer() = delete;
+  PacketContainer(const PacketContainer&) = delete;
+  PacketContainer& operator=(const PacketContainer&) = delete;
+
   size_t SendPackets(size_t max_payload_length) {
     size_t bytes_sent = 0;
     Build(max_payload_length, [&](rtc::ArrayView<const uint8_t> packet) {
@@ -72,8 +75,6 @@
  private:
   Transport* transport_;
   RtcEventLog* const event_log_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(PacketContainer);
 };
 
 // Helper to put several RTCP packets into lower layer datagram RTCP packet.
diff --git a/modules/rtp_rtcp/source/rtcp_sender.h b/modules/rtp_rtcp/source/rtcp_sender.h
index bcdf15e..22b2bb7 100644
--- a/modules/rtp_rtcp/source/rtcp_sender.h
+++ b/modules/rtp_rtcp/source/rtcp_sender.h
@@ -31,7 +31,6 @@
 #include "modules/rtp_rtcp/source/rtcp_packet/report_block.h"
 #include "modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h"
 #include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/random.h"
 #include "rtc_base/synchronization/mutex.h"
 #include "rtc_base/thread_annotations.h"
@@ -65,6 +64,11 @@
   };
 
   explicit RTCPSender(const RtpRtcpInterface::Configuration& config);
+
+  RTCPSender() = delete;
+  RTCPSender(const RTCPSender&) = delete;
+  RTCPSender& operator=(const RTCPSender&) = delete;
+
   virtual ~RTCPSender();
 
   RtcpMode Status() const RTC_LOCKS_EXCLUDED(mutex_rtcp_sender_);
@@ -308,8 +312,6 @@
       const RtcpContext&);
   // Map from RTCPPacketType to builder.
   std::map<uint32_t, BuilderFunc> builders_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender);
 };
 }  // namespace webrtc
 
diff --git a/modules/rtp_rtcp/source/rtp_packet_history.h b/modules/rtp_rtcp/source/rtp_packet_history.h
index f249116..4a2bf91 100644
--- a/modules/rtp_rtcp/source/rtp_packet_history.h
+++ b/modules/rtp_rtcp/source/rtp_packet_history.h
@@ -19,7 +19,6 @@
 
 #include "api/function_view.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/synchronization/mutex.h"
 #include "rtc_base/thread_annotations.h"
 
@@ -63,6 +62,11 @@
   static constexpr int kPacketCullingDelayFactor = 3;
 
   RtpPacketHistory(Clock* clock, bool enable_padding_prio);
+
+  RtpPacketHistory() = delete;
+  RtpPacketHistory(const RtpPacketHistory&) = delete;
+  RtpPacketHistory& operator=(const RtpPacketHistory&) = delete;
+
   ~RtpPacketHistory();
 
   // Set/get storage mode. Note that setting the state will clear the history,
@@ -211,8 +215,6 @@
   // Objects from |packet_history_| ordered by "most likely to be useful", used
   // in GetPayloadPaddingPacket().
   PacketPrioritySet padding_priority_ RTC_GUARDED_BY(lock_);
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RtpPacketHistory);
 };
 }  // namespace webrtc
 #endif  // MODULES_RTP_RTCP_SOURCE_RTP_PACKET_HISTORY_H_
diff --git a/modules/rtp_rtcp/source/rtp_sender.h b/modules/rtp_rtcp/source/rtp_sender.h
index fd1a8da..1580259 100644
--- a/modules/rtp_rtcp/source/rtp_sender.h
+++ b/modules/rtp_rtcp/source/rtp_sender.h
@@ -29,7 +29,6 @@
 #include "modules/rtp_rtcp/source/rtp_packet_history.h"
 #include "modules/rtp_rtcp/source/rtp_rtcp_config.h"
 #include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/deprecation.h"
 #include "rtc_base/random.h"
 #include "rtc_base/rate_statistics.h"
@@ -49,6 +48,10 @@
             RtpPacketHistory* packet_history,
             RtpPacketSender* packet_sender);
 
+  RTPSender() = delete;
+  RTPSender(const RTPSender&) = delete;
+  RTPSender& operator=(const RTPSender&) = delete;
+
   ~RTPSender();
 
   void SetSendingMediaStatus(bool enabled) RTC_LOCKS_EXCLUDED(send_mutex_);
@@ -230,8 +233,6 @@
   bool supports_bwe_extension_ RTC_GUARDED_BY(send_mutex_);
 
   RateLimiter* const retransmission_rate_limiter_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender);
 };
 
 }  // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_sender_audio.h b/modules/rtp_rtcp/source/rtp_sender_audio.h
index 0ac308d..57b9dd7 100644
--- a/modules/rtp_rtcp/source/rtp_sender_audio.h
+++ b/modules/rtp_rtcp/source/rtp_sender_audio.h
@@ -22,7 +22,6 @@
 #include "modules/rtp_rtcp/source/absolute_capture_time_sender.h"
 #include "modules/rtp_rtcp/source/dtmf_queue.h"
 #include "modules/rtp_rtcp/source/rtp_sender.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/one_time_event.h"
 #include "rtc_base/synchronization/mutex.h"
 #include "rtc_base/thread_annotations.h"
@@ -33,6 +32,11 @@
 class RTPSenderAudio {
  public:
   RTPSenderAudio(Clock* clock, RTPSender* rtp_sender);
+
+  RTPSenderAudio() = delete;
+  RTPSenderAudio(const RTPSenderAudio&) = delete;
+  RTPSenderAudio& operator=(const RTPSenderAudio&) = delete;
+
   ~RTPSenderAudio();
 
   int32_t RegisterAudioPayload(absl::string_view payload_name,
@@ -109,8 +113,6 @@
 
   const FieldTrialBasedConfig field_trials_;
   const bool include_capture_clock_offset_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSenderAudio);
 };
 
 }  // namespace webrtc
diff --git a/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc b/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc
index cd39e72..39c14e4 100644
--- a/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc
+++ b/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc
@@ -76,23 +76,26 @@
         decoded_image_(decoded_image),
         decode_time_ms_(decode_time_ms),
         qp_(qp) {}
+
+  DecodedImageData() = delete;
+  DecodedImageData(const DecodedImageData&) = delete;
+  DecodedImageData& operator=(const DecodedImageData&) = delete;
+
   const AlphaCodecStream stream_idx_;
   VideoFrame decoded_image_;
   const absl::optional<int32_t> decode_time_ms_;
   const absl::optional<uint8_t> qp_;
-
- private:
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DecodedImageData);
 };
 
 struct MultiplexDecoderAdapter::AugmentingData {
   AugmentingData(std::unique_ptr<uint8_t[]> augmenting_data, uint16_t data_size)
       : data_(std::move(augmenting_data)), size_(data_size) {}
+  AugmentingData() = delete;
+  AugmentingData(const AugmentingData&) = delete;
+  AugmentingData& operator=(const AugmentingData&) = delete;
+
   std::unique_ptr<uint8_t[]> data_;
   const uint16_t size_;
-
- private:
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AugmentingData);
 };
 
 MultiplexDecoderAdapter::MultiplexDecoderAdapter(
diff --git a/modules/video_coding/frame_buffer2.h b/modules/video_coding/frame_buffer2.h
index c88ae89..746773d 100644
--- a/modules/video_coding/frame_buffer2.h
+++ b/modules/video_coding/frame_buffer2.h
@@ -23,7 +23,6 @@
 #include "modules/video_coding/inter_frame_delay.h"
 #include "modules/video_coding/jitter_estimator.h"
 #include "modules/video_coding/utility/decoded_frames_history.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/event.h"
 #include "rtc_base/experiments/rtt_mult_experiment.h"
 #include "rtc_base/numerics/sequence_number_util.h"
@@ -50,6 +49,10 @@
               VCMTiming* timing,
               VCMReceiveStatisticsCallback* stats_callback);
 
+  FrameBuffer() = delete;
+  FrameBuffer(const FrameBuffer&) = delete;
+  FrameBuffer& operator=(const FrameBuffer&) = delete;
+
   virtual ~FrameBuffer();
 
   // Insert a frame into the frame buffer. Returns the picture id
@@ -188,8 +191,6 @@
 
   // rtt_mult experiment settings.
   const absl::optional<RttMultExperiment::Settings> rtt_mult_settings_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FrameBuffer);
 };
 
 }  // namespace video_coding
diff --git a/pc/audio_track.h b/pc/audio_track.h
index f8ad471..a0388e8 100644
--- a/pc/audio_track.h
+++ b/pc/audio_track.h
@@ -16,7 +16,6 @@
 #include "api/media_stream_interface.h"
 #include "api/scoped_refptr.h"
 #include "pc/media_stream_track.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/thread_checker.h"
 
 namespace webrtc {
@@ -27,6 +26,11 @@
   // Protected ctor to force use of factory method.
   AudioTrack(const std::string& label,
              const rtc::scoped_refptr<AudioSourceInterface>& source);
+
+  AudioTrack() = delete;
+  AudioTrack(const AudioTrack&) = delete;
+  AudioTrack& operator=(const AudioTrack&) = delete;
+
   ~AudioTrack() override;
 
  public:
@@ -50,7 +54,6 @@
  private:
   const rtc::scoped_refptr<AudioSourceInterface> audio_source_;
   rtc::ThreadChecker thread_checker_;
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioTrack);
 };
 
 }  // namespace webrtc
diff --git a/pc/ice_transport.h b/pc/ice_transport.h
index 69b69e4..c1529de 100644
--- a/pc/ice_transport.h
+++ b/pc/ice_transport.h
@@ -12,7 +12,6 @@
 #define PC_ICE_TRANSPORT_H_
 
 #include "api/ice_transport_interface.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/thread.h"
 #include "rtc_base/thread_checker.h"
 
@@ -29,6 +28,10 @@
     RTC_DCHECK(internal_);
   }
 
+  IceTransportWithPointer() = delete;
+  IceTransportWithPointer(const IceTransportWithPointer&) = delete;
+  IceTransportWithPointer& operator=(const IceTransportWithPointer&) = delete;
+
   cricket::IceTransportInternal* internal() override;
   // This call will ensure that the pointer passed at construction is
   // no longer in use by this object. Later calls to internal() will return
@@ -39,7 +42,6 @@
   ~IceTransportWithPointer() override;
 
  private:
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(IceTransportWithPointer);
   const rtc::Thread* creator_thread_;
   cricket::IceTransportInternal* internal_ RTC_GUARDED_BY(creator_thread_);
 };
diff --git a/pc/remote_audio_source.cc b/pc/remote_audio_source.cc
index 18a4ed2..8ae0612 100644
--- a/pc/remote_audio_source.cc
+++ b/pc/remote_audio_source.cc
@@ -18,7 +18,6 @@
 #include "absl/algorithm/container.h"
 #include "api/scoped_refptr.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/location.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/numerics/safe_conversions.h"
@@ -36,6 +35,11 @@
   explicit AudioDataProxy(RemoteAudioSource* source) : source_(source) {
     RTC_DCHECK(source);
   }
+
+  AudioDataProxy() = delete;
+  AudioDataProxy(const AudioDataProxy&) = delete;
+  AudioDataProxy& operator=(const AudioDataProxy&) = delete;
+
   ~AudioDataProxy() override { source_->OnAudioChannelGone(); }
 
   // AudioSinkInterface implementation.
@@ -45,8 +49,6 @@
 
  private:
   const rtc::scoped_refptr<RemoteAudioSource> source_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioDataProxy);
 };
 
 RemoteAudioSource::RemoteAudioSource(rtc::Thread* worker_thread)
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index e3b4581..e15206c 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -599,7 +599,6 @@
   ]
   deps = [
     ":checks",
-    ":macromagic",
     ":rtc_base_approved",
   ]
   absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
@@ -1066,7 +1065,6 @@
   deps = [
     ":criticalsection",
     ":gunit_helpers",
-    ":macromagic",
     ":rtc_base",
     ":rtc_base_tests_utils",
     ":timeutils",
@@ -1150,7 +1148,6 @@
   ]
   deps = [
     ":checks",
-    ":macromagic",
     ":rtc_base_approved",
     ":rtc_event",
     ":rtc_task_queue",
diff --git a/rtc_base/constructor_magic.h b/rtc_base/constructor_magic.h
index e63c2ff..8d12a7b 100644
--- a/rtc_base/constructor_magic.h
+++ b/rtc_base/constructor_magic.h
@@ -11,24 +11,10 @@
 #ifndef RTC_BASE_CONSTRUCTOR_MAGIC_H_
 #define RTC_BASE_CONSTRUCTOR_MAGIC_H_
 
-// Put this in the declarations for a class to be unassignable.
-#define RTC_DISALLOW_ASSIGN(TypeName) \
-  TypeName& operator=(const TypeName&) = delete
-
 // A macro to disallow the copy constructor and operator= functions. This should
 // be used in the declarations for a class.
 #define RTC_DISALLOW_COPY_AND_ASSIGN(TypeName) \
   TypeName(const TypeName&) = delete;          \
-  RTC_DISALLOW_ASSIGN(TypeName)
-
-// A macro to disallow all the implicit constructors, namely the default
-// constructor, copy constructor and operator= functions.
-//
-// This should be used in the declarations for a class that wants to prevent
-// anyone from instantiating it. This is especially useful for classes
-// containing only static methods.
-#define RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
-  TypeName() = delete;                               \
-  RTC_DISALLOW_COPY_AND_ASSIGN(TypeName)
+  TypeName& operator=(const TypeName&) = delete
 
 #endif  // RTC_BASE_CONSTRUCTOR_MAGIC_H_
diff --git a/rtc_base/deprecated/signal_thread.h b/rtc_base/deprecated/signal_thread.h
index 65f96bc..10805ad 100644
--- a/rtc_base/deprecated/signal_thread.h
+++ b/rtc_base/deprecated/signal_thread.h
@@ -110,14 +110,17 @@
   class Worker : public Thread {
    public:
     explicit Worker(DEPRECATED_SignalThread* parent);
+
+    Worker() = delete;
+    Worker(const Worker&) = delete;
+    Worker& operator=(const Worker&) = delete;
+
     ~Worker() override;
     void Run() override;
     bool IsProcessingMessagesForTesting() override;
 
    private:
     DEPRECATED_SignalThread* parent_;
-
-    RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(Worker);
   };
 
   class RTC_SCOPED_LOCKABLE EnterExit {
@@ -131,6 +134,11 @@
       RTC_DCHECK_NE(0, t_->refcount_);
       ++t_->refcount_;
     }
+
+    EnterExit() = delete;
+    EnterExit(const EnterExit&) = delete;
+    EnterExit& operator=(const EnterExit&) = delete;
+
     ~EnterExit() RTC_UNLOCK_FUNCTION() {
       bool d = (0 == --t_->refcount_);
       t_->cs_.Leave();
@@ -140,8 +148,6 @@
 
    private:
     DEPRECATED_SignalThread* t_;
-
-    RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(EnterExit);
   };
 
   void Run();
diff --git a/rtc_base/random.h b/rtc_base/random.h
index 93241a3..0e2d103 100644
--- a/rtc_base/random.h
+++ b/rtc_base/random.h
@@ -16,7 +16,6 @@
 #include <limits>
 
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -35,6 +34,10 @@
   // See also discussion here: https://codereview.webrtc.org/1623543002/
   explicit Random(uint64_t seed);
 
+  Random() = delete;
+  Random(const Random&) = delete;
+  Random& operator=(const Random&) = delete;
+
   // Return pseudo-random integer of the specified type.
   // We need to limit the size to 32 bits to keep the output close to uniform.
   template <typename T>
@@ -73,8 +76,6 @@
   }
 
   uint64_t state_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(Random);
 };
 
 // Return pseudo-random number in the interval [0.0, 1.0).
diff --git a/rtc_base/rate_limiter.h b/rtc_base/rate_limiter.h
index 051ccf6..9bbe21f 100644
--- a/rtc_base/rate_limiter.h
+++ b/rtc_base/rate_limiter.h
@@ -14,7 +14,6 @@
 #include <stddef.h>
 #include <stdint.h>
 
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/rate_statistics.h"
 #include "rtc_base/synchronization/mutex.h"
 #include "rtc_base/thread_annotations.h"
@@ -29,6 +28,11 @@
 class RateLimiter {
  public:
   RateLimiter(Clock* clock, int64_t max_window_ms);
+
+  RateLimiter() = delete;
+  RateLimiter(const RateLimiter&) = delete;
+  RateLimiter& operator=(const RateLimiter&) = delete;
+
   ~RateLimiter();
 
   // Try to use rate to send bytes. Returns true on success and if so updates
@@ -49,8 +53,6 @@
   RateStatistics current_rate_ RTC_GUARDED_BY(lock_);
   int64_t window_size_ms_ RTC_GUARDED_BY(lock_);
   uint32_t max_rate_bps_ RTC_GUARDED_BY(lock_);
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RateLimiter);
 };
 
 }  // namespace webrtc
diff --git a/rtc_base/weak_ptr.h b/rtc_base/weak_ptr.h
index 3e63a75..8b2ba09 100644
--- a/rtc_base/weak_ptr.h
+++ b/rtc_base/weak_ptr.h
@@ -241,6 +241,10 @@
  public:
   explicit WeakPtrFactory(T* ptr) : ptr_(ptr) {}
 
+  WeakPtrFactory() = delete;
+  WeakPtrFactory(const WeakPtrFactory&) = delete;
+  WeakPtrFactory& operator=(const WeakPtrFactory&) = delete;
+
   ~WeakPtrFactory() { ptr_ = nullptr; }
 
   WeakPtr<T> GetWeakPtr() {
@@ -263,7 +267,6 @@
  private:
   internal::WeakReferenceOwner weak_reference_owner_;
   T* ptr_;
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WeakPtrFactory);
 };
 
 }  // namespace rtc
diff --git a/rtc_tools/rtp_generator/rtp_generator.h b/rtc_tools/rtp_generator/rtp_generator.h
index 6248c6a..a317bf7 100644
--- a/rtc_tools/rtp_generator/rtp_generator.h
+++ b/rtc_tools/rtp_generator/rtp_generator.h
@@ -27,7 +27,6 @@
 #include "call/rtp_config.h"
 #include "call/video_send_stream.h"
 #include "media/engine/webrtc_video_engine.h"
-#include "rtc_base/constructor_magic.h"
 #include "test/frame_generator_capturer.h"
 #include "test/rtp_file_reader.h"
 #include "test/rtp_file_writer.h"
@@ -79,6 +78,11 @@
  public:
   // Construct a new RtpGenerator using the specified options.
   explicit RtpGenerator(const RtpGeneratorOptions& options);
+
+  RtpGenerator() = delete;
+  RtpGenerator(const RtpGenerator&) = delete;
+  RtpGenerator& operator=(const RtpGenerator&) = delete;
+
   // Cleans up the VideoSendStream.
   ~RtpGenerator() override;
   // Generates an rtp_dump that is written out to
@@ -113,9 +117,6 @@
   std::vector<uint32_t> durations_ms_;
   uint32_t start_ms_ = 0;
   std::unique_ptr<TaskQueueFactory> task_queue_;
-
-  // This object cannot be copied.
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RtpGenerator);
 };
 
 }  // namespace webrtc
diff --git a/video/BUILD.gn b/video/BUILD.gn
index 96d0faa..b833022 100644
--- a/video/BUILD.gn
+++ b/video/BUILD.gn
@@ -241,7 +241,6 @@
     "../rtc_base:checks",
     "../rtc_base:criticalsection",
     "../rtc_base:logging",
-    "../rtc_base:macromagic",
     "../rtc_base:rtc_base_approved",
     "../rtc_base:rtc_event",
     "../rtc_base:rtc_numerics",
diff --git a/video/adaptation/BUILD.gn b/video/adaptation/BUILD.gn
index eab01cd..2a60ead 100644
--- a/video/adaptation/BUILD.gn
+++ b/video/adaptation/BUILD.gn
@@ -42,7 +42,6 @@
     "../../modules/video_coding:video_coding_utility",
     "../../rtc_base:checks",
     "../../rtc_base:logging",
-    "../../rtc_base:macromagic",
     "../../rtc_base:rtc_base_approved",
     "../../rtc_base:rtc_event",
     "../../rtc_base:rtc_numerics",