Martijn Lievaart said:
Please explain what doesn't work. Are you having a problem compiling or is
the behaviour not what you expected? What exactly happens? What did you
It doesn't compile. It generates a lot of errors:
E:/DEV-CPP/include/c++/bits/ios_base.h: In copy constructor
`std::basic_ios<char, std::char_traits<char> >::basic_ios(const
std::basic_ios<char, std::char_traits<char> >&)':
Debug.h:102: instantiated from `static void Debug::trace(T1, T3, T2)
[with T1 = const char*, T2 = bool, T3 = std::basic_string<char,
std::char_traits<char>, std::allocator<char> >]'
Debug.h:116: instantiated from `static void Debug::trace(T1, T3, T4,
T2) [with T1 = const char*, T2 = bool, T3 = int, T4 =
Debug.h:130: instantiated from `static void Debug::trace(T1, T3, T4,
T5, T2) [with T1 = const char*, T2 = bool, T3 = int, T4 = const char*,
T5 = std::basic_string<char, std::char_traits<char>,
std::allocator<char> >]'
Debug.h:146: instantiated from `static void Debug::trace(T1, T3, T4,
T5, T6, T2) [with T1 = const char*, T2 = bool, T3 = int, T4 = const
char*, T5 = int, T6 = const char*]' eTfMgsMgrp_clsDrawingObj.cpp:22:
instantiated from here
E:/DEV-CPP/include/c++/bits/ios_base.h:421:
`std::ios_base::ios_base(const std::ios_base&)' is private
Debug.h:102: within this context E:/DEV-CPP/include/c++/streambuf: In
copy constructor `std::basic_stringbuf<char, std::char_traits<char>,
std::allocator<char> >::basic_stringbuf(const
std::basic_stringbuf<char, std::char_traits<char>,
std::allocator<char> >&)':
E:/DEV-CPP/include/c++/streambuf:486: `std::basic_streambuf<_CharT,
_Traits>::basic_streambuf(const std::basic_streambuf<_CharT,
_Traits>&) [with _CharT = char, _Traits = std::char_traits<char>]' is
private
Debug.h:102: within this context Debug.h: In static member function
`static void Debug::trace(T1, T3, T2) [with T1 = const char*, T2 =
bool, T3 = std::basic_string<char, std::char_traits<char>,
std::allocator<char> >]':
Debug.h:116: instantiated from `static void Debug::trace(T1, T3, T4,
T2) [with T1 = const char*, T2 = bool, T3 = int, T4 =
Debug.h:130: instantiated from `static void Debug::trace(T1, T3, T4,
T5, T2) [with T1 = const char*, T2 = bool, T3 = int, T4 = const char*,
T5 = std::basic_string<char, std::char_traits<char>,
std::allocator<char> >]'
Debug.h:146: instantiated from `static void Debug::trace(T1, T3, T4,
T5, T6, T2) [with T1 = const char*, T2 = bool, T3 = int, T4 = const
char*, T5 = int, T6 = const char*]'
I expect it to compile.
--The Directive