language: C++11 (gcc-4.7.2)
date: 424 days 15 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
#include <memory>
 
struct A {};
 
struct B : A {};
 
int main()
{
        auto x = std::make_shared<A>();
        if (auto p = dynamic_pointer_cast<B>(x));
}
 
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>'