/*
 * Copyright ©2026 Soham Pardeshi. All rights reserved.
 * Permission is hereby granted to students registered for University of
 * Washington CSE 333 for use solely during Summer Quarter 2026 for
 * purposes of the course. No other use, copying, distribution, or
 * modification is permitted without prior written consent. Copyrights
 * for third-party components of this work must be honored. Instructors
 * interested in reusing these course materials should contact the author.
 */

#ifndef TRACER_H_
#define TRACER_H_

#include <iostream>

// A tiny class that prints a message on every special-member operation, so
// we can SEE when the STL copies, moves, or destroys elements.
// See lecture 12 slides 52-54.
class Tracer {
 public:
  Tracer() { std::cout << "ctor\n"; }
  Tracer(const Tracer& t) { std::cout << "copy ctor\n"; }
  Tracer& operator=(const Tracer& t) {
    std::cout << "operator=\n";
    return *this;
  }
  Tracer(Tracer&& t) { std::cout << "move ctor\n"; }
  Tracer& operator=(Tracer&& t) {
    std::cout << "move operator=\n";
    return *this;
  }
  ~Tracer() { std::cout << "dtor\n"; }
};

#endif  // TRACER_H_