mirror of
https://github.com/boostorg/smart_ptr.git
synced 2026-05-03 19:40:48 +02:00
Add deduction guides to shared_ptr and weak_ptr. Fixes #73.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
// Copyright 2020 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#if defined(__cpp_deduction_guides)
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/weak_ptr.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::shared_ptr<int> p1( new int );
|
||||
boost::weak_ptr p2( p1 );
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <boost/config/pragma_message.hpp>
|
||||
|
||||
BOOST_PRAGMA_MESSAGE( "Skipping test because __cpp_deduction_guides is not defined" )
|
||||
|
||||
int main() {}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user