#include <memory> struct A {}; struct B : A {}; int main() { auto x = std::make_shared<A>(); if (auto p = dynamic_pointer_cast<B>(x)); }
Standard input is empty
prog.cpp: In function 'int main()': prog.cpp:10:15: error: 'dynamic_pointer_cast' was not declared in this scope prog.cpp:10:37: error: expected primary-expression before '>' token prog.cpp:10:40: error: unable to deduce 'auto' from '<expression error>'
Standard output is empty