Opened 6 years ago

#7736 new Support Requests

Boost.Units io.hpp always includes Boost.serialization and an unwanted Clang warning

Reported by: Paul A. Bristow Owned by: Steven Watanabe
Milestone: To Be Determined Component: units
Version: Boost 1.52.0 Severity: Optimization
Keywords: units serialization dllexport attribute clang Cc:


I note that Boost.Units io.hpp always #includes serialization (a not inconsiderable amount of code to parse etc). It would be nice if Serialization could only be included when required (but perhaps this is troublesome?)

This became apparent when compiling using Clang 3.1 (Ruben van Boxem's mingw32) on Netbeans 7.2 on Windows 7 when this ugly warning appeared:

In file included from i:/boost-trunk\boost/units/io.hpp:27:
In file included from i:/boost-trunk\boost/serialization/nvp.hpp:34:
In file included from i:/boost-trunk\boost/serialization/base_object.hpp:39:
i:/boost-trunk\boost/serialization/void_cast_fwd.hpp:29:1: warning: dllexport attribute ignored
i:/boost-trunk\boost/serialization/force_include.hpp:37:43: note: expanded from macro 'BOOST_DLLEXPORT'
#       define BOOST_DLLEXPORT __declspec(dllexport)
<built-in>:150:38: note: expanded from macro '__declspec'
#define __declspec(a) __attribute__((a))
1 warning generated.

This also suggests that inappropriate dllexport attribute is being generated for Clang?

Change History (0)

Note: See TracTickets for help on using tickets.