Use our own noncopyable in react/

Reviewed By: astreet

Differential Revision: D2905195

fb-gh-sync-id: feede5288ef2d5de9dbd9802280e51f8782070ec
shipit-source-id: feede5288ef2d5de9dbd9802280e51f8782070ec
This commit is contained in:
Chris Hopman 2016-02-09 12:59:37 -08:00 committed by facebook-github-bot-5
parent 7cda49d516
commit 48f82e4e2b
4 changed files with 18 additions and 2 deletions

View File

@ -65,6 +65,7 @@ react_library(
'JSModulesUnbundle.h', 'JSModulesUnbundle.h',
'Value.h', 'Value.h',
'Platform.h', 'Platform.h',
'noncopyable.h',
], ],
compiler_flags = [ compiler_flags = [
'-Wall', '-Wall',

View File

@ -3,10 +3,11 @@
#pragma once #pragma once
#include <cstdint> #include <cstdint>
#include <fb/noncopyable.h>
#include <string> #include <string>
#include <stdexcept> #include <stdexcept>
#include "noncopyable.h"
namespace facebook { namespace facebook {
namespace react { namespace react {

View File

@ -8,7 +8,9 @@
#include <JavaScriptCore/JSRetainPtr.h> #include <JavaScriptCore/JSRetainPtr.h>
#include <JavaScriptCore/JSStringRef.h> #include <JavaScriptCore/JSStringRef.h>
#include <JavaScriptCore/JSValueRef.h> #include <JavaScriptCore/JSValueRef.h>
#include <fb/noncopyable.h>
#include "noncopyable.h"
#if WITH_FBJSCEXTENSIONS #if WITH_FBJSCEXTENSIONS
#include <jsc_stringref.h> #include <jsc_stringref.h>
#endif #endif

View File

@ -0,0 +1,12 @@
// Copyright 2004-present Facebook. All Rights Reserved.
#pragma once
namespace facebook {
namespace react {
struct noncopyable {
noncopyable(const noncopyable&) = delete;
noncopyable& operator=(const noncopyable&) = delete;
protected:
noncopyable() = default;
};
}}