Coder Social home page Coder Social logo

assert's People

Contributors

alexhenrie avatar beman avatar danieljames avatar davedeakins avatar douggregor avatar eldiener avatar giomasce avatar grafikrobot avatar igaztanaga avatar joaquintides avatar jzmaddock avatar lastique avatar mike-devel avatar pdimov avatar sdarwin avatar steveire avatar viboes avatar vinniefalco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

assert's Issues

Compile error, android clang version 5.0.300080

boost: 1.80.0
android ndk: r16b
clang version: 5.0.300080

message:
use of undeclared identifier '__builtin_FUNCTION'
note: expanded from macro 'BOOST_CURRENT_LOCATION'

define BOOST_CURRENT_LOCATION ::boost::source_location(__builtin_FILE(), __builtin_LINE(), __builtin_FUNCTION(), __builtin_COLUMN())

run-boost_assert-source_location_test* test failures in 1.83.0 with Intel LLVM compiler

I am building Boost 1.83.0 with CMake and the Intel LLVM compiler (version 2024.0.0).

Everything builds fine, but I get the following test failures:

The following tests FAILED:
	 13 - run-boost_assert-source_location_test (Failed)
	 15 - run-boost_assert-source_location_test3 (Failed)
	 16 - run-boost_assert-source_location_test4 (Failed)
	1480 - run-boost_throw_exception-throw_exception_test4 (Failed)

(The last failure appears unrelated, but the log will show otherwise.)

Note that I had previously compiled this same version of Boost with an earlier version of Intel LLVM, and did not get these failures then, so there may be something in the behavior of the new compiler that is at fault.

Below are the test outputs. Note that the source tree is in /home/src/boost/1.83.0/, and the build tree is at /tmp/boost-1.83.0-work/build.

run-boost_assert-source_location_test

13/1661 Testing: run-boost_assert-source_location_test
13/1661 Test: run-boost_assert-source_location_test
Command: "/tmp/boost-1.83.0-work/build/stage/bin/boost_assert-source_location_test"
Directory: /tmp/boost-1.83.0-work/build/libs/assert/test
"run-boost_assert-source_location_test" start time: Nov 28 02:37 UTC
Output:
----------------------------------------------------------
/home/src/boost/1.83.0/libs/assert/test/source_location_test.cpp(40): test 'loc.file_name() == __FILE__' ('source_location_test.cpp' == '/home/src/boost/1.83.0/libs/assert/test/source_location_test.cpp') failed in function 'int main()'
/home/src/boost/1.83.0/libs/assert/test/source_location_test.cpp(47): test 'loc.file_name() == __FILE__' ('source_location_test.cpp' == '/home/src/boost/1.83.0/libs/assert/test/source_location_test.cpp') failed in function 'int main()'
2 errors detected.
<end of output>
Test time =   0.00 sec
----------------------------------------------------------
Test Failed.
"run-boost_assert-source_location_test" end time: Nov 28 02:37 UTC
"run-boost_assert-source_location_test" time elapsed: 00:00:00

run-boost_assert-source_location_test3

15/1661 Testing: run-boost_assert-source_location_test3
15/1661 Test: run-boost_assert-source_location_test3
Command: "/tmp/boost-1.83.0-work/build/stage/bin/boost_assert-source_location_test3"
Directory: /tmp/boost-1.83.0-work/build/libs/assert/test
"run-boost_assert-source_location_test3" start time: Nov 28 02:37 UTC
Output:
----------------------------------------------------------
/home/src/boost/1.83.0/libs/assert/test/source_location_test3.cpp(65): test 'loc.to_string().substr( 0, prefix.size() ) == prefix' ('source_location_test3.cpp:62:38 in function 'main'' == '/home/src/boost/1.83.0/libs/assert/test/source_location_test3.cpp:62') failed in function 'int main()'
1 error detected.
<end of output>
Test time =   0.00 sec
----------------------------------------------------------
Test Failed.
"run-boost_assert-source_location_test3" end time: Nov 28 02:37 UTC
"run-boost_assert-source_location_test3" time elapsed: 00:00:00

run-boost_assert-source_location_test4

