/
BirdLeon
/
ROBLOX2016
Обзор
Документация
Войти
/
BirdLeon
/
ROBLOX2016
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
Library/boost/libs/smart_ptr/test/shared_from_fail.cpp
22 строки
568 B
PatoFlamejanteTV
full source code
19 дек 2024, 19:11
19 дек 2024, 19:11
05db15d
Код
Авторство
О чём код?
// Copyright 2020 Peter Dimov // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt #include <boost/shared_ptr.hpp> #include <boost/smart_ptr/enable_shared_from.hpp> struct X: public boost::enable_shared_from { }; #if defined(__clang__) && defined(_MSC_VER) // clang-cl claims that it accepts this code for compatibility // with msvc, but no version of msvc accepts it # pragma clang diagnostic error "-Wmicrosoft-using-decl" #endif int main() { boost::shared_ptr<X> px( new X ); px->shared_from_this(); }