Skip to content

strong typdef operator== can compile into infinite loop in clang10 with -std=c++2a #201

Description

@LumaGhost
#include <boost/serialization/strong_typedef.hpp>

BOOST_STRONG_TYPEDEF(double, Deg);

int main() {
    auto d = Deg{};
    return d == double{};
}

expected behavior: return 1

actual behavior: infinite loop

https://godbolt.org/z/6jDXqs

seems to only happen on clang10/trunk with the std=c++2a or std=c++20 flag. other compilers i've tried (gcc9, and clang9) seem to work as expected. this code also compiles as expected with clang10 if the -std=c++17 flag is used instead of 2a.

let me know if any additional information is required. thank you.

edit: forgot to mention the boost versions i tried are 1.72 and 1.73 and both seem to produce the same behavior

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions