Boost Cstdint.hpp Error
boost cstdint.hpp header file ------------------------------------------// // (C) Copyright Beman Dawes 1999. // (C) Copyright Jens Mauer 2001 // (C) Copyright John boost/cstdint.hpp not found Maddock 2001 // Distributed under the Boost // Software License, Version 1.0. boost/cstdint.hpp' file not found (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/integer for documentation. // Revision History // std::uint32_t 31 Oct 01 use BOOST_HAS_LONG_LONG to check for "long long" (Jens M.) // 16 Apr 01 check LONGLONG_MAX when looking for "long long" (Jens Maurer) // 23 Jan 01 uintmax_t prefer "long" over "int" for int32_t and intmax_t (Jens Maurer) // 12 Nov 00 Merged (Jens Maurer) // 23 Sep 00 Added INTXX_C macro support (John Maddock). // 22 Sep 00 Better 64-bit support (John Maddock) // 29 Jun 00 Reimplement to avoid including stdint.h within namespace boost // 8 Aug 99 Initial version (Beman Dawes) #ifndef BOOST_CSTDINT_HPP #define
Uint64_t
BOOST_CSTDINT_HPP // // Since we always define the INT#_C macros as per C++0x, // define __STDC_CONSTANT_MACROS so that does the right // thing if possible, and so that the user knows that the macros // are actually defined as per C99. // #ifndef __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS #endif #include // // Note that GLIBC is a bit inconsistent about whether int64_t is defined or not // depending upon what headers happen to have been included first... // so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG. // See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990 // #if defined(BOOST_HAS_STDINT_H) \ && (!defined(__GLIBC__) \ || defined(__GLIBC_HAVE_LONG_LONG) \ || (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17))))) // The following #include is an implementation artifact; not part of interface. # ifdef __hpux // HP-UX has a vaguely nice in a non-standard location # include # ifdef __STDC_32_MODE__ // this is triggered with GCC, because it defines __cplusplus < 199707L # define BOOST_NO_INT64_T # endif # elif defined(__FreeBSD__) || defined(__IBMCPP__) || defin
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow
Boost C++
the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Boost's “cstdint” Usage up vote 5 down vote favorite Boost's C99 stdint implementation is awfully handy. One thing http://www.boost.org/doc/libs/1_55_0/boost/cstdint.hpp bugs me, though. They dump all of their typedefs into the boost namespace. This leaves me with three choices when using this facility: Use "using namespace boost" Use "using boost::[u]_t" Explicitly refer to the target type with the boost:: prefix; e.g., boost::uint32_t foo = 0; Option № 1 kind of defeats the point of namespaces. Even if used within local scope (e.g., within a function), things like function arguments still have to be http://stackoverflow.com/questions/2709083/boosts-cstdint-usage prefixed like option № 3. Option № 2 is better, but there are a bunch of these types, so it can get noisy. Option № 3 adds an extreme level of noise; the boost:: prefix is often ≥ to the length of the type in question. My question is: What would be the most elegant way to bring all of these types into the global namespace? Should I just write a wrapper around boost/cstdint.hpp that utilizes option № 2 and be done with it? Also, wrapping the header like so didn't work on VC++ 10 (problems with standard library headers): namespace Foo { #include namespace boost_alias = boost; } using namespace Foo::boost_alias; EDIT: I guess another option is to use the preprocessor to make it work on VC 10? Taking the snippet above: #ifndef FOO_HPP_INCLUDED #define FOO_HPP_INCLUDED #if _MSC_VER >= 1600 /*VC++ 10*/ || defined USE_NATIVE_STDINT_HEADER #include #else namespace cstdint_wrapper { #include namespace boost_alias = boost; } using namespace cstdint_wrapper::boost_alias; #endif #endif Less work, I guess? c++ boost wrapper cstdint share|improve this question edited May 1 '12 at 9:54 alain.janinm 12.2k93063 asked Apr 25 '10 at 17:08 patt0h 2814 possible duplicate of stackoverflow.com/questions/1481733/… –Georg Fritzsche Apr 25 '10 at 17:21 @gf: nifty script, thanks. –patt0h Apr 25 '10
Static source code analysis tool for C and C++ code Brought to you by: danielmarjamaki Summary Files Reviews Support News Discussion Wiki Create Topic Stats Graph Forums General Discussion 145 Development 41 Help Formatting https://sourceforge.net/p/cppcheck/discussion/general/thread/659c19ac/ Help cppcheck and boost Forum: General Discussion Creator: Lieven de Cock Created: 2015-07-06 http://www.ogre3d.org/forums/viewtopic.php?f=2&t=70414 Updated: 2015-07-07 Lieven de Cock - 2015-07-06 While trying to reproduce an issue, I however got a lot of those : the problem I wanted to reproduce was that boost/cstdint.hpp was included and cppcheck signals an error on the following snippet from that file : # if UCHAR_MAX == 0xff typedef signed char int8_t; typedef signed char int_least8_t; typedef signed char int_fast8_t; typedef unsigned char uint8_t; typedef unsigned char uint_least8_t; typedef unsigned char uint_fast8_t; # else # boost cstdint.hpp error error defaults not correct; you must hand modify boost/cstdint.hpp # endif ==> # error defaults not correct; you must hand modify boost/cstdint.hpp Please advice on how to get rid of all this noise ? Last edit: Lieven de Cock 2015-07-06 If you would like to refer to this comment somewhere else in this project, copy and paste the following link: Daniel Marjamäki - 2015-07-07 adding a -DUCHAR_MAX=255 on the command line should fix this error message. when you use -D, the --max-configs is automatically changed to 1. if you want you can use for instance --max-configs=10 or --force also to override this behaviour. If you would like to refer to this comment somewhere else in this project, copy and paste the following link: SourceForge About Site Status @sfnet_ops Powered by Apache Allura™ Find and Develop Software Create a Project Software Directory Top Downloaded Projects Community Blog @sourceforge Resources Help Site Documentation Support Request © 2016 Slashdot Media. All Rights Reserved. Terms Privacy Opt Out Choices Advertise Get latest updates about Open Source Projects, Conferences and News. Sign up for the SourceForge newsletter: I agree to receive quotes, newsletters and other information from sourceforge.net and its partners regarding IT s
• All times are UTC [ DST ] Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group. Color scheme by ColorizeIt!