Run Code | API | Code Wall | Misc | Feedback | Login | Theme | Privacy | Patreon |
demoError(s): source_file.cpp: In function ‘std::shared_ptr<int> getInt1()’: source_file.cpp:14:12: error: cannot bind ‘std::unique_ptr<int, std::default_delete<int> >’ lvalue to ‘std::unique_ptr<int, std::default_delete<int> >&&’ return i; ^ In file included from /usr/include/c++/4.9/memory:82:0, from source_file.cpp:4: /usr/include/c++/4.9/bits/shared_ptr.h:257:2: note: initializing argument 1 of ‘std::shared_ptr<_Tp>::shared_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Tp1 = int; _Del = std::default_delete<int>; _Tp = int]’ shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r) ^ source_file.cpp:15:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ |
λ
.NET NoSQL database for rapid development
|