Subject: [Boost-bugs] [Boost C++ Libraries] #9153: Building boost::log in Sun Studio 12.3: boost::log::aux::light_function fails to build
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-23 21:20:48
#9153: Building boost::log in Sun Studio 12.3: boost::log::aux::light_function
fails to build
-------------------------------------------------+---------------------
Reporter: Brian Vandenberg <phantall+boost@â¦> | Owner: andysem
Type: Bugs | Status: new
Milestone: To Be Determined | Component: log
Version: Boost 1.54.0 | Severity: Problem
Keywords: |
-------------------------------------------------+---------------------
I get an error building boost::log in Sun Studio 12.3, while building
anything that uses '''light_function_pp.hpp''':
{{{
"./boost/log/detail/light_function_pp.hpp", line 44: Error: Multiple
declaration for impl.
"./boost/log/expressions/filter.hpp", line 58: Where: While
specializing "boost::log::v2_mt_posix::aux::light_function<bool(const
boost::log::v2_mt_posix::attribute_value_set&)>".
"./boost/log/expressions/filter.hpp", line 58: Where: Specialized in
non-template code.
}}}
I can reproduce this problem on a much smaller scale:
{{{
template < typename SignatureT >
class light_function ;
template < typename ResultT, typename ArgT0 >
class light_function < ResultT ( ArgT0 ) > {
private:
struct impl_base {};
impl_base *m_pImpl;
#if defined( BREAK_IT )
template < typename FunT >
class impl;
template < typename FunT >
friend class impl;
#endif
template < typename FunT >
class impl : public impl_base {};
#if !defined( BREAK_IT )
template < typename FunT >
friend class impl;
#endif
public:
template <typename T>
light_function( T const &t ) : m_pImpl( static_cast<impl_base*)new
impl<T>() ) {}
};
int main( int argc, char *argv[] ) {
light_function<bool(int&)> lf(3);
return 0;
}
}}}
When compiled in Linux or Solaris with SS12.3, I get the exact same error.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9153> 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:14 UTC