Skip to content

Commit

Permalink
Require C++11 as the minimum c++ standard.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskohlhoff committed Oct 25, 2023
1 parent 02e55c0 commit 3b19147
Show file tree
Hide file tree
Showing 490 changed files with 11,407 additions and 23,039 deletions.
21 changes: 0 additions & 21 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: "{branch} (#{build})"

image:
- Visual Studio 2013
- Visual Studio 2015
- Visual Studio 2017
- Visual Studio 2019
Expand Down Expand Up @@ -39,18 +38,6 @@ environment:
MINGW: 1

for:
-
matrix:
only:
- image: Visual Studio 2013
environment:
BOOSTDIR: C:\Libraries\boost_1_58_0
build_script:
- call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86
- call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
- cd asio\src
- nmake -f Makefile.msc
- nmake -f Makefile.msc check
-
matrix:
only:
Expand Down Expand Up @@ -103,14 +90,6 @@ for:

matrix:
exclude:
- image: Visual Studio 2013
SEPARATE_COMPILATION: 1
- image: Visual Studio 2013
CXXLATEST: 1
- image: Visual Studio 2013
USING_BOOST: 1
- image: Visual Studio 2013
MINGW: 1
- image: Visual Studio 2015
HEADER_ONLY: 1
- image: Visual Studio 2015
Expand Down
34 changes: 5 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build-type: ['sanity']
runs-on: [ubuntu-20.04, ubuntu-22.04, macos-latest]
compiler: [g++-7, g++-8, g++-9, g++-10, g++-11, g++-12, clang++-10, clang++-14, g++]
cxx-std: ['c++03', 'c++11', 'c++14', 'c++17', 'c++2a', 'c++20']
cxx-std: ['c++11', 'c++14', 'c++17', 'c++2a', 'c++20']
separate-compilation: ['', '--enable-separate-compilation']
optim-level: ['-O0']
no-deprecated: ['']
Expand Down Expand Up @@ -111,8 +111,6 @@ jobs:
select-reactor: -DASIO_DISABLE_EPOLL
- compiler: g++-11
select-reactor: -DASIO_DISABLE_EPOLL
# C++03 builds are always explicitly included
- cxx-std: c++03
include:
#
# Linux / g++-12 -std=c++20 -fcoroutines / -O2 / standalone
Expand Down Expand Up @@ -237,17 +235,6 @@ jobs:
separate-compilation: --enable-separate-compilation
optim-level: -O0
#
# Linux / g++-7 / -O2 / boost 1.80
#
- build-type: full
runs-on: ubuntu-20.04
compiler: g++-7
cxx-std: c++03
separate-compilation: --enable-separate-compilation
optim-level: -O2
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_80_0
boost-url: https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2
#
# Linux / g++-7 -std=c++11 / -O2 / boost 1.80
#
- build-type: full
Expand Down Expand Up @@ -284,17 +271,6 @@ jobs:
cxx-std: c++11
optim-level: -O2
#
# Linux / clang++-10 -std=c++11 / -O0 / boost 1.80 / separate compilation
#
- build-type: full
runs-on: ubuntu-20.04
compiler: clang++-10
cxx-std: c++03
separate-compilation: --enable-separate-compilation
optim-level: -O0
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_80_0
boost-url: https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2
#
# macOS / c++2a -fcoroutines-ts / -O2 / standalone
#
- build-type: full
Expand Down Expand Up @@ -329,22 +305,22 @@ jobs:
separate-compilation: --enable-separate-compilation
optim-level: -O0
#
# macOS / c++03 / -O2 / boost 1.80
# macOS / c++11 / -O2 / boost 1.80
#
- build-type: full
runs-on: macos-latest
compiler: g++
cxx-std: c++03
cxx-std: c++11
optim-level: -O2
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_80_0
boost-url: https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2
#
# macOS / c++03 / -O2 / boost 1.80 / separate compilation
# macOS / c++11 / -O2 / boost 1.80 / separate compilation
#
- build-type: full
runs-on: macos-latest
compiler: g++
cxx-std: c++03
cxx-std: c++11
separate-compilation: --enable-separate-compilation
optim-level: -O0
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_80_0
Expand Down
8 changes: 0 additions & 8 deletions asio/include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ nobase_include_HEADERS = \
asio/detail/fenced_block.hpp \
asio/detail/functional.hpp \
asio/detail/future.hpp \
asio/detail/gcc_arm_fenced_block.hpp \
asio/detail/gcc_hppa_fenced_block.hpp \
asio/detail/gcc_sync_fenced_block.hpp \
asio/detail/gcc_x86_fenced_block.hpp \
asio/detail/global.hpp \
asio/detail/handler_alloc_helpers.hpp \
asio/detail/handler_cont_helpers.hpp \
Expand Down Expand Up @@ -199,7 +195,6 @@ nobase_include_HEADERS = \
asio/detail/kqueue_reactor.hpp \
asio/detail/limits.hpp \
asio/detail/local_free_on_block_exit.hpp \
asio/detail/macos_fenced_block.hpp \
asio/detail/memory.hpp \
asio/detail/mutex.hpp \
asio/detail/non_const_lvalue.hpp \
Expand Down Expand Up @@ -271,7 +266,6 @@ nobase_include_HEADERS = \
asio/detail/socket_option.hpp \
asio/detail/socket_select_interrupter.hpp \
asio/detail/socket_types.hpp \
asio/detail/solaris_fenced_block.hpp \
asio/detail/source_location.hpp \
asio/detail/static_mutex.hpp \
asio/detail/std_event.hpp \
Expand All @@ -298,14 +292,12 @@ nobase_include_HEADERS = \
asio/detail/tss_ptr.hpp \
asio/detail/type_traits.hpp \
asio/detail/utility.hpp \
asio/detail/variadic_templates.hpp \
asio/detail/wait_handler.hpp \
asio/detail/wait_op.hpp \
asio/detail/winapp_thread.hpp \
asio/detail/wince_thread.hpp \
asio/detail/win_event.hpp \
asio/detail/win_fd_set_adapter.hpp \
asio/detail/win_fenced_block.hpp \
asio/detail/win_global.hpp \
asio/detail/win_iocp_file_service.hpp \
asio/detail/win_iocp_handle_read_op.hpp \
Expand Down
56 changes: 25 additions & 31 deletions asio/include/asio/any_completion_executor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,18 @@ class any_completion_executor :
#endif // !defined(GENERATING_DOCUMENTATION)

