mirror of
https://github.com/boostorg/describe.git
synced 2026-01-26 18:33:08 +00:00
Compare commits
4 Commits
feature/pe
...
boost-1.82
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
311cab7565 | ||
|
|
b5df0b2ee9 | ||
|
|
1e32c60dff | ||
|
|
0d8de0aae7 |
@@ -8,6 +8,15 @@ https://www.boost.org/LICENSE_1_0.txt
|
||||
# Revision History
|
||||
:idprefix:
|
||||
|
||||
## Changes in Boost 1.81.0
|
||||
|
||||
* To allow the inclusion of `enumerators.hpp`, `bases.hpp`, and `members.hpp`
|
||||
when the option `-pedantic` is used, the invocation of `BOOST_DESCRIBE_ENUM`
|
||||
has been moved from `modifiers.hpp` into a separate header,
|
||||
`modifier_description.hpp`. As a consequence, `modifiers.hpp` no longer
|
||||
includes `enum.hpp`. Code that has been relying on this implicit inclusion
|
||||
may fail, and will need to be fixed to include `enum.hpp`.
|
||||
|
||||
## Changes in Boost 1.79.0
|
||||
|
||||
* Enabled unions in `BOOST_DESCRIBE_STRUCT` and updated examples to check `std::is_union<T>`.
|
||||
|
||||
@@ -163,6 +163,13 @@ calling `boost::hash_combine` on each.
|
||||
The overload is defined in namespace `app` in order to apply
|
||||
to all annotated classes also defined in `app`.
|
||||
|
||||
NOTE: Since release 1.81.0, Boost.ContainerHash provides its
|
||||
own, built-in, support for described classes, by having an
|
||||
overload of `boost::hash_value` very similar to the one given
|
||||
below. Consequently, when using Boost 1.81.0 or later, you
|
||||
don't need the below `hash_value` function, as it will cause
|
||||
an ambiguity.
|
||||
|
||||
[source]
|
||||
----
|
||||
include::../../example/hash_value.cpp[lines=5..-1]
|
||||
|
||||
@@ -210,7 +210,7 @@ enum modifiers
|
||||
mod_function = 32,
|
||||
mod_any_member = 64,
|
||||
mod_inherited = 128,
|
||||
mod_hidden = 256,
|
||||
mod_hidden = 256
|
||||
};
|
||||
|
||||
constexpr modifiers mod_any_access = static_cast<modifiers>( mod_public | mod_protected | mod_private );
|
||||
@@ -234,6 +234,12 @@ following flags:
|
||||
* `mod_inherited` - includes members of base classes
|
||||
* `mod_hidden` - includes hidden inherited members
|
||||
|
||||
## <boost/describe/{zwsp}modifier_description.hpp>
|
||||
|
||||
The header `modifier_description.hpp` includes `modifiers.hpp` and invokes
|
||||
`BOOST_DESCRIBE_ENUM` on `modifiers`, allowing `describe_enumerators<modifiers>`
|
||||
to work.
|
||||
|
||||
## <boost/describe/bases.hpp>
|
||||
|
||||
```
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
// Copyright 2021 Peter Dimov
|
||||
// Copyright 2021, 2022 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/container_hash/hash.hpp>
|
||||
#include <boost/describe.hpp>
|
||||
#include <boost/mp11.hpp>
|
||||
#include <boost/container_hash/hash.hpp>
|
||||
#include <boost/variant2/variant.hpp>
|
||||
#include <boost/version.hpp>
|
||||
#include <vector>
|
||||
|
||||
using namespace boost::describe;
|
||||
@@ -13,6 +14,8 @@ using namespace boost::describe;
|
||||
namespace app
|
||||
{
|
||||
|
||||
#if BOOST_VERSION < 108100
|
||||
|
||||
template<class T,
|
||||
class Bd = describe_bases<T, mod_any_access>,
|
||||
class Md = describe_members<T, mod_any_access>,
|
||||
@@ -37,6 +40,8 @@ template<class T,
|
||||
return r;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
struct A
|
||||
{
|
||||
int x = 1;
|
||||
|
||||
@@ -85,7 +85,7 @@ explicit describe_cxx14 ;
|
||||
|
||||
local CXX14 = [ check-target-builds describe_cxx14 describe_cxx14 : : <build>no ] "<toolset>msvc-14.0:<cxxflags>-wd4100" ;
|
||||
|
||||
local JSON = <library>/boost//json/<warnings>off "<toolset>msvc-14.0:<build>no" "<toolset>msvc-14.2:<cxxflags>-wd5104" ;
|
||||
local JSON = <library>/boost//json/<warnings>off "<toolset>msvc-14.2:<cxxflags>-wd5104" ;
|
||||
local SERIALIZATION = <library>/boost//serialization/<warnings>off "-<toolset>clang:<warnings-as-errors>on" ;
|
||||
|
||||
run ../example/printing_enums_ct.cpp : : : $(CXX14) ;
|
||||
|
||||
Reference in New Issue
Block a user