title: Alternative to using smart pointers to bind an rvalue reference to an abstract class
body: <p><strong>UPDATE</strong></p>
  
  <p>It turns out parts of the STL can actually be used -- with care due to the severe memory limitations, though. Arduino is a new platform to me, and after seeing lots of posts talking about the lack of support for STL and even <a href="https://github.com/maniacbug/StandardCplusplus" rel="nofollow">some ports</a>, I simply assumed it couldn't be used.</p>
  
  <p>Now that I know I can use <code>unique_ptr</code>, my original question doesn't make any sense anymore. I will leave it here anyway, just in case it's useful to someone.</p>
  
  <p><em>------</em></p>
  
  <p>I'm creating a C++ class in an Arduino project -- that means STL is not available (e.g., no smart pointers). Currently I have the following:</p>
  
  <pre><code>class ntp_client {
  public:
    ntp_client(UDP&amp; udp) : udp_(udp) {}
  
    // ...
  
  private:
    UDP&amp; udp_;
  };
  </code></pre>
  
  <p><code>UDP</code> is a base abstract class to other classes such as <code>WiFiUDP</code> or <code>EthernetUDP</code>. Now my code looks like:</p>
  
  <pre><code>WiFiUDP udp;
  ntp_client ntp(udp);
  </code></pre>
  
  <p>But, I'd like to be able to do the following as well:</p>
  
  <pre><code>ntp_client ntp{WiFiUDP{}};
  </code></pre>
  
  <p>So, I was thinking to add a constructor taking an rvalue reference, but I don't think there is any way to then bind the rvalue reference to a class attribute (since UDP is an abstract class).</p>
  
  <p>Is it possible to do this without using smart pointers or templates?</p>