Compare commits

...

7 Commits

Author SHA1 Message Date
Peter Dimov
f6bf0c4f1e Replace macos-10.15 with macos-11 in ci.yml 2022-09-29 20:40:21 +03:00
Peter Dimov
c156466e2b Fix operator test failures 2022-09-29 20:11:07 +03:00
Peter Dimov
9273e7c0af Add member functions to X in operator_eq_test, operator_lt_test 2022-09-29 20:07:59 +03:00
Peter Dimov
ef9c38f90c Update documentation 2022-06-21 20:19:56 +03:00
Peter Dimov
6749a0f46a Disable msvc-12.0 and below warnings in bases_test.cpp 2022-06-21 19:31:06 +03:00
Peter Dimov
c8c46bfdf7 Disable -Wrestrict in pm_to_string.cpp for GCC 12 2022-06-21 18:02:06 +03:00
Peter Dimov
ccfed27ddd Update .yml files 2022-06-21 17:06:42 +03:00
8 changed files with 47 additions and 18 deletions

View File

@@ -47,6 +47,10 @@ jobs:
cxxstd: "03,11,14,17,2a"
os: ubuntu-20.04
install: g++-11
- toolset: gcc-12
cxxstd: "03,11,14,17,20"
os: ubuntu-22.04
install: g++-12
- toolset: clang
compiler: clang++-3.9
cxxstd: "03,11,14"
@@ -97,9 +101,19 @@ jobs:
cxxstd: "03,11,14,17,2a"
os: ubuntu-20.04
install: clang-12
- toolset: clang
compiler: clang++-13
cxxstd: "03,11,14,17,20"
os: ubuntu-22.04
install: clang-13
- toolset: clang
compiler: clang++-14
cxxstd: "03,11,14,17,20"
os: ubuntu-22.04
install: clang-14
- toolset: clang
cxxstd: "03,11,14,17,2a"
os: macos-10.15
os: macos-11
runs-on: ${{matrix.os}}
@@ -152,10 +166,6 @@ jobs:
cxxstd: "14,latest"
addrmd: 32,64
os: windows-2019
- toolset: msvc-14.1
cxxstd: "14,17,latest"
addrmd: 32,64
os: windows-2016
- toolset: msvc-14.2
cxxstd: "14,17,20,latest"
addrmd: 32,64
@@ -224,7 +234,8 @@ jobs:
include:
- os: ubuntu-18.04
- os: ubuntu-20.04
- os: macos-10.15
- os: ubuntu-22.04
- os: macos-11
runs-on: ${{matrix.os}}
@@ -270,7 +281,8 @@ jobs:
include:
- os: ubuntu-18.04
- os: ubuntu-20.04
- os: macos-10.15
- os: ubuntu-22.04
- os: macos-11
runs-on: ${{matrix.os}}
@@ -326,7 +338,8 @@ jobs:
include:
- os: ubuntu-18.04
- os: ubuntu-20.04
- os: macos-10.15
- os: ubuntu-22.04
- os: macos-11
runs-on: ${{matrix.os}}

View File

@@ -15,7 +15,10 @@ branches:
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-14.0
TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0
ADDRMD: 32
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-12.0,msvc-14.0
ADDRMD: 32,64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: msvc-14.1

View File

@@ -478,7 +478,7 @@ This example defines an `operator<<` overload for pointers to members.
[source]
----
include::../../example/pm_to_string.cpp[lines=5..-1]
include::../../example/pm_to_string.cpp[lines=9..-1]
----
Sample output:

View File

@@ -2,6 +2,10 @@
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#if defined(__GNUC__) && __GNUC__ == 12
# pragma GCC diagnostic ignored "-Wrestrict" // false positive
#endif
#include <boost/describe.hpp>
#include <boost/mp11.hpp>
#include <boost/core/type_name.hpp>

View File

@@ -25,8 +25,8 @@ namespace detail
{
template<class T,
class Bd = describe_bases<T, mod_any_access>,
class Md = describe_members<T, mod_any_access>>
class Bd = describe::describe_bases<T, mod_any_access>,
class Md = describe::describe_members<T, mod_any_access>>
bool eq( T const& t1, T const& t2 )
{
bool r = true;
@@ -48,8 +48,8 @@ bool eq( T const& t1, T const& t2 )
}
template<class T,
class Bd = describe_bases<T, mod_any_access>,
class Md = describe_members<T, mod_any_access>>
class Bd = describe::describe_bases<T, mod_any_access>,
class Md = describe::describe_members<T, mod_any_access>>
bool lt( T const& t1, T const& t2 )
{
int r = 0;
@@ -73,8 +73,8 @@ bool lt( T const& t1, T const& t2 )
}
template<class Os, class T,
class Bd = describe_bases<T, mod_any_access>,
class Md = describe_members<T, mod_any_access>>
class Bd = describe::describe_bases<T, mod_any_access>,
class Md = describe::describe_members<T, mod_any_access>>
void print( Os& os, T const& t )
{
os << "{";

View File

@@ -7,6 +7,11 @@
#include <boost/core/lightweight_test.hpp>
#include <boost/core/lightweight_test_trait.hpp>
#if defined(_MSC_VER) && _MSC_VER < 1900
# pragma warning(disable: 4510) // default constructor could not be generated
# pragma warning(disable: 4610) // struct can never be instantiated
#endif
struct X
{
};

View File

@@ -20,9 +20,11 @@ namespace app
struct X
{
void f() const {}
static void g() {}
};
BOOST_DESCRIBE_STRUCT(X, (), ())
BOOST_DESCRIBE_STRUCT(X, (), (f, g))
using boost::describe::operators::operator==;
using boost::describe::operators::operator<<;

View File

@@ -20,9 +20,11 @@ namespace app
struct X
{
void f() const {}
static void g() {}
};
BOOST_DESCRIBE_STRUCT(X, (), ())
BOOST_DESCRIBE_STRUCT(X, (), (f, g))
using boost::describe::operators::operator<=;
using boost::describe::operators::operator>=;