cppx-core
macro-fail.hpp
Go to the documentation of this file.
1 #pragma once // Source encoding: UTF-8 with BOM (π is a lowercase Greek "pi").
4 
5 #ifndef CPPX_NO_DOLLARS_PLEASE
6 # define $fail CPPX_FAIL
7 # define $fail_ CPPX_FAIL_
8 #endif
9 
10 #define CPPX_FAIL( ... ) \
11  CPPX_FAIL_( std::runtime_error, __VA_ARGS__ )
12 
13 #define CPPX_FAIL_( X, ... ) \
14  ::cppx::fail<X>( std::string( __VA_ARGS__ ), CPPX_SOURCE_LOCATION )