Skip to content

Commit 168e60a

Browse files
committed
Added unused attribute for new versions of GCC
[SVN r84470]
1 parent 9521991 commit 168e60a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

include/boost/concept/detail/general.hpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,19 @@ struct requirement_<void(*)(Model)>
6565

6666
# endif
6767

68+
// Version check from https://svn.boost.org/trac/boost/changeset/82886
69+
// (boost/static_assert.hpp)
70+
#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)))
71+
#define BOOST_CONCEPT_UNUSED_TYPEDEF __attribute__((unused))
72+
#else
73+
#define BOOST_CONCEPT_UNUSED_TYPEDEF /**/
74+
#endif
75+
6876
# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
6977
typedef ::boost::concepts::detail::instantiate< \
7078
&::boost::concepts::requirement_<ModelFnPtr>::failed> \
71-
BOOST_PP_CAT(boost_concept_check,__LINE__)
79+
BOOST_PP_CAT(boost_concept_check,__LINE__) \
80+
BOOST_CONCEPT_UNUSED_TYPEDEF
7281

7382
}}
7483

0 commit comments

Comments
 (0)