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

variable 'a' is uninitialized when passed as a const reference argument here warning when compiling with clang-cl.exe #34

Open
k15tfu opened this issue Nov 22, 2021 · 2 comments

Comments

@k15tfu
Copy link

k15tfu commented Nov 22, 2021

Hi!

In file boost/concept_check.hpp:

boost/concept_check.hpp(139,38): error : variable 'a' is uninitialized when passed as a const reference argument here [-Werror,-Wuninitialized-const-reference]
@jeking3
Copy link
Collaborator

jeking3 commented Apr 24, 2022

@k15tfu can you provide the calling code? Is this still an issue for you?

@k15tfu
Copy link
Author

k15tfu commented Jun 14, 2022

Hi! Sorry for the late response, yes this is still relevant. Here is the full error message, please tell me if that's not enough:

1>In file included from my.cpp:3:
1>In file included from boost/algorithm/string.hpp:19:
1>In file included from boost/algorithm/string/trim.hpp:19:
1>In file included from boost/range/as_literal.hpp:18:
1>In file included from boost/range/iterator_range.hpp:13:
1>In file included from boost/range/iterator_range_core.hpp:38:
1>In file included from boost/range/functions.hpp:20:
1>In file included from boost/range/size.hpp:21:
1>In file included from boost/range/size_type.hpp:20:
1>In file included from boost/range/concepts.hpp:19:
1>boost/concept_check.hpp(139,38): error : variable 'a' is uninitialized when passed as a const reference argument here [-Werror,-Wuninitialized-const-reference]
1>boost/concept/usage.hpp(20,43): message : in instantiation of member function 'boost::DefaultConstructible<unsigned long long>::~DefaultConstructible' requested here
1>boost/concept/detail/general.hpp(50,42): message : in instantiation of member function 'boost::concepts::usage_requirements<boost::DefaultConstructible<unsigned long long>>::~usage_requirements' requested here
1>boost/concept_check.hpp(137,5): message : in instantiation of member function 'boost::concepts::requirement<boost::concepts::failed ************boost::concepts::usage_requirements<boost::DefaultConstructible<unsigned long long>>::************>::failed' requested here
1>boost/concept/usage.hpp(36,7): message : expanded from macro 'BOOST_CONCEPT_USAGE'
1>boost/concept/assert.hpp(43,5): message : expanded from macro 'BOOST_CONCEPT_ASSERT'
1>boost/concept/detail/general.hpp(92,51): message : expanded from macro 'BOOST_CONCEPT_ASSERT_FN'
1>boost/icl/interval_map.hpp(126,11): message : in instantiation of member function 'boost::icl::interval_base_map<boost::icl::interval_map<unsigned long long, std::multimap<unsigned long long, my struct>, boost::icl::partial_absorber, std::less, my boost::icl::identity_based_inplace_combine, icl::inter_section, boost::icl::discrete_interval<unsigned long long>>, unsigned long long, std::multimap<unsigned long long, my struct>, boost::icl::partial_absorber, less, my boost::icl::identity_based_inplace_combine, inter_section, boost::icl::discrete_interval<unsigned long long>>::interval_base_map' requested here
1>my.hpp(82,34): message : in instantiation of member function 'boost::icl::interval_map<unsigned long long, std::multimap<unsigned long long, my struct>, boost::icl::partial_absorber, std::less, my boost::icl::identity_based_inplace_combine, icl::inter_section, boost::icl::discrete_interval<unsigned long long>>::interval_map' requested here```

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

2 participants