Advertisement
Zv0n

G++ error

Nov 29th, 2017
546
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GDB 1.31 KB | None | 0 0
  1. In file included from test_student.cpp:3:0:
  2. PrettyPrint.hpp: In instantiation of ‘PrettyPrint::Data<typename std::remove_cv< <template-parameter-1-1> >::type> PrettyPrint::data(const T&) [with T = std::unique_ptr<int, std::default_delete<int> >; typename std::remove_cv< <template-parameter-1-1> >::type = std::unique_ptr<int, std::default_delete<int> >]’:
  3. PrettyPrint.hpp:59:30:   required from std::__cxx11::string PrettyPrint::dataString(const T&) [with T = std::unique_ptr<int, std::default_delete<int> >; std::__cxx11::string = std::__cxx11::basic_string<char>]
  4. test_student.cpp:48:3:   required from here
  5. PrettyPrint.hpp:39:61: error: use of deleted function ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = int; _Dp = std::default_delete<int>]
  6.  Data<std::remove_cv_t<T>> data(const T& val) { return { val }; }
  7.                                                              ^
  8. In file included from /usr/include/c++/7.2.0/bits/locale_conv.h:41:0,
  9.                  from /usr/include/c++/7.2.0/locale:43,
  10.                  from /usr/include/c++/7.2.0/iomanip:43,
  11.                  from catch.hpp:1430,
  12.                  from test_student.cpp:1:
  13. /usr/include/c++/7.2.0/bits/unique_ptr.h:388:7: note: declared here
  14.        unique_ptr(const unique_ptr&) = delete;
  15.        ^~~~~~~~~~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement