[C++ models] Fix compilation issues with unique_ptr under gcc 5

Summary:
`libstdc++` includes `bits/unique_ptr.h` via `include "unique_ptr.h"` in `bits/locale_conv.h` which infer can't redirect to model headers. This leads to compilation issues.
To work around that, redirect include of `locale_conv.h` to include `unique_ptr` via `include <...>` before normal `locale_conv.h`.

Reviewed By: mbouaziz

Differential Revision: D4962314

fbshipit-source-id: d4b9830
master
Andrzej Kotulski 8 years ago committed by Facebook Github Bot
parent eb477b771e
commit 6ff421ca65

@ -0,0 +1,17 @@
/*
* 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.
*/
#pragma once
// locale_conv in libstdc++ is including 'bits/unique_ptr.h' via
// #include "unique_ptr.h". Infer can't redirect those includes
// so instead include unique_ptr via our header first. Then, it
// won't be included again in 'bits/locale_conv.h'
#include <bits/unique_ptr.h>
#include_next <bits/locale_conv.h>
Loading…
Cancel
Save