This will also happen if you’ve forgotten to specify public inheritance on the derived class, i.e. if like me you write this:
class Derived : Base
{
};
Instead of:
class Derived : public Base
{
};
Related Contents:
- Where is shared_ptr?
- What is a smart pointer and when should I use one?
- Which kind of pointer do I use when?
- Why can I not push_back a unique_ptr into a vector?
- shared_ptr to an array : should it be used?
- How do I call ::std::make_shared on a class with only protected or private constructors?
- Differences between std::make_unique and std::unique_ptr with new
- Difference in make_shared and normal shared_ptr in C++
- Differences between unique_ptr and shared_ptr [duplicate]
- Is there any use for unique_ptr with array?
- “Downcasting” unique_ptr to unique_ptr
- Why isn’t there a std::shared_ptr specialisation?
- Why do std::shared_ptr work
- Should we pass a shared_ptr by reference or by value?
- How much is the overhead of smart pointers compared to normal pointers in C++?
- Is there a non-atomic equivalent of std::shared_ptr? And why isn’t there one in ?
- std::shared_ptr thread safety explained
- smart pointers and arrays
- std::auto_ptr to std::unique_ptr
- Passing shared pointers as arguments
- How to avoid memory leak with shared_ptr?
- Should I delete the move constructor and the move assignment of a smart pointer?
- Is cout synchronized/thread-safe?
- Generate random numbers using C++11 random library
- When does a constexpr function get evaluated at compile time?
- Conveniently Declaring Compile-Time Strings in C++
- How do I pass a unique_ptr argument to a constructor or a function?
- Converting std::__cxx11::string to std::string
- using extern template (C++11)
- Can I implement an autonomous `self` member type in C++?
- smart pointers (boost) explained
- How to pass parameters correctly?
- Why no default move-assignment/move-constructor?
- What is the difference between (type)value and type(value)?
- ‘colon’ and ‘auto’ in for loop c++? need some help understanding the syntax
- Reading from ifstream won’t read whitespace
- Does this code from “The C++ Programming Language” 4th edition section 36.3.6 have well-defined behavior?
- C++: Can a macro expand “abc” into ‘a’, ‘b’, ‘c’?
- Volatile in C++11
- Move-only version of std::function
- Why is the new random library better than std::rand()?
- C++11 – static_assert within constexpr function?
- What does std::match_results::size return?
- Constexpr pointer value
- Weird Behaviour with const_cast [duplicate]
- Why does the standard differentiate between direct-list-initialization and copy-list-initialization?
- std::thread calling method of class [duplicate]
- Inserting into an unordered_set with custom hash function
- Is it OK to use C-style cast for built-in types?
- C++ priority_queue with lambda comparator error