GL Studio C++ Runtime API
gls_cpp_lang_support.h File Reference

Macros and helper code to determine what subset of C++11/14/17 is available. More...

#include <utility>
#include <float.h>

Go to the source code of this file.

Classes

struct  MaxDigits10< T >
 
struct  MaxDigits10< float >
 
struct  MaxDigits10< double >
 
struct  MaxDigits10< long double >
 

Namespaces

 disti
 

Macros

#define DISTI_STATIC_ASSERT_IS_CONVERTIBLE_TO(T, ConvertsTo)   DISTI_STATIC_ASSERT( ( std::is_convertible<T*, ConvertsTo*>::value ), class_does_not_inherit_from_##ConvertsTo );
 
#define DISTI_IS_TRIVIALLY_DESTRUCTIBLE(T)   ( std::is_trivially_destructible<T>() )
 Determines if a class T is trivially destructible (i.e., has no side effects)
 
#define DISTI_STATIC_ASSERT(expr, msg)   static_assert( expr, DISTI_PREPROC_STRINGIFY( msg ) )
 Uses C++11's static_assert() because it is available on this platform. More...
 
#define DISTI_STATIC_ASSERT_STR(expr, msg)   static_assert( expr, msg )
 Uses C++11's static_assert() because it is available on this platform. More...
 
#define DISTI_DEPRECATED(msg)   [[deprecated( msg )]]
 Defines whether this compiler supports the C++14 deprecated attribute.
 

Detailed Description

Macros and helper code to determine what subset of C++11/14/17 is available.

Copyright Information

Copyright (c) 2016 The DiSTI Corporation.
11486 Corporate Blvd; Suite 190
Orlando, Florida 32817
USA

All rights reserved.

This Software contains proprietary trade secrets of DiSTI and may not be reproduced, in whole or part, in any form, or by any means of electronic, mechanical, or otherwise, without the written permission of DiSTI. Said permission may be derived through the purchase of applicable DiSTI product licenses which detail the distribution rights of this content and any Derivative Works based on this or other copyrighted DiSTI Software.

NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND, AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.

LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT EXCEED FIVE DOLLARS (US$5.00).

The aforementioned terms and restrictions are governed by the laws of the State of Florida and the United States of America.

Macro Definition Documentation

#define DISTI_STATIC_ASSERT (   expr,
  msg 
)    static_assert( expr, DISTI_PREPROC_STRINGIFY( msg ) )

Uses C++11's static_assert() because it is available on this platform.

Parameters
expra compile-time integral or pointer expression
msga C identifier that will appear in compiler diagnostics
Note
For older compilers' benefit, msg should be a C identifier such as:
DISTI_STATIC_ASSERT( (std::is_convertible<T*,ConvertsTo*>::value), class_does_not_inherit_from_##ConvertsTo )
which shows a compile-time error that typically includes: "ERROR_class_does_not_inherit_from_Group". If it is not a C identifier, you may get spurious error messages at compile time compilers without static_assert.
#define DISTI_STATIC_ASSERT_IS_CONVERTIBLE_TO (   T,
  ConvertsTo 
)    DISTI_STATIC_ASSERT( ( std::is_convertible<T*, ConvertsTo*>::value ), class_does_not_inherit_from_##ConvertsTo );

Convenience macro to check that one type converts to another at compile-time.

Parameters
TA class to check
ConvertsToA class to test T* against to verify that it can be converted to ConvertsTo* without a cast.
#define DISTI_STATIC_ASSERT_STR (   expr,
  msg 
)    static_assert( expr, msg )

Uses C++11's static_assert() because it is available on this platform.

Parameters
expra compile-time integral or pointer expression with a string message.
msga string to help the developer determine what went wrong.
DISTI_STATIC_ASSERT_STR( (std::is_convertible<T*, Base*>::value), "Class does not inherit from Base." );
Note
Adapted from Loki 0.1.7.