Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#6846 closed Bugs (fixed)

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 (0)

Change History (4)

comment:1 Changed 6 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 6 years ago by Eric Niebler

Status: newassigned

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 6 years ago by Eric Niebler

Resolution: fixed
Status: assignedclosed

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

comment:4 Changed 6 years ago by anonymous

Replacing MPL assert does the trick. Thanks.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Eric Niebler.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.