mirror of
https://github.com/wassname/conan-packages.git
synced 2026-06-27 23:38:06 +08:00
21 lines
315 B
C++
21 lines
315 B
C++
#include <iostream>
|
|
#include <boost/shared_ptr.hpp>
|
|
#include <boost/make_shared.hpp>
|
|
|
|
|
|
class A {
|
|
private:
|
|
int _x;
|
|
public:
|
|
A(int x): _x(x) {}
|
|
|
|
int getX(){ return _x; }
|
|
|
|
};
|
|
|
|
int main() {
|
|
|
|
boost::shared_ptr<A> x = boost::make_shared<A>(0);
|
|
return x->getX();
|
|
}
|