Skip to content

Commit

Permalink
Eliminate cetl/pf17/attribute.hpp (issue #114) (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
serges147 authored May 13, 2024
1 parent 10fbb2b commit 63a1184
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 30 deletions.
2 changes: 1 addition & 1 deletion cetlvast/include/cetlvast/smf_policies.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#ifndef CETLVAST_SMF_POLICIES_HPP_INCLUDED
#define CETLVAST_SMF_POLICIES_HPP_INCLUDED

#include <cetl/pf17/attribute.hpp>
#include <cetl/cetl.hpp>
#include <cstdint>

namespace cetlvast
Expand Down
15 changes: 15 additions & 0 deletions include/cetl/cetl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,21 @@ static_assert((__cplusplus == CETL_CPP_STANDARD_14 || __cplusplus == CETL_CPP_ST
__cplusplus >= CETL_CPP_STANDARD_20),
"Unknown __cplusplus value found?");

/// CETL_NODISCARD
#ifndef CETL_NODISCARD
# if (__cplusplus >= CETL_CPP_STANDARD_17) || defined(CETL_DOXYGEN)
/// A compatibility macros that expands to \c [[nodiscard]] if C++17 or later is used, otherwise it expands to
/// a compiler-specific alternative if one is known, otherwise it expands to nothing.
# define CETL_NODISCARD [[nodiscard]]
# else
# if defined(__GNUC__) || defined(__clang__)
# define CETL_NODISCARD __attribute__((warn_unused_result))
# else
# define CETL_NODISCARD
# endif
# endif
#endif

/// @namespace cetl This namespace contains types specific to CETL and nested namespaces that contain types adhering
/// to target C++ specifications.
/// @namespace cetl::pmr CETL extensions to the standard Polymorphic Memory Resource (PMR) namespace, `std::pmr`.
Expand Down
26 changes: 0 additions & 26 deletions include/cetl/pf17/attribute.hpp

This file was deleted.

2 changes: 1 addition & 1 deletion include/cetl/pf17/optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#ifndef CETL_PF17_OPTIONAL_HPP_INCLUDED
#define CETL_PF17_OPTIONAL_HPP_INCLUDED

#include <cetl/cetl.hpp>
#include <cetl/_helper_enable_copy_move.hpp>
#include <cetl/pf17/utility.hpp>
#include <cetl/pf17/attribute.hpp>
#include <cetl/pf17/type_traits.hpp>

#include <algorithm>
Expand Down
2 changes: 1 addition & 1 deletion include/cetl/pf17/variant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#ifndef CETL_PF17_VARIANT_HPP_INCLUDED
#define CETL_PF17_VARIANT_HPP_INCLUDED

#include <cetl/cetl.hpp>
#include <cetl/pf17/utility.hpp>
#include <cetl/pf17/type_traits.hpp>
#include <cetl/pf17/attribute.hpp>
#include <cetl/type_traits_ext.hpp>

#include <tuple>
Expand Down
4 changes: 3 additions & 1 deletion include/cetl/rtti.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
#ifndef CETL_RTTI_HPP_INCLUDED
#define CETL_RTTI_HPP_INCLUDED

#include <cetl/pf17/attribute.hpp>
#ifndef CETL_H_ERASE
# include "cetl/cetl.hpp"
#endif

#include <array>
#include <cstdint>
Expand Down

0 comments on commit 63a1184

Please sign in to comment.