Subject: [Boost-bugs] [Boost C++ Libraries] #8725: GCC 4.8 warns of ignored attribute in declaration
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-24 19:19:25
#8725: GCC 4.8 warns of ignored attribute in declaration
-------------------------------------------+-----------------------------
Reporter: Chris Stylianou <chris5287@â¦> | Owner: vladimir_prus
Type: Bugs | Status: new
Milestone: Boost 1.54.0 | Component: program_options
Version: Boost Development Trunk | Severity: Problem
Keywords: |
-------------------------------------------+-----------------------------
When compiling with -Wall (GCC 4.8.0) the following warning is raised as
an error:
{{{
In file included from libs/program_options/src/variables_map.cpp:12:0:
./boost/program_options/variables_map.hpp:30:11: error: attribute ignored
in declaration of âclass boost::program_options::variables_mapâ
[-Werror=attributes]
class variables_map;
^
./boost/program_options/variables_map.hpp:30:11: note: attribute for
âclass boost::program_options::variables_mapâ must follow the âclassâ
keyword
}}}
This is caused by friend class declaration below having the attributes in
the wrong order. Below is the simple fix.
{{{
Index: boost/program_options/variables_map.hpp
===================================================================
--- boost/program_options/variables_map.hpp (revision 84899)
+++ boost/program_options/variables_map.hpp (working copy)
@@ -98,7 +98,7 @@
void store(const basic_parsed_options<char>& options,
variables_map& m, bool);
- friend BOOST_PROGRAM_OPTIONS_DECL class variables_map;
+ friend class BOOST_PROGRAM_OPTIONS_DECL variables_map;
};
/** Implements string->string mapping with convenient value casting
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8725> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC