A comb polymer P having at least 0.5 mol%, in particular at least 5 mol%, based on the total amount of repeating units in the comb polymer, of repeating units A, selected from repeating units of the formulae la and Ib: wherein R 1 is selected from the group consisting of hydrogen, -S(=O) 2 R a, C 1 -C 20 alkyl, C 3 -C 10 cycloalkyl, aryl, heteroaryl, aryl-C 1 -C 4 -alkyl and heteroaryl-C 1 -C 4 -alkyl, where aryl and hetaryl in the four last mentioned radicals are unsub-stituted or substituted by 1, 2, 3 or 4 radicals selected from the group con-sisting of-OH, -COOH, -COOCH 3, -NH 2, -NH(C 1 -C 6 alkyl), -N(C 1 -C 6 alkyl) 2, -NO 2, -S(=O) 2 R a, C 1 -C 4 alkyl, C 1 -C 4 alkoxy and halogen; and X indicates a polymer group of the following formula X wherein Z indicates a polymer segment or a monovalent alkyl or alkenyl group having from 10 to 100 carbon atoms; R 1 is as defined above; k is 0, 1, 2, 3 or 4; n is 0, 1 or 2; A is a chemical bond or a divalent moiety selected from the group consisting of C 1 -C 6 alkylene, -O-(C 2 -C 6 alkylene) or -C(=O)-O-(C 2 -C 6 alkylene), where the C 2 -C 6 alkylene part is attached to Q; Q is a divalent moiety selected from the group consisting of -O-, -NH-and -S-; R 2 is independently selected from the group consisting of -OH, -COOH, -COOCH 3, -NH 2, -NH(C 1 -C 6 alkyl), -N(C 1 -C 6 alkyl) 2, -NO 2, -S(=O) 2 R a, C 1 -C 20 alkyl, C 1 -C 4 alkoxy, halogen, aryloxy, aryl, heteroaryl, where aryl, hetaryl and aryloxy are unsubstituted or substituted by 1, 2, 3 or 4 radicals selected from the group consisting of -OH, -COOH, -COOCH 3, -NH 2, -NH(C 1 -C 6 alkyl), -N(C 1 -C 6 alkyl) 2, -NO 2, -S(=O) 2 R a, C 1 -C 4 alkyl, C 1 -C 4 alkoxy and halogen; and wherein R a is selected from the group consisting of OH, -NH 2, -NH(C 1 -C 6 alkyl), -N(C 1 -C 6 alkyl) 2, C 1 -C 4 alkyl, C 1 -C 4 alkoxy, aryl and heteroaryl, where aryl and hetaryl are unsubstituted or substituted by 1, 2, 3 or 4 radicals selected from the group consisting of C 1 -C 4 alkyl, C 1 -C 4 alkoxy and halogen. R 1 is selected from the group consisting of hydrogen, -S(=O) 2 R a, C 1 -C 20 alkyl, C 3 -C 10 cycloalkyl, aryl, heteroaryl, aryl-C 1 -C 4 -alkyl and heteroaryl-C 1 -C 4 -alkyl, where aryl and hetaryl in the four last mentioned radicals are unsub-stituted or substituted by 1, 2, 3 or 4 radicals selected from the group con-sisting of-OH, -COOH, -COOCH 3, -NH 2, -NH(C 1 -C 6 alkyl), -N(C 1 -C 6 alkyl) 2, -NO 2, -S(=O) 2 R a, C 1 -C 4 alkyl, C 1 -C 4 alkoxy and halogen; and X indicates a polymer group of the following formula X wherein Z indicates a polymer segment or a monovalent alkyl or alkenyl group having from 10 to 100 carbon atoms; R 1 is as defined above; k is 0, 1, 2, 3 or 4; n is 0, 1 or 2; A is a chemical bond or a divalent moiety selected from the group consisting of C 1 -C 6 alkylene, -O-(C 2 -C 6 alkylene) or -C(=O)-O-(C 2 -C 6 alkylene), where the C 2 -C 6 alkylene part is attached to Q; Q is a divalent moiety selected from the group consisting of -O-, -NH-and -S-; R 2 is independently selected from the group consisting of -OH, -COOH, -COOCH 3, -NH 2, -NH(C 1 -C 6 alkyl), -N(C 1 -C 6 alkyl) 2, -NO 2, -S(=O) 2 R a, C 1 -C 20 alkyl, C 1 -C 4 alkoxy, halogen, aryloxy, aryl, heteroaryl, where aryl, hetaryl and aryloxy are unsubstituted or substituted by 1, 2, 3 or 4 radicals selected from the group consisting of -OH, -COOH, -COOCH 3, -NH 2, -NH(C 1 -C 6 alkyl), -N(C 1 -C 6 alkyl) 2, -NO 2, -S(=O) 2 R a, C 1 -C 4 alkyl, C 1 -C 4 alkoxy and halogen; and wherein R a is selected from the group consisting of OH, -NH 2, -NH(C 1 -C 6 alkyl), -N(C 1 -C 6 alkyl) 2, C 1 -C 4 alkyl, C 1 -C 4 alkoxy, aryl and heteroaryl, where aryl and hetaryl are unsubstituted or substituted by 1, 2, 3 or 4 radicals selected from the group consisting of C 1 -C 4 alkyl, C 1 -C 4 alkoxy and halogen. Z indicates a polymer segment or a monovalent alkyl or alkenyl group having from 10 to 100 carbon atoms; R 1 is as defined above; k is 0, 1, 2, 3 or 4; n is 0, 1 or 2; A is a chemical bond or a divalent moiety selected from the group consisting of C 1 -C 6 alkylene, -O-(C 2 -C 6 alkylene) or -C(=O)-O-(C 2 -C 6 alkylene), where the C 2 -C 6 alkylene part is attached to Q; Q is a divalent moiety selected from the group consisting of -O-, -NH-and -S-; R 2 is independently selected from the group consisting of -OH, -COOH, -COOCH 3, -NH 2, -NH(C 1 -C 6 alkyl), -N(C 1 -C 6 alkyl) 2, -NO 2, -S(=O) 2 R a, C 1 -C 20 alkyl, C 1 -C 4 alkoxy, halogen, aryloxy, aryl, heteroaryl, where aryl, hetaryl and aryloxy are unsubstituted or substituted by 1, 2, 3 or 4 radicals selected from the group consisting of -OH, -COOH, -COOCH 3, -NH 2, -NH(C 1 -C 6 alkyl), -N(C 1 -C 6 alkyl) 2, -NO 2, -S(=O) 2 R a, C 1 -C 4 alkyl, C 1 -C 4 alkoxy and halogen; and wherein R a is selected from the group consisting of OH, -NH 2, -NH(C 1 -C 6 alkyl), -N(C 1 -C 6 alkyl) 2, C 1 -C 4 alkyl, C 1 -C 4 alkoxy, aryl and heteroaryl, where aryl and hetaryl are unsubstituted or substituted by 1, 2, 3 or 4 radicals selected from the group consisting of C 1 -C 4 alkyl, C 1 -C 4 alkoxy and halogen.