* src/misc/unique_ptr.hh: Add missing operator->() const.

This commit is contained in:
Alexandre Duret-Lutz 2013-06-24 23:34:07 +02:00
parent 882097a2ce
commit 1581a94c65

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2012 Laboratoire de Recherche et
// Copyright (C) 2012, 2013 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
@ -28,6 +28,7 @@ namespace spot
class unique_ptr
{
typedef T* pointer;
typedef const T* const_pointer;
public:
unique_ptr(pointer ptr)
: ptr_(ptr)
@ -50,6 +51,12 @@ namespace spot
return ptr_;
}
const_pointer
operator->() const
{
return ptr_;
}
private:
pointer ptr_;