/// Default constructor.
ASIO_DECL any_completion_executor() ASIO_NOEXCEPT;
ASIO_DECL any_completion_executor() noexcept;

/// Construct in an empty state. Equivalent effects to default constructor.
ASIO_DECL any_completion_executor(nullptr_t) ASIO_NOEXCEPT;
ASIO_DECL any_completion_executor(nullptr_t) noexcept;

/// Copy constructor.
ASIO_DECL any_completion_executor(
const any_completion_executor& e) ASIO_NOEXCEPT;
const any_completion_executor& e) noexcept;

#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
ASIO_DECL any_completion_executor(
any_completion_executor&& e) ASIO_NOEXCEPT;
#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
any_completion_executor&& e) noexcept;

/// Construct to point to the same target as another any_executor.
#if defined(GENERATING_DOCUMENTATION)
Expand All @@ -98,7 +96,7 @@ class any_completion_executor :
#else // defined(GENERATING_DOCUMENTATION)
template <typename OtherAnyExecutor>
any_completion_executor(OtherAnyExecutor e,
typename constraint<
constraint_t<
conditional<
!is_same<OtherAnyExecutor, any_completion_executor>::value
&& is_base_of<execution::detail::any_executor_base,
Expand All @@ -108,8 +106,8 @@ class any_completion_executor :
is_valid_target<OtherAnyExecutor>,
false_type
>::type::value
>::type = 0)
: base_type(ASIO_MOVE_CAST(OtherAnyExecutor)(e))
> = 0)
: base_type(static_cast<OtherAnyExecutor&&>(e))
{
}
#endif // defined(GENERATING_DOCUMENTATION)
Expand All @@ -122,7 +120,7 @@ class any_completion_executor :
#else // defined(GENERATING_DOCUMENTATION)
template <typename OtherAnyExecutor>
any_completion_executor(std::nothrow_t, OtherAnyExecutor e,
typename constraint<
constraint_t<
conditional<
!is_same<OtherAnyExecutor, any_completion_executor>::value
&& is_base_of<execution::detail::any_executor_base,
Expand All @@ -132,21 +130,19 @@ class any_completion_executor :
is_valid_target<OtherAnyExecutor>,
false_type
>::type::value
>::type = 0) ASIO_NOEXCEPT
: base_type(std::nothrow, ASIO_MOVE_CAST(OtherAnyExecutor)(e))
> = 0) noexcept
: base_type(std::nothrow, static_cast<OtherAnyExecutor&&>(e))
{
}
#endif // defined(GENERATING_DOCUMENTATION)

