/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include #include std::shared_ptr> get() { std::vector v = {1, 2, 3}; return std::make_shared>(v); } int main() { int n; for (auto& t : *get()) { n += t; } return n; }