Opened 8 years ago

Closed 7 years ago

#10545 closed Bugs (fixed)

Bug causing linking problems

Reported by: jlodos@… Owned by: Robert Ramey
Milestone: To Be Determined Component: serialization
Version: Boost 1.56.0 Severity: Problem
Keywords: Cc: ramey@…

Description (last modified by Robert Ramey)

The implementations of is_whitespace functions in basic_text_iprimitive.ipp must be inline.

namespace detail {

template<class CharType> bool is_whitespace(CharType c);

template<> inline bool is_whitespace(char t){

return 0 != std::isspace(t);

}

#ifndef BOOST_NO_CWCHAR template<> inline bool is_whitespace(wchar_t t){

return 0 != std::iswspace(t);

} #endif

} detail

Does the code in your package not show this?

Robert Ramey

Change History (4)

comment:1 by Robert Ramey, 8 years ago

Resolution: duplicate
Status: newclosed

comment:2 by Robert Ramey, 8 years ago

Description: modified (diff)
Resolution: duplicate
Status: closedreopened

my copy of the current code is exactly the code you have above.

namespace detail {
    template<class CharType>
    bool is_whitespace(CharType c);

    template<>
    bool is_whitespace(char t){
        return 0 != std::isspace(t);
    }

    #ifndef BOOST_NO_CWCHAR
    template<>
    bool is_whitespace(wchar_t t){
        return 0 != std::iswspace(t);
    }
    #endif
} // detail

comment:3 by jlodos@…, 8 years ago

It is not identical :-) Please note the inline modifiers. As it stands now the linker gets multiple copies of these functions if the headers are included in different compilation units. Thanks for your time and the serialization library :-)

comment:4 by Robert Ramey, 7 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.