6/1661 Testing: run-boost_assert-source_location_test4
16/1661 Test: run-boost_assert-source_location_test4
Command: "/tmp/boost-1.83.0-work/build/stage/bin/boost_assert-source_location_test4"
Directory: /tmp/boost-1.83.0-work/build/libs/assert/test
"run-boost_assert-source_location_test4" start time: Nov 28 02:37 UTC
Output:
----------------------------------------------------------
/home/src/boost/1.83.0/libs/assert/test/source_location_test4.cpp(21): test 's_loc.file_name() == __FILE__' ('source_location_test4.cpp' == '/home/src/boost/1.83.0/libs/assert/test/source_location_test4.cpp') failed in function 'int main()'
/home/src/boost/1.83.0/libs/assert/test/source_location_test4.cpp(32): test 'c_loc.file_name() == __FILE__' ('source_location_test4.cpp' == '/home/src/boost/1.83.0/libs/assert/test/source_location_test4.cpp') failed in function 'int main()'
/home/src/boost/1.83.0/libs/assert/test/source_location_test4.cpp(39): test 'loc.file_name() == __FILE__' ('source_location_test4.cpp' == '/home/src/boost/1.83.0/libs/assert/test/source_location_test4.cpp') failed in function 'int main()'
3 errors detected.
<end of output>
Test time =   0.00 sec
----------------------------------------------------------
Test Failed.
"run-boost_assert-source_location_test4" end time: Nov 28 02:37 UTC
"run-boost_assert-source_location_test4" time elapsed: 00:00:00

run-boost_throw_exception-throw_exception_test4

1480/1661 Testing: run-boost_throw_exception-throw_exception_test4
1480/1661 Test: run-boost_throw_exception-throw_exception_test4
Command: "/tmp/boost-1.83.0-work/build/stage/bin/boost_throw_exception-throw_exception_test4"
Directory: /tmp/boost-1.83.0-work/build/libs/throw_exception/test
"run-boost_throw_exception-throw_exception_test4" start time: Nov 28 02:44 UTC
Output:
----------------------------------------------------------
/home/src/boost/1.83.0/libs/throw_exception/test/throw_exception_test4.cpp(43): test '*file == __FILE__' ('throw_exception_test4.cpp' == '/home/src/boost/1.83.0/libs/throw_exception/test/throw_exception_test4.cpp') failed in function 'int main()'
/home/src/boost/1.83.0/libs/throw_exception/test/throw_exception_test4.cpp(71): test '*file == __FILE__' ('throw_exception_test4.cpp' == '/home/src/boost/1.83.0/libs/throw_exception/test/throw_exception_test4.cpp') failed in function 'int main()'
/home/src/boost/1.83.0/libs/throw_exception/test/throw_exception_test4.cpp(99): test '*file == __FILE__' ('throw_exception_test4.cpp' == '/home/src/boost/1.83.0/libs/throw_exception/test/throw_exception_test4.cpp') failed in function 'int main()'
3 errors detected.
<end of output>
Test time =   0.00 sec
----------------------------------------------------------
Test Failed.
"run-boost_throw_exception-throw_exception_test4" end time: Nov 28 02:44 UTC
"run-boost_throw_exception-throw_exception_test4" time elapsed: 00:00:00

[compile error] #if #endif pairs did not match in boost\assert.hpp

When I tried to compile PCL(PointCloudLibrary) with the Boost file compiled by myself, the error showed that #if #endif pairs did not match and the error was reported in the assert.hpp file from Boost, so I checked the file in VS2022 and didn't see any error prompt. I have compared the latest version of Boost compiled files, and every line is the same. (Because it is necessary to compile part of the code with NVCC, NVCC always prompts that the *.hpp file of Boost cannot be found. Even though I have completely set it in path and CMake, I changed the include directory to a pure English absolute path, but I think this should not be the reason. ) I hope to get an answer, thank you very much!
My platform: Windows11
Compiler: vs2022 (or vc143) & nvcc (from cuda 11.6)

Document requirements on the user-defined `assertion_failed(_msg)` functions

Currently, the documentation does not mention any requirements on the user-defined assertion_failed(_msg) functions beyond their signatures. However, at least the requirement that these functions should not return (normally) should be documented.

One particular question I have is are these functions allowed to throw? This would affect whether BOOST_ASSERT(_MSG) can be used in noexcept functions, for example.

Library requirements errors.

====== BEGIN OUTPUT ======
libs/assert: error: directory not found; Missing [project-root]/doc directory. The [project-root]/doc directory is required for all libraries. Sources to build with and built documentation for the library. If the library needs to build documentation from non-HTML files this location must be buildable with Boost Build.

EXIT STATUS: 1
====== END OUTPUT ======

BOOST_CURRENT_FUNCTION isn't a string literal

The documentation for BOOST_CURRENT_FUNCTION says:

BOOST_CURRENT_FUNCTION expands to a string literal [...]

Under GCC (among others), it gets defined to __PRETTY_FUNCTION__, which is not a string literal.

From the GCC documentation:

These identifiers are variables, not preprocessor macros, and may not be used to initialize char arrays or be concatenated with string literals.

Here's a minimal example program:

#include <boost/current_function.hpp>

int main(){
    static const char * str1 = "in function " "main";
    static const char * str2 = "in function " BOOST_CURRENT_FUNCTION;
}

Since most major compilers don't provide a macro that expands to a string literal with the name of the current function, let alone the signature, I suggest changing the documentation to reflect the type of BOOST_CURRENT_FUNCTION. (MSVC is the major exception, it seems)

Compilation under nvcc with c++20 fails due to std::source_location::current being non-constexpr

Compiling my code on Linux with release 12.1, V12.1.105 / gcc 11.3.0 fails with the following errors:

/build_deps/boost_1_81_0/include/boost/throw_exception.hpp(224): error: call to consteval function "std::source_location::current" did not produce a valid constant expression
  template<class E> __attribute__ ((__noreturn__)) void throw_with_location( E && e, boost::source_location const & loc = ::boost::source_location(::std::source_location::current()) )
                                                                                                                                                                                  ^
/build_deps/gcc-11.3.0/include/c++/11.3.0/source_location(51): note #2703-D: cannot call non-constexpr function "__builtin_source_location" (declared implicitly)
      current(const void* __p = __builtin_source_location()) noexcept
                                ^

I have hit this with both boost 1.81.0 and 1.82.0. I haven't tried with other compilers (gcc versions or clang) or nvcc.

I have been able to track this back to boost/assert/source_location.hpp, where a similar issue is mentioned for some versions of MSVC. I'm submitting a simple patch that works around the issue.

Modular Boost C++ Libraries Request

We are in the process of making B2 build changes to all of the B2 build files
to support "modular" consumption of the Boost Libraries by users. See this list
post for some details: https://lists.boost.org/Archives/boost/2024/01/255704.php

The process requires making a variety of changes to make each Boost library
independent of the super-project structure. But the changes do not remove the
super-project structure or the comprehensive Boost release. The changes make
solely make it possible, optionally, for users, like package manages, to easily
consume libraries individually.

Generally the changes include:

  • Adding a libroot/build.jam.
  • Porting any functionality from libroot/jamfile to libroot/build.jam.
  • Moving boost-install declaration from libroot/build/jamfile is applicable.
  • Adjusting other B2 build files in the library, like test/jamfile, as needed.
  • Possible changes to C++ source files to remove includes relative to the
    super-project boostroot location.

Some examples of such changes:

We are asking how you would like us to handle the changes. We would prefer if
you allow the owners of the Boost.org GitHub project to make changes to B2
build files, as needed, to accomplish the changes. But understand
that you may want to manage the proposed changes yourself.

We previously sent emails to all known maintainers to fill out a form with their
preference. We are contacting you in this issue as we have not gotten a response
to that email. You can see the ongoing responses for that form and the responses
to these issues here https://github.com/users/grafikrobot/projects/1/views/6

We are now asking if you can reply directly to this issue to indicate your
preference of handling the changes. Please supply a response to this question
and close the issue (so that we can verify you are a maintainer).

How would you like the build changes to be processed?

  1. Pull request, reviewed and merged by a BOOSTORG OWNER.
  2. Pull request, reviewed and merged by YOU.
  3. Other. (please specify details in the reply)

Also please indicate any special instructions you want us to consider. Or other
information you want us to be aware of.

Thanks you, René

Create an index html file

Every library module should have a 'index.html' file in its root directory, so that it can be easily linked on the website. You could just move 'assert.html' to 'index.html', or add a redirect file, or something else if you prefer.

issues with std::sprintf in source_location.hpp when using gettext

Hi!

Hi! libintl (part of gettext) #defines sprintf into libintl_sprintf (cf https://github.com/autotools-mirror/gettext/blob/c438dbf70dd293fa099e94d8fb964cd133675b5f/gettext-runtime/intl/libgnuintl.in.h#L394 - since 19 years ago
apparently), which creates compilation issues with latest boost, because since
1f98fab#diff there is a std::sprintf which creates compilation errors in localized programs using boost on mingw64. This in particular affects Inkscape because of course 'libintl_sprintf' is not a member of 'std' (e.g. https://gitlab.com/inkscape/inkscape/-/jobs/1893141019 ) …

is there a way that you could remove the std:: in boost assert ?

Thanks :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.