StackOverflow Questions for Tag: one-definition-rule

snow
snow

Reputation: 1

C++ project : 2 enums with the same name from 2 different referenced dlls

Score: -1

Views: 53

Answers: 0

Read More
user
user

Reputation: 5390

Should I care about a one-definition-rule violation in a Rust executable reported by ASAN?

Score: 16

Views: 768

Answers: 1

Read More
Red
Red

Reputation: 1

Discarded-value expression and odr-used in C++20

Score: 0

Views: 159

Answers: 1

Read More

Are different translation units allowed to define structures with the same name?

Score: 15

Views: 2071

Answers: 3

Read More
NariPDev
NariPDev

Reputation: 479

Wrong constructor being called causes segmentation fault

Score: 14

Views: 205

Answers: 4

Read More
Dorian
Dorian

Reputation: 596

ODR-use a member function of a template class only if it is valid

Score: 0

Views: 62

Answers: 1

Read More
Stefano Bellotti
Stefano Bellotti

Reputation: 125

Multiple symbol definitions when using the same template type from different DLLs used in the same project

Score: 0

Views: 73

Answers: 0

Read More
rationalloony
rationalloony

Reputation: 85

ODR violation when linking static and dynamic library

Score: 4

Views: 1977

Answers: 1

Read More
lghizoni
lghizoni

Reputation: 155

Problem with ambiguity of functions from different libraries - multiple CMakeLists.txt?

Score: 2

Views: 51

Answers: 0

Read More
user3188445
user3188445

Reputation: 4792

Are multiple identical non-inline constexpr variable definitions allowed in different translation units in C++23?

Score: 1

Views: 86

Answers: 1

Read More
user3188445
user3188445

Reputation: 4792

Does C++23 allow multiple definitions of a namespace-scope non-inline variable in different translation units?

Score: 1

Views: 107

Answers: 1

Read More
ugo_capeto
ugo_capeto

Reputation: 338

how do static member variables work in c++?

Score: 2

Views: 93

Answers: 0

Read More
Joshua Maiche
Joshua Maiche

Reputation: 438

How does the ODR interact with "unique" types that use a non-type template defaulted to a lambda expression?

Score: 3

Views: 83

Answers: 1

Read More
Igor G
Igor G

Reputation: 2471

Can ODR be violated if a template definition is only ever instantiated with different parameters?

Score: 5

Views: 129

Answers: 1

Read More
Sarien
Sarien

Reputation: 7002

What does it mean to "odr-use" something?

Score: 119

Views: 26941

Answers: 2

Read More
centauri
centauri

Reputation: 73

Prior to C++11, the 'one-definition rule' would have been broken by in-class member initialization of non-static and non-const variables. Why?

Score: 2

Views: 240

Answers: 2

Read More
adepierre
adepierre

Reputation: 85

Different template instantiations in multiple cpp files

Score: 1

Views: 84

Answers: 1

Read More
TripShock
TripShock

Reputation: 4249

Avoiding ODR violations when using debug asserts

Score: 3

Views: 518

Answers: 4

Read More
digito_evo
digito_evo

Reputation: 3682

How to define unique types in a header file to be used across multiple translation units and avoid ODR errors?

Score: 0

Views: 72

Answers: 2

Read More
ABu
ABu

Reputation: 12309

Object files, static libraries and one-definition rule

Score: 0

Views: 123

Answers: 1

Read More
PreviousPage 1Next