mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
b4527fe5bb
Summary: This simplifies the InodePtrImpl class by removing support for pointer-to-const Inode objects. We don't currently use pointer-to-const Inode objects, and I don't really anticipate that we will ever need this. The primary motivating factor behind this diff is a recent change in clang that breaks the existing code: clang PR31606 prevents children classes from inheriting template constructor instantiations from their parent which take a reference to the parent class type as the only argument. While this could have been fixed by explicitly defining the necessary constructors in the child class (or simply by overriding newPtrLocked() and newPtrFromExisting() to return the subclass type), dropping support for pointer-to-const allows us to simplify the code and resolve this issue. Reviewed By: wez Differential Revision: D4825526 fbshipit-source-id: 999de352788b13818b7f23788bb34686e193cd5d
36 lines
796 B
C++
36 lines
796 B
C++
/*
|
|
* Copyright (c) 2016-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*
|
|
*/
|
|
#pragma once
|
|
|
|
/*
|
|
* This file contains forward declarations of InodePtr and related types
|
|
*/
|
|
|
|
namespace facebook {
|
|
namespace eden {
|
|
|
|
class FileInode;
|
|
class InodeBase;
|
|
class TreeInode;
|
|
class DotEdenInode;
|
|
|
|
template <typename InodeType>
|
|
class InodePtrImpl;
|
|
|
|
/*
|
|
* Friendly names for the various InodePtr classes.
|
|
*/
|
|
using DotEdenInodePtr = InodePtrImpl<DotEdenInode>;
|
|
using FileInodePtr = InodePtrImpl<FileInode>;
|
|
using TreeInodePtr = InodePtrImpl<TreeInode>;
|
|
class InodePtr;
|
|
}
|
|
}
|