deleted-functions Questions

1

Solved

This code will not compile with gcc 4.7.0: class Base { public: Base(const Base&) = delete; }; class Derived : Base { public: Derived(int i) : m_i(i) {} int m_i; }; The error is: c.cpp: ...
Laconism asked 16/8, 2013 at 16:46

1

This concerns the resolution of C++ Issue http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1402 . Summary: template<typename T> struct wrap { wrap() = default; wrap(wrap&...
Asher asked 22/6, 2013 at 16:29

2

Solved

It isn't clear what happens if I delete a virtual method in C++0x: virtual int derive_func() = delete; Does this mean this class and everything that inherits from it can not define/implement th...
Saxtuba asked 11/10, 2010 at 21:25

2

Solved

What do these two strange lines of code mean? thread_guard(thread_guard const&) = delete; thread_guard& operator=(thread_guard const&) = delete;
Murray asked 13/9, 2010 at 9:24

© 2022 - 2024 — McMap. All rights reserved.