[cfe-dev] Clang error message implicitly-deleted copy constructor

Fletcher, John P j.p.fletcher at aston.ac.uk
Tue Mar 27 08:57:49 PDT 2012


Apologies that this not related to clang development, more to clang usage.

I have this error message:

error: call to implicitly-deleted copy constructor of
      'std::pair<int, int>'

This is happening when I use a templated list and attempt to make a list of std::pair<int,int>.

This used to work fine but now fails with clang 3.1 with C++11. 

Please could someone point me to somewhere where there is discussion on this.  I would like to adapt my code to (a) detect a std::pair and (b) take appropriate action.  I have made some progress with (a) but complete frustration with (b).

It does not look a clever idea to try and put a copy constructor into std::pair.

There are more details at http://c2.com/cgi/wiki?ImplicitlyDeletedCopyConstructor

Thanks

John

Dr John P. Fletcher Tel: (44) 121 204 3389 (direct line), FAX: (44) 121 204 3678
Chemical Engineering and Applied Chemistry (CEAC),
formerly Associate Dean - External Relations,
School of Engineering and Applied Science (EAS),
Aston University, Aston Triangle, BIRMINGHAM B4 7ET  U.K.               







More information about the cfe-dev mailing list