Re: Error regarding ostream

121 views
Skip to first unread message

Sai Gautam Mandapati

unread,
Feb 22, 2023, 7:22:21 PM2/22/23
to ns-3-users
./ns3/timer-impl.h:683:12: error: use of deleted function ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator=(const std::basic_ostream<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits<char>]’
  683 |       m_a1 = a1;
      |       ~~~~~^~~~
In file included from /usr/include/c++/9/istream:39,
                 from /usr/include/c++/9/fstream:38,
                 from ../src/ndnSIM/utils/tracers/pit-tracer.hpp:4,
                 from ../src/ndnSIM/utils/tracers/pit-tracer.cpp:1:
/usr/include/c++/9/ostream:405:22: note: declared here
  405 |       basic_ostream& operator=(const basic_ostream&) = delete;
      |                      ^~~~~~~~

How to deal with the above error? Any Ideas? Thanks for your help in advance.

Tommaso Pecorella

unread,
Feb 23, 2023, 2:10:42 AM2/23/23
to ns-3-users
ndnSIM is not ns-3, and this is not the ndnSIM user group.

Said so, you can't copy-assign an ostream, that's basic C++. What your'e trying to do is illegal - you're probably trying to add a stream as a parameter of a timer.

Again. This is not the ndnSIM user group, we are not responsible for the ndnSIM code.

Reply all
Reply to author
Forward
0 new messages