blob: 1e514e5fb4f28f3b34a56a701460fe34af177e83 [file] [log] [blame]
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <iostream>
#include <memory>
struct Point {
int x;
int y;
Point(int x, int y) : x(x), y(y) {}
};
int main(int argc, char** argv) {
// Problem was that we were picking not "Point" to highlight, but the
// unique_ptr<Point
std::unique_ptr<Point> myPoint(new Point(7, 24));
std::cout << myPoint->x << "," << myPoint->y << std::endl;
return 0;
}