/// Construct to point to the same target as another any_executor.
ASIO_DECL any_completion_executor(std::nothrow_t,
const any_completion_executor& e) ASIO_NOEXCEPT;
const any_completion_executor& e) noexcept;

#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Construct to point to the same target as another any_executor.
ASIO_DECL any_completion_executor(std::nothrow_t,
any_completion_executor&& e) ASIO_NOEXCEPT;
#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
any_completion_executor&& e) noexcept;

/// Construct a polymorphic wrapper for the specified executor.
#if defined(GENERATING_DOCUMENTATION)
Expand All @@ -155,7 +151,7 @@ class any_completion_executor :
#else // defined(GENERATING_DOCUMENTATION)
template <ASIO_EXECUTION_EXECUTOR Executor>
any_completion_executor(Executor e,
typename constraint<
constraint_t<
conditional<
!is_same<Executor, any_completion_executor>::value
&& !is_base_of<execution::detail::any_executor_base,
Expand All @@ -164,8 +160,8 @@ class any_completion_executor :
Executor, supportable_properties_type>,
false_type
>::type::value
>::type = 0)
: base_type(ASIO_MOVE_CAST(Executor)(e))
> = 0)
: base_type(static_cast<Executor&&>(e))
{
}
#endif // defined(GENERATING_DOCUMENTATION)
Expand All @@ -177,7 +173,7 @@ class any_completion_executor :
#else // defined(GENERATING_DOCUMENTATION)
template <ASIO_EXECUTION_EXECUTOR Executor>
any_completion_executor(std::nothrow_t, Executor e,
typename constraint<
constraint_t<
conditional<
!is_same<Executor, any_completion_executor>::value
&& !is_base_of<execution::detail::any_executor_base,
Expand All @@ -186,21 +182,19 @@ class any_completion_executor :
Executor, supportable_properties_type>,
false_type
>::type::value
>::type = 0) ASIO_NOEXCEPT
: base_type(std::nothrow, ASIO_MOVE_CAST(Executor)(e))
> = 0) noexcept
: base_type(std::nothrow, static_cast<Executor&&>(e))
{
}
#endif // defined(GENERATING_DOCUMENTATION)

/// Assignment operator.
ASIO_DECL any_completion_executor& operator=(
const any_completion_executor& e) ASIO_NOEXCEPT;
const any_completion_executor& e) noexcept;

#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move assignment operator.
ASIO_DECL any_completion_executor& operator=(
any_completion_executor&& e) ASIO_NOEXCEPT;
#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
any_completion_executor&& e) noexcept;

/// Assignment operator that sets the polymorphic wrapper to the empty state.
ASIO_DECL any_completion_executor& operator=(nullptr_t);
Expand All @@ -209,7 +203,7 @@ class any_completion_executor :
ASIO_DECL ~any_completion_executor();

/// Swap targets with another polymorphic wrapper.
ASIO_DECL void swap(any_completion_executor& other) ASIO_NOEXCEPT;
ASIO_DECL void swap(any_completion_executor& other) noexcept;

/// Obtain a polymorphic wrapper with the specified property.
/**
Expand All @@ -222,9 +216,9 @@ class any_completion_executor :
*/
template <typename Property>
any_completion_executor require(const Property& p,
typename constraint<
constraint_t<
traits::require_member<const base_type&, const Property&>::is_valid
>::type = 0) const
> = 0) const
{
return static_cast<const base_type&>(*this).require(p);
}
Expand All @@ -240,9 +234,9 @@ class any_completion_executor :
*/
template <typename Property>
any_completion_executor prefer(const Property& p,
typename constraint<
constraint_t<
traits::prefer_member<const base_type&, const Property&>::is_valid
>::type = 0) const
> = 0) const
{
return static_cast<const base_type&>(*this).prefer(p);
}
Expand Down
Loading

0 comments on commit 3b19147

Please sign in to comment.