mirror of
https://github.com/boostorg/algorithm.git
synced 2025-07-06 01:06:37 +02:00
Put hex_char_to_int in an unnamed namespace to fix linker errors
[SVN r80696]
This commit is contained in:
@ -69,6 +69,10 @@ namespace detail {
|
|||||||
return std::copy ( res, res + num_hex_digits, out );
|
return std::copy ( res, res + num_hex_digits, out );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// this needs to be in an un-named namespace because it is not a template
|
||||||
|
// and might get included in several compilation units. This could cause
|
||||||
|
// multiple definition errors at link time.
|
||||||
|
namespace {
|
||||||
unsigned hex_char_to_int ( char c ) {
|
unsigned hex_char_to_int ( char c ) {
|
||||||
if ( c >= '0' && c <= '9' ) return c - '0';
|
if ( c >= '0' && c <= '9' ) return c - '0';
|
||||||
if ( c >= 'A' && c <= 'F' ) return c - 'A' + 10;
|
if ( c >= 'A' && c <= 'F' ) return c - 'A' + 10;
|
||||||
@ -76,7 +80,7 @@ namespace detail {
|
|||||||
BOOST_THROW_EXCEPTION (non_hex_input() << bad_char (c));
|
BOOST_THROW_EXCEPTION (non_hex_input() << bad_char (c));
|
||||||
return 0; // keep dumb compilers happy
|
return 0; // keep dumb compilers happy
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// My own iterator_traits class.
|
// My own iterator_traits class.
|
||||||
// It is here so that I can "reach inside" some kinds of output iterators
|
// It is here so that I can "reach inside" some kinds of output iterators
|
||||||
|
Reference in New Issue
Block a user