diff options
author | David Robillard <d@drobilla.net> | 2020-11-26 16:07:36 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-26 16:31:37 +0100 |
commit | ceafc91561e969ead43a384648d54a6aa01c3912 (patch) | |
tree | 37083e476a13cea723b22a20d8503643582cd6df /bindings/cxx | |
parent | a9922aa57598985812d84894a80df29460d58c3b (diff) | |
download | pugl-ceafc91561e969ead43a384648d54a6aa01c3912.tar.gz pugl-ceafc91561e969ead43a384648d54a6aa01c3912.tar.bz2 pugl-ceafc91561e969ead43a384648d54a6aa01c3912.zip |
Document PUGL_CHECK_CONSTRUCTION
Diffstat (limited to 'bindings/cxx')
-rw-r--r-- | bindings/cxx/include/pugl/pugl.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bindings/cxx/include/pugl/pugl.hpp b/bindings/cxx/include/pugl/pugl.hpp index 83aa4a0..a16b67f 100644 --- a/bindings/cxx/include/pugl/pugl.hpp +++ b/bindings/cxx/include/pugl/pugl.hpp @@ -261,6 +261,17 @@ private: #elif defined(PUGL_HPP_ASSERT_CONSTRUCTION) # define PUGL_CHECK_CONSTRUCTION(cond, msg) assert(cond); #else +/** + Configurable macro for handling construction failure. + + If `PUGL_HPP_THROW_FAILED_CONSTRUCTION` is defined, then this throws a + `pugl::FailedConstructionError` if construction fails. + + If `PUGL_HPP_ASSERT_CONSTRUCTION` is defined, then this asserts if + construction fails. + + Otherwise, this does nothing. +*/ # define PUGL_CHECK_CONSTRUCTION(cond, msg) #endif |