Add backwards compatibility shims for old wpiutil headers.

These generate a warning when included, then include the old header.

Note for GCC, #warning is used; this requires -std=gnu++14 instead of
-std=c++14 (otherwise the warning is treated as an error because #warning is
a GNU extension).  On MSVC, #pragma message is used, which is a bit
unsatisfactory as the message doesn't say where it was included from.

The llvm shim headers also include a llvm namespace shim.
This commit is contained in:
Peter Johnson
2018-04-29 23:36:18 -07:00
parent f84018af5f
commit a28832e52f
59 changed files with 1004 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
#pragma once
#ifdef _MSC_VER
#pragma message "warning: support/atomic_static.h is deprecated; include wpi/atomic_static.h instead"
#else
#warning "support/atomic_static.h is deprecated; include wpi/atomic_static.h instead"
#endif
#include "wpi/atomic_static.h"