mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add tuple assignment for pair
This commit is contained in:
parent
ae9578ce37
commit
87ed3d5548
11 changed files with 262 additions and 26 deletions
26
sprout/static_assert.hpp
Normal file
26
sprout/static_assert.hpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*=============================================================================
|
||||
Copyright (c) 2011-2014 Bolero MURAKAMI
|
||||
https://github.com/bolero-MURAKAMI/Sprout
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
=============================================================================*/
|
||||
#ifndef SPROUT_STATIC_ASSERT_HPP
|
||||
#define SPROUT_STATIC_ASSERT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/preprocessor/stringize.hpp>
|
||||
|
||||
//
|
||||
// SPROUT_STATIC_ASSERT_MSG
|
||||
// SPROUT_STATIC_ASSERT
|
||||
// SPROUT_STATIC_ASSERT_PREPROCESSED
|
||||
//
|
||||
#define SPROUT_STATIC_ASSERT_MSG(COND, MESSAGE) \
|
||||
static_assert(COND, MESSAGE)
|
||||
#define SPROUT_STATIC_ASSERT(COND) \
|
||||
SPROUT_STATIC_ASSERT_MSG(COND, #COND)
|
||||
#define SPROUT_STATIC_ASSERT_PREPROCESSED(COND) \
|
||||
SPROUT_STATIC_ASSERT_MSG(COND, #COND " \n[[preprocessed]]: " SPROUT_PP_STRINGIZE(COND))
|
||||
|
||||
#endif // #ifndef SPROUT_STATIC_ASSERT_HPP
|
Loading…
Add table
Add a link
Reference in a new issue