Boost logo

Boost :

Subject: [boost] [locale] char conversion issue
From: Alain Miniussi (alain.miniussi_at_[hidden])
Date: 2015-09-21 09:22:23


Hi,

My build is failing on message.cpp with:

../../../libs/locale/src/shared/message.cpp(439): error: invalid type conversion: "const wchar_t *" to "const char *"
                                       static_cast<char const *>(p),
                                       ^
           detected during:
[...]

caused by code like:
=================
            template<typename CharType>
             struct hash_function {
                 size_t operator()(message_key<CharType> const &msg) const
                 {
                     pj_winberger_hash::state_type state = pj_winberger_hash::initial_state;
                     CharType const *p = msg.context();
                     if(*p != 0) {
                         CharType const *e = p;
                         while(*e)
                             e++;
                         state = pj_winberger_hash::update_state(state,
                                     static_cast<char const *>(p),
                                     static_cast<char const *>(e));
                         state = pj_winberger_hash::update_state(state,'\4');
                     }

===================

Which looks like a legitimate error since that conversion does not seems t be covered by static_cast.

This is on bot master and develop branch.

The compiler is intel 16:

[alainm_at_gurney build]$ icpc --version
icpc (ICC) 16.0.0 20150815
Copyright (C) 1985-2015 Intel Corporation. All rights reserved.

[alainm_at_gurney build]$

Regards

Alain


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk