title: unique_ptr<> causes compliation errors in C++
body: <p>I am using this library: <a href="https://github.com/Agamnentzar/bluetooth-serial-port" rel="nofollow">https://github.com/Agamnentzar/bluetooth-serial-port</a></p>
  
  <pre><code>BTSerialPortBinding::Create(address, channelID)
  
      Returns new instance of BTSerialPortBinding object
  
      address: string containint bluetooth address of the device
      channelID: ID of the serial port channel
  </code></pre>
  
  <p>I have a statement: </p>
  
  <p><code>unique_ptr&lt;BTSerialPortBinding&gt;bt(BTSerialPortBinding::Create(d1.address, 1));</code></p>
  
  <p>When I separate the statement with the declaration in ArduinoDevice.h and initialisation in ArduinoDevice.cpp in constructor like so:</p>
  
  <pre><code>std::unique_ptr&lt;BTSerialPortBinding&gt; bt; 
  bt.reset(BTSerialPortBinding::Create("93:83:, 1));
  </code></pre>
  
  <p>When I added these statements I got the following error: </p>
  
  <pre><code>ArduinoDevice &amp;ArduinoDevice::operator =(const ArduinoDevice &amp;)': attempting to reference a deleted function
  </code></pre>
  
  <p>Relevant bit in Process.cpp file which is referenced by the error</p>
  
  <pre><code>dev = ArduinoDevice("/dev/tty.IP-DevB"); 
  </code></pre>
  
  <p>Process.h</p>
  
  <pre><code>#ifndef __PROCESS_H
  #define __PROCESS_H
  
  #define _USE_MATH_DEFINES
  #include "ResonantLowpassFilter.h"
  
  #include "ArduinoDevice.h"
  
  //==============================================================================
  /**
  */
  class AudioProcessor  : public AudioProcessor
  {
  public:
      //==============================================================================
      WahwahAudioProcessor();
      ~WahwahAudioProcessor();
  
      void prepareToPlay (double sampleRate, int samplesPerBlock);
      void releaseResources();
  
      void processBlock (AudioSampleBuffer&amp; buffer, MidiBuffer&amp; midiMessages);
  
      AudioProcessorEditor* createEditor();
      int getNumParameters();
      int getNumPrograms();
      int getCurrentProgram();
      void setCurrentProgram (int index);
      const String getProgramName (int index);
      void changeProgramName (int index, const String&amp; newName);
  
  
  
      float centreFrequency_, q_;
      void updateFilterArduino();
  
      ArduinoDevice dev; //instance to an Arduino device from which sensor data is read
  
  };
  
  #endif  // _PROCESS
  </code></pre>
  
  <p>ArduinoDevice.h</p>
  
  <pre><code>#ifndef ArduinoDevice_h
  #define ArduinoDevice_h
  
  #include &lt;stdio.h&gt;
  #include "BTSerialPortBinding.h"
  #include &lt;memory&gt;
  
  class ArduinoDevice
  {
  public:
      ArduinoDevice(const char *dev="");
  
      void connect();
  
      void start(void);
      void stop(void);
      void read(void);
  
      /**
       Disconnects from Arduino device
       **/
      ~ArduinoDevice();
  
  private:
      const char *device; //port address of the device (e.g. "/dev/tty.FireFly-E552-SPP")
  
      std::unique_ptr&lt;BTSerialPortBinding&gt; bt; //bt serial port 
  
      void close(void);
  
  };
  
  #endif
  </code></pre>
  
  <p>Edit: </p>
  
  <p>I am using Windows 10, Visual Studio 2015 and Microsoft's C++ Compiler. I am also using an extra JUCE library(<a href="https://www.juce.com/" rel="nofollow">https://www.juce.com/</a>). </p>
  
  <p><code>dev = ArduinoDevice("/dev/tty.IP-DevB"));</code></p>
  
  <p>dev is declared in the Process.h file above its an instance of ArduinoDevice</p>
  
  <p>My constructor looks like this: </p>
  
  <pre><code>ArduinoDevice::ArduinoDevice(const char *dev)
  {
      device = dev;
      bt.reset(BTSerialPortBinding::Create("98:D3:31:FD:11:1A", 1));
  }
  </code></pre>
  
  <p>I've now tried this in ArduinoDevice.cpp and declaration .h but I still get the same error as above:</p>
  
  <pre><code>ArduinoDevice&amp;&amp;(const char *dev);   
  {
      data = dev.data;
      dev.data = nullptr;
  }
  </code></pre>