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...

Go to the source code of this file.

Classes

struct  is_convertible< T, U >
 Replacement for std::is_convertible, adapted from Loki 0.1.7. More...
 
struct  is_convertible< T, T >
 
struct  is_convertible< void, T >
 
struct  is_convertible< T, void >
 
struct  is_convertible< void, void >
 
struct  CompileTimeError< int >
 
struct  CompileTimeError< true >
 

Namespaces

 disti
 

Macros

#define DISTI_STATIC_ASSERT(expr, msg)
 Poor man's version of C++11's static_assert() More...
 
#define DISTI_STATIC_ASSERT_IS_CONVERTIBLE_TO(T, ConvertsTo)   DISTI_STATIC_ASSERT( (::disti::_cppLangSupportDetail::is_convertible<T*, ConvertsTo*>::value ), class_does_not_inherit_from_##ConvertsTo )
 

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 
)
Value:
{ \
(void)ERROR_##msg; \
}
Definition: gls_cpp_lang_support.h:285

Poor man's version of C++11's static_assert()

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.
Adapted from Loki 0.1.7.
#define DISTI_STATIC_ASSERT_IS_CONVERTIBLE_TO (   T,
  ConvertsTo 
)    DISTI_STATIC_ASSERT( (::disti::_cppLangSupportDetail::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.
Note
This macro appears here for grouping with like code, but macros aren't scoped to namespace.