Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicted definitions of ABSL_ATTRIBUTE_ALWAYS_INLINE #343

Closed
Bak-Jin-Hyeong opened this issue Jun 26, 2019 · 2 comments
Closed

Conflicted definitions of ABSL_ATTRIBUTE_ALWAYS_INLINE #343

Bak-Jin-Hyeong opened this issue Jun 26, 2019 · 2 comments
Assignees

Comments

@Bak-Jin-Hyeong
Copy link

In MSVC,
The ABSL_ATTRIBUTE_ALWAYS_INLINE defined in the absl/base/attributes.h file is different from that defined in the absl/random/internal.h

When absl/random/internal/randen.cc is compiled, the definition of absl/base/attributes.h is used since the include directive of absl/base/internal/raw_logging.h

Is this intended?
I found this at e9324d9.

@derekmauro
Copy link
Member

It looks like an error to me. I think what happened was that someone realized that the definition in absl/base/attributes.h is hard to change because MSVC is pickier about the placement of __forceinline than GCC/LLVM are about their equivalent attribute. It would have required fixing many users of ABSL_ATTRIBUTE_ALWAYS_INLINE. As a workaround we can rename the copy of the macro in the random subdirectory until someone actually has time to fix the canonical copy in absl/base/attributes.h.

absl-federation-github pushed a commit that referenced this issue Jun 28, 2019
--
c321829735accc2e6beb81e6a5a4421e5647b876 by CJ Johnson <johnsoncj@google.com>:

Updates the definition of InlinedVector::swap(InlinedVector&) to be exception safe and adds exception safety tests

PiperOrigin-RevId: 255511536

--
0d86445891748efb09430eb9ede267b54185a246 by CJ Johnson <johnsoncj@google.com>:

Updates the definition of InlinedVector::erase(...) to be exception safe and adds an exception safety test for it.

PiperOrigin-RevId: 255492671

--
f07e8fa62dfe9eb0d025b27fca8c6db43c5a328f by CJ Johnson <johnsoncj@google.com>:

Updates the implementation of InlinedVector::emplace_back(...) to be exception safe and adds exception safety tests

PiperOrigin-RevId: 255422837

--
4c3be92bfe4c1636a03cef8fd5aa802fed0d2c61 by Abseil Team <absl-team@google.com>:

Internal Change

PiperOrigin-RevId: 255422693

--
6df38ea42f00678c357a539016163f8ac4c084e6 by Gennadiy Rozental <rogeeff@google.com>:

Introduce public interfaces for setting and getting program usage messages.

PiperOrigin-RevId: 255291467

--
8f21d594aed3971d37db70226847c693eb548edb by Laramie Leavitt <lar@google.com>:

Move absl/random's copy of ABSL_ATTRIBUTE_FORCE_INLINE and
ABSL_ATTRIBUTE_NEVER_INLINE into .cc files and rename to
prevent conflicts.

#343

PiperOrigin-RevId: 255288599

--
6b7430ad0c8bd860fb9394894f5eeedd1acc9f77 by CJ Johnson <johnsoncj@google.com>:

Updates the ScopedAllocatorWorks test for InlinedVector to not rely on the byte count allocated by the standard library

In doing so, removes LegacyNextCapacityFrom(...) impl function from InlinedVector

Also applies clang-format to the test file

PiperOrigin-RevId: 255207606
GitOrigin-RevId: c321829735accc2e6beb81e6a5a4421e5647b876
Change-Id: I7438211c36c4549fca2e866658f8d579c65d7d52
@shaindelschwartz
Copy link
Contributor

The latest push should address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants