[Boost-bugs] [Boost C++ Libraries] #13108: BOOST_STATIC_ASSERT occurs when serializing a class with default constructor explicitly defined

Subject: [Boost-bugs] [Boost C++ Libraries] #13108: BOOST_STATIC_ASSERT occurs when serializing a class with default constructor explicitly defined
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-07-06 08:35:08


#13108: BOOST_STATIC_ASSERT occurs when serializing a class with default
constructor explicitly defined
------------------------------+---------------------------
 Reporter: nest_kds@… | Owner: Robert Ramey
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: serialization
  Version: Boost 1.63.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------
 the following code gives an error:

 {{{
 struct myStruct_assert{
     myStruct_assert(){}
     int objectId;
 };
 BOOST_STATIC_ASSERT(
 boost::serialization::detail::is_default_constructible< myStruct_assert
>::value );
 }}}

 error C2027: use of undefined type 'boost::STATIC_ASSERTION_FAILURE<x>
 with [ x=false ]'

 while the following code produces no error
 {{{
 struct myStruct_noassert{
     int objectId;
 };
 BOOST_STATIC_ASSERT(
 boost::serialization::detail::is_default_constructible< myStruct_noassert
>::value );
 }}}

 Also, in case of

 {{{
 boost::optional< int > objectId;
 }}}

 the error is produced in both cases - with or without default constructor
 specified

 boost libraries are compiled with following parameters:

 {{{

 toolset=msvc-9.0
 variant=debug
 threading=multi
 link=shared/static

 BOOST_USE_WINAPI_VERSION=0x0501
 _BIND_​TO_CURRENT_VCLIBS_VERSION
 BOOST_ALL_DYN_LINK
 BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
 BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13108>
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-07-06 08:38:26 UTC