From c8bd18d6dee9ca3cc41307cc8fdb5575df5ad399 Mon Sep 17 00:00:00 2001 From: Ryan Malcolm Underwood Date: Sun, 6 Oct 2024 20:13:05 +0100 Subject: [PATCH] refactor: update copyright, modify forward assert --- include/boost/optional/detail/optional_utility.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/boost/optional/detail/optional_utility.hpp b/include/boost/optional/detail/optional_utility.hpp index d17babb..581a7e7 100644 --- a/include/boost/optional/detail/optional_utility.hpp +++ b/include/boost/optional/detail/optional_utility.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2024 typenameTea. +// Copyright (C) 2024 Ryan Malcolm Underwood. // // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -9,8 +9,8 @@ // You are welcome to contact the author at: // typenametea@gmail.com -#ifndef BOOST_OPTIONAL_OPTIONAL_DETAIL_OPTIONAL_UTILITY_TNT_05OCT2024_HPP -#define BOOST_OPTIONAL_OPTIONAL_DETAIL_OPTIONAL_UTILITY_TNT_05OCT2024_HPP +#ifndef BOOST_OPTIONAL_OPTIONAL_DETAIL_OPTIONAL_UTILITY_RMU_06OCT2024_HPP +#define BOOST_OPTIONAL_OPTIONAL_DETAIL_OPTIONAL_UTILITY_RMU_06OCT2024_HPP namespace boost { namespace optional_detail { @@ -25,7 +25,9 @@ inline constexpr T&& forward(typename boost::remove_reference::type& t) noexc template inline constexpr T&& forward(typename boost::remove_reference::type&& t) noexcept { - BOOST_STATIC_ASSERT_MSG(!boost::is_lvalue_reference::value, "Can not forward an rvalue as an lvalue."); +#ifndef BOOST_NO_CXX11_STATIC_ASSERT + static_assert(!boost::is_lvalue_reference::value, "Can not forward an rvalue as an lvalue."); +#endif return static_cast(t); }