* src/misc/unique_ptr.hh: Add missing operator->() const.
This commit is contained in:
parent
882097a2ce
commit
1581a94c65
1 changed files with 8 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2012 Laboratoire de Recherche et
|
// Copyright (C) 2012, 2013 Laboratoire de Recherche et
|
||||||
// Développement de l'Epita (LRDE).
|
// Développement de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
|
|
@ -28,6 +28,7 @@ namespace spot
|
||||||
class unique_ptr
|
class unique_ptr
|
||||||
{
|
{
|
||||||
typedef T* pointer;
|
typedef T* pointer;
|
||||||
|
typedef const T* const_pointer;
|
||||||
public:
|
public:
|
||||||
unique_ptr(pointer ptr)
|
unique_ptr(pointer ptr)
|
||||||
: ptr_(ptr)
|
: ptr_(ptr)
|
||||||
|
|
@ -50,6 +51,12 @@ namespace spot
|
||||||
return ptr_;
|
return ptr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const_pointer
|
||||||
|
operator->() const
|
||||||
|
{
|
||||||
|
return ptr_;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
pointer ptr_;
|
pointer ptr_;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue