[cpp][model] Do not define _LIBCPP_VECTOR or _GLIBCXX_VECTOR

Summary:
:
because otherwise people would believe they can use the internal representation of these std lib but it fails for our models.

Reviewed By: jvillard

Differential Revision: D5368671

fbshipit-source-id: 4e53d5a
master
Mehdi Bouaziz 8 years ago committed by Facebook Github Bot
parent 8b9a1f2582
commit 2ee8321456

@ -25,9 +25,6 @@
// libc++ vector header includes it, but it breaks
// compilation with stdlibc++ implementation
#include <algorithm>
#define _LIBCPP_VECTOR
#else
#define _GLIBCXX_VECTOR
#endif
INFER_NAMESPACE_STD_BEGIN

@ -1,10 +1,17 @@
/*
* Copyright (c) 2017 - present Facebook, Inc.
* All rights reserved.
* Copyright 2017 Facebook, Inc.
*
* 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.
* 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.
*/
#pragma once

@ -0,0 +1,13 @@
/*
* Copyright (c) 2017 - 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.
*/
#include <vector>
#if defined(_LIBCPP_VECTOR) || defined(_GLIBCXX_VECTOR)
#error "infer should use models headers"
#endif
Loading…
Cancel
Save