mirror of
https://github.com/boostorg/describe.git
synced 2026-01-20 16:32:36 +00:00
Compare commits
7 Commits
feature/se
...
feature/op
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6bf0c4f1e | ||
|
|
c156466e2b | ||
|
|
9273e7c0af | ||
|
|
ef9c38f90c | ||
|
|
6749a0f46a | ||
|
|
c8c46bfdf7 | ||
|
|
ccfed27ddd |
29
.github/workflows/ci.yml
vendored
29
.github/workflows/ci.yml
vendored
@@ -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}}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 << "{";
|
||||
|
||||
@@ -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
|
||||
{
|
||||
};
|
||||
|
||||
@@ -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<<;
|
||||
|
||||
@@ -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>=;
|
||||
|
||||
Reference in New Issue
Block a user