/usr/include/boost/contract/detail
NameSizeModeActions
condition/-0755rm
inlined/-0755rm
operation/-0755rm
preprocessor/-0755rm
type_traits/-0755rm
assert.hpp10840644editdlrm
auto_ptr.hpp14250644editdlrm
check.hpp16910644editdlrm
checking.hpp21590644editdlrm
config.hpp8930644editdlrm
debug.hpp7460644editdlrm
decl.hpp50430644editdlrm
declspec.hpp20060644editdlrm
exception.hpp10720644editdlrm
inlined.hpp5650644editdlrm
name.hpp9450644editdlrm
none.hpp8770644editdlrm
noop.hpp7170644editdlrm
operator_safe_bool.hpp34700644editdlrm
static_local_var.hpp14430644editdlrm
tvariadic.hpp65970644editdlrm
Edit: /usr/include/boost/contract/detail/static_local_var.hpp (1443B)
#ifndef BOOST_CONTRACT_DETAIL_STATIC_LOCAL_VAR_HPP_ #define BOOST_CONTRACT_DETAIL_STATIC_LOCAL_VAR_HPP_ // Copyright (C) 2008-2018 Lorenzo Caminiti // Distributed under the Boost Software License, Version 1.0 (see accompanying // file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt). // See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html namespace boost { namespace contract { namespace detail { // This is used to hold the state of this library (already checking assertions, // failure handers, mutexes, etc.). Local static variables are used instead of // global or class-level static variables to avoid ODR errors when this library // is used as header-only. // Use T's default constructor to init the local var. template struct static_local_var { static T& ref() { static T data; return data; } }; // Use `init` param to init local var (Init same as or convertible to T). // NOTE: Template specializations could be used to program both this and the // template above together but some pre-C++11 compilers give errors (e.g., Clang // without -std=c++11), plus the `_init` postfix is more readable at call site. template struct static_local_var_init { static T& ref() { static T data = init; return data; } }; } } } // namespace #endif // #include guard