Modify

Ticket #6846 (closed Bugs: fixed)

Opened 2 years ago

Last modified 2 years ago

Clang compilation error on Darwin 64-bit

Reported by: anonymous Owned by: eric_niebler
Milestone: Boost 1.49.0 Component: xpressive
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:

Description

While compiling Boost with clang (verson 3.2-trunk) on Darwin in 64-bit mode, I get:

./boost/xpressive/traits/cpp_regex_traits.hpp:92:42: error: non-type template argument evaluates to 9223372036854775808, which cannot be narrowed to type 'long' [-Wc++11-narrowing]
        BOOST_MPL_ASSERT_RELATION(1, !=, Out);
                                         ^
./boost/mpl/assert.hpp:300:68: note: expanded from macro 'BOOST_MPL_ASSERT_RELATION'
BOOST_MPL_ASSERT_RELATION_IMPL(BOOST_MPL_AUX_PP_COUNTER(), x, rel, y) \
                                                                   ^
./boost/mpl/assert.hpp:270:19: note: expanded from macro '\
BOOST_MPL_ASSERT_RELATION_IMPL'
                , y \
                  ^
./boost/mpl/assert.hpp:56:58: note: expanded from macro '\
BOOST_MPL_AUX_ASSERT_CONSTANT'
#   define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
                                                         ^
./boost/xpressive/traits/cpp_regex_traits.hpp:138:43: note: in instantiation of template class 'boost::xpressive::detail::unused_mask<9223372036855166720, 9223372036854775808, false>' requested here
    umaskex_t const non_std_ctype_blank = unused_mask<all_ctype_masks | non_std_ctype_underscore>::value;
                                          ^
./boost/xpressive/traits/cpp_regex_traits.hpp:92:42: error: non-type template argument evaluates to 9223372036854775808, which cannot be narrowed to type 'long' [-Wc++11-narrowing]
        BOOST_MPL_ASSERT_RELATION(1, !=, Out);
                                         ^
./boost/mpl/assert.hpp:300:68: note: expanded from macro 'BOOST_MPL_ASSERT_RELATION'
BOOST_MPL_ASSERT_RELATION_IMPL(BOOST_MPL_AUX_PP_COUNTER(), x, rel, y) \
                                                                   ^
./boost/mpl/assert.hpp:270:19: note: expanded from macro '\
BOOST_MPL_ASSERT_RELATION_IMPL'
                , y \
                  ^
./boost/mpl/assert.hpp:56:58: note: expanded from macro '\
BOOST_MPL_AUX_ASSERT_CONSTANT'
#   define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
                                                         ^

Please, fix.

Attachments

Change History

comment:1 Changed 2 years ago by eric_niebler

(In [78286]) replace MPL assert with static assert since it's problematic in C++11, refs #6846

comment:2 Changed 2 years ago by eric_niebler

  • Status changed from new to assigned

Since I can't reproduce this bug, I would appreciate it if you could test trunk to see if the problem is fixed there. Thanks.

comment:3 Changed 2 years ago by eric_niebler

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [78303]) merge [78286] from trunk, fixes #6846

comment:4 Changed 2 years ago by anonymous

Replacing MPL assert does the trick. Thanks